Note that there are some explanatory texts on larger screens.

plurals
  1. POsetVisitility item in custom ListView
    primarykey
    data
    text
    <p>I have a problem now! I have custom ListView, there I have two TextView element. I want setVisibility(TextView.gone) for one TextView in ListView element. I don't know how to do it</p> <p>Write an example of how I can hide TextView ienter code heren all the items for ListView</p> <p>ListView:</p> <pre><code>&lt;ListView android:id="@+id/listResultAvia" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="left" android:layout_weight="1" android:background="#ffffff" android:cacheColorHint="#ffffff" android:drawingCacheQuality="auto" &gt; &lt;!-- Preview: listitem=@layout/item --&gt; &lt;/ListView&gt; </code></pre> <p>Custom item for ListVIew:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#fff" &gt; &lt;TextView android:id="@+id/textViewTimeResult" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Large Text" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#000000" /&gt; &lt;TextView android:id="@+id/textViewTimeResult2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Large Text" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#000000"/&gt; &lt;/LinearLayout&gt; </code></pre> <p>Show me how I can hide textViewTimeResult2 in the onCreate. If I write:</p> <pre><code>TextView test = (TextView) findById(R.id.textViewTimeResult2); test.setVisibility(TextView.GONE); </code></pre> <p>My program crashed in start.</p> <p><strong>ADD:</strong></p> <p>I use answer below, but now I get empty ListView. How do I fix this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload