Note that there are some explanatory texts on larger screens.

plurals
  1. POXML file for layout not detected in Eclipse
    text
    copied!<p>I am not sure what I did wrong but this issue is eating my head. In the code below, <strong>R.layout.row</strong> and <strong>R.id.value</strong> both shows up as error with the <em>red line</em> on <strong>Eclipse</strong> . It does say that <strong>SimpleCursorAdapter is deprecated</strong> but with <strong>@SuppressWarnings("deprecation")</strong> , it should work, right? </p> <pre><code>@SuppressWarnings("deprecation") @Override protected void onPostExecute(Void result) { // TODO Auto-generated method stub super.onPostExecute(result); SimpleCursorAdapter adapter; if(Build.VERSION.SDK_INT&gt;= Build.VERSION_CODES.HONEYCOMB) { adapter=new SimpleCursorAdapter(getActivity(), R.layout.row, constantCursor, new String[] { DatabaseHelper.TITLE, DatabaseHelper.VALUE }, new int[] { R.id.title, R.id.value }); } else { adapter=new SimpleCursorAdapter(getActivity(), R.layout.row, constantCursor, new String[] { DatabaseHelper.TITLE ,DatabaseHelper.VALUE }, new int [] { R.id.title, R.id.value }); } setListAdapter(adapter); } </code></pre> <p>The <strong>row.xml</strong> which is under the <strong><em>res/layout</em></strong> directory has the following:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:textSize="20sp" android:textStyle="bold" /&gt; &lt;TextView android:id="@+id/value" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:textSize="20sp" android:textStyle="bold" /&gt; &lt;/RelativeLayout&gt; </code></pre>
 

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