Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to create a detailled-list view for Android 4.0 tablet, exactly like Contacts App?
    text
    copied!<p>I'm actually developing a <strong>tablet</strong> application for <strong>Android 4.0</strong>, and I need to use a layout displaying 2 or 3 panes (just like the default <strong>Contacts</strong> app). It will display a catalog of products:</p> <ol> <li>The first pane is a list of items</li> <li>The second pane is the detailled view of the currently selected item in the list</li> <li>The last pane is optional, showing a wishlist (it can be showed or hidden)</li> </ol> <h2>The approach</h2> <p>So, i'm currently using a <code>ListFragment</code> for the list pane, and a simple <code>Fragment</code> for the details pane. The last one isn't actually integrated.</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="match_parent" android:layout_height="match_parent" &gt; &lt;fragment android:id="@+id/listFragment" android:layout_width="0dip" android:layout_weight=".3" android:layout_height="match_parent" class="com.###.###.ui.fragments.ListFragment" /&gt; &lt;fragment android:id="@+id/detailsFragment" android:layout_width="0dip" android:layout_weight=".7" android:layout_height="match_parent" class="com.###.###.ui.fragments.DetailsFragment" /&gt; &lt;/LinearLayout&gt; </code></pre> <ul> <li>Is there a better approach for this design ?</li> </ul> <h2>The style</h2> <p>I also want to follow the Android 4.0 Design Guidelines and apply to my App the same design as the default Contacts App. I searched for any tutorial on how to apply this <em>style</em>, and I can't find anything about that.</p> <p><a href="http://developer.android.com/design/media/multipane_view_tablet.png" rel="nofollow">Here's an exact picture of what I need.</a> (Sorry, i'm not yet allowed to post images...)</p> <ul> <li>How can I implement the default Android 4.0 detailled-list style ?</li> </ul> <p>I've seen <a href="http://i.stack.imgur.com/MXBo7.png" rel="nofollow">this ressource picture</a> on the Guidelines webpage. I'm sure there is a simple way to implement this style on any application... So, if anyone can help me doing this...</p>
 

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