diff options
Diffstat (limited to 'layoutopt/samples')
-rw-r--r-- | layoutopt/samples/compound.xml | 24 | ||||
-rw-r--r-- | layoutopt/samples/has_children.xml | 13 | ||||
-rw-r--r-- | layoutopt/samples/inefficient_weight.xml | 29 | ||||
-rw-r--r-- | layoutopt/samples/scrolling.xml | 19 |
4 files changed, 70 insertions, 15 deletions
diff --git a/layoutopt/samples/compound.xml b/layoutopt/samples/compound.xml index a1c1ee5..176089b 100644 --- a/layoutopt/samples/compound.xml +++ b/layoutopt/samples/compound.xml @@ -1,23 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> -<FrameLayout +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - - </LinearLayout> + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> -</FrameLayout> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + +</LinearLayout> diff --git a/layoutopt/samples/has_children.xml b/layoutopt/samples/has_children.xml new file mode 100644 index 0000000..f216db5 --- /dev/null +++ b/layoutopt/samples/has_children.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> + +<ListView + xmlns:android="http://schemas.android.com/apk/res/android" + + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <ListView + android:layout_width="fill_parent" + android:layout_height="fill_parent" /> + +</ListView>
\ No newline at end of file diff --git a/layoutopt/samples/inefficient_weight.xml b/layoutopt/samples/inefficient_weight.xml new file mode 100644 index 0000000..c687ed8 --- /dev/null +++ b/layoutopt/samples/inefficient_weight.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <Button + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1.0" /> + + <LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + + android:layout_width="fill_parent" + android:layout_height="fill_parent" + + android:orientation="vertical"> + + <Button + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1.0" /> + + </LinearLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/layoutopt/samples/scrolling.xml b/layoutopt/samples/scrolling.xml new file mode 100644 index 0000000..534289c --- /dev/null +++ b/layoutopt/samples/scrolling.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> + +<ScrollView + xmlns:android="http://schemas.android.com/apk/res/android" + + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <ListView + android:layout_width="fill_parent" + android:layout_height="fill_parent" /> + + </LinearLayout> + +</ScrollView> |