Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From the android sdk (ListFragment) (<a href="http://developer.android.com/reference/android/app/ListFragment.html" rel="nofollow">http://developer.android.com/reference/android/app/ListFragment.html</a>):</p> <blockquote> <p><em>public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)</em></p> <p>Provide default implementation to return a simple list view. Subclasses can override to replace with their own layout. If doing so, the returned view hierarchy must have a ListView whose id is android.R.id.list and can optionally have a sibling view id android.R.id.empty that is to be shown when the list is empty.</p> <p>If you are overriding this method with your own custom content, consider including the standard layout list_content in your layout file, so that you continue to retain all of the standard behavior of ListFragment. In particular, this is currently the only way to have the built-in indeterminant progress state be shown. </p> </blockquote> <p>So when you want your own layout.xml for a FragmentList overide onCreateView and inflate your own layout.</p> <p>For example:</p> <p>Create a android layout (<em>yourlistlayout.xml</em>) and put the following xml on the position where you want to show your ListFragment.</p> <pre><code> &lt;ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" &gt; &lt;/ListView&gt; </code></pre> <p>in your <em>ListFragment</em> class put the following code:</p> <pre><code>@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.yourlistlayout, null); return v; } </code></pre>
    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.
    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