Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - creating a view with with a list adapter and additional fields doesn't render anything
    primarykey
    data
    text
    <p>I am playing around with this sort of a view:</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="wrap_content" android:layout_height="wrap_content" &gt; &lt;TextView android:id="@+id/solution_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Label1" /&gt; &lt;TextView android:id="@+id/solution_description" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Label2" /&gt; &lt;ListView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@+id/label" android:textSize="20px" &gt; &lt;/ListView&gt; &lt;/LinearLayout&gt; </code></pre> <p>What I want to do is use a ListAdopter to display the ListView and show a list of items, and use simple text labels for the first two items.</p> <p>Right now I get nothing rendering when I try to just display the first two text fields:</p> <pre><code>public class SuggestedSolutionActivity extends ListActivity { ArrayAdapter&lt;SolutionTopic&gt; adapter; ArrayList&lt;SolutionTopic&gt; problems = new ArrayList &lt;SolutionTopic&gt;( ); /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); adapter = new ArrayAdapter&lt;SolutionTopic&gt;(this, R.layout.solution, R.id.label, problems); final TextView solution_title = (TextView) findViewById(R.id.solution_title); final TextView solution_description = (TextView) findViewById(R.id.solution_description); } </code></pre> <p>Any idea why the TextView fields don't render for me?</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    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