Hi,

In the launcher layout file (launcher.xml), it uses
android:layout_width="match_parent" in both DragLayer and Workspace.
My question is why it uses 'match_parent' instead of 'wrap_content'?

In the launcher, the whole DragLayer should contains 5 cells, each
spans 1 phone screens. So shouldn't DragLayer/Worksapce should span 5
phone screens? But if that is the case, why the layout_width is
'match_parent', instead of wrap_content?

<com.android.launcher2.DragLayer
    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher";
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- The workspace contains 3 screens of cells -->
    <com.android.launcher2.Workspace
        android:id="@+id/workspace"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <include android:id="@+id/cell1" layout="@layout/workspace_screen" />
        <include android:id="@+id/cell2" layout="@layout/workspace_screen" />
        <include android:id="@+id/cell3" layout="@layout/workspace_screen" />
        <include android:id="@+id/cell4" layout="@layout/workspace_screen" />
        <include android:id="@+id/cell5" layout="@layout/workspace_screen" />

    </com.android.launcher2.Workspace>
.....
</com.android.launcher2.DragLayer>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to