aboutsummaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-09-20 10:57:33 +0200
committerDanny Baumann <dannybaumann@web.de>2013-09-20 14:56:46 +0200
commit7a197395999ced8fce1da2a5f86f202647698006 (patch)
treefda698566737e8b10d2baec11282040f68138395 /res/layout
parent2f9277f279882b0ed4d30b84bf7327610b2a84e6 (diff)
downloadandroid_packages_apps_CMFileManager-7a197395999ced8fce1da2a5f86f202647698006.tar.gz
android_packages_apps_CMFileManager-7a197395999ced8fce1da2a5f86f202647698006.tar.bz2
android_packages_apps_CMFileManager-7a197395999ced8fce1da2a5f86f202647698006.zip
Some optimizations spotted during profiling.
Change-Id: Ice5cc24d2574894798370eaaae144713414eb6cf
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/navigation_view_details_item.xml17
-rw-r--r--res/layout/navigation_view_simple_item.xml40
2 files changed, 22 insertions, 35 deletions
diff --git a/res/layout/navigation_view_details_item.xml b/res/layout/navigation_view_details_item.xml
index 79175d69..f3b9b035 100644
--- a/res/layout/navigation_view_details_item.xml
+++ b/res/layout/navigation_view_details_item.xml
@@ -14,17 +14,17 @@
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_view_details_item"
android:layout_width="match_parent"
android:layout_height="@dimen/default_row_height"
- android:background="@drawable/holo_list_selector_deselected" >
+ android:background="@drawable/holo_list_selector_deselected"
+ android:orientation="horizontal" >
<com.cyanogenmod.filemanager.ui.widgets.TransparentNonFocusableButtonItem
android:id="@+id/navigation_view_item_check"
android:layout_width="@dimen/item_menu_row_button_width"
android:layout_height="match_parent"
- android:layout_alignParentLeft="true"
android:contentDescription="@null"
android:src="@drawable/btn_holo_light_check_off_normal" />
@@ -32,18 +32,15 @@
android:id="@+id/navigation_view_item_icon"
android:layout_width="@dimen/default_row_height"
android:layout_height="@dimen/default_row_height"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/navigation_view_item_check"
- android:layout_alignWithParentIfMissing="true"
+ android:layout_gravity="center_vertical"
android:scaleType="centerInside"
android:contentDescription="@null"
android:src="@null" />
<RelativeLayout
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_toRightOf="@id/navigation_view_item_icon"
+ android:layout_weight="1"
android:layout_marginRight="@dimen/extra_margin">
<TextView
@@ -80,4 +77,4 @@
android:textStyle="bold" />
</RelativeLayout>
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/layout/navigation_view_simple_item.xml b/res/layout/navigation_view_simple_item.xml
index 63a8a3fa..bd73bf8a 100644
--- a/res/layout/navigation_view_simple_item.xml
+++ b/res/layout/navigation_view_simple_item.xml
@@ -14,17 +14,17 @@
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_view_details_item"
android:layout_width="match_parent"
android:layout_height="@dimen/default_row_height"
- android:background="@drawable/holo_list_selector_deselected" >
+ android:background="@drawable/holo_list_selector_deselected"
+ android:orientation="horizontal" >
<com.cyanogenmod.filemanager.ui.widgets.TransparentNonFocusableButtonItem
android:id="@+id/navigation_view_item_check"
android:layout_width="@dimen/item_menu_row_button_width"
android:layout_height="match_parent"
- android:layout_alignParentLeft="true"
android:contentDescription="@null"
android:src="@drawable/btn_holo_light_check_off_normal" />
@@ -32,30 +32,20 @@
android:id="@+id/navigation_view_item_icon"
android:layout_width="@dimen/default_row_height"
android:layout_height="@dimen/default_row_height"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@id/navigation_view_item_check"
- android:layout_alignWithParentIfMissing="true"
+ android:layout_gravity="center_vertical"
android:scaleType="centerInside"
android:contentDescription="@null"
android:src="@null" />
- <RelativeLayout
- android:layout_width="match_parent"
+ <TextView
+ android:id="@+id/navigation_view_item_name"
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_toRightOf="@id/navigation_view_item_icon"
- android:layout_marginRight="@dimen/extra_margin" >
-
- <TextView
- android:id="@+id/navigation_view_item_name"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:layout_marginLeft="@dimen/small_margin"
- android:gravity="left|center_vertical"
- android:singleLine="true"
- android:textAppearance="@style/primary_text_appearance" />
- </RelativeLayout>
-
-</RelativeLayout>
+ android:layout_weight="1"
+ android:layout_marginLeft="@dimen/small_margin"
+ android:layout_marginRight="@dimen/extra_margin"
+ android:gravity="left|center_vertical"
+ android:singleLine="true"
+ android:textAppearance="@style/primary_text_appearance" />
+
+</LinearLayout>