aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-10-24 14:53:24 +0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-10-26 17:16:27 -0700
commitde844c23749b249aefa8c1c9e6ae345971978643 (patch)
tree23bed0d53f4495c9de2738a67627fd8fb6e371ac
parentf35a631ff98b1f9c3f4da048a7d1204f8d420050 (diff)
downloadandroid_packages_apps_CMFileManager-de844c23749b249aefa8c1c9e6ae345971978643.tar.gz
android_packages_apps_CMFileManager-de844c23749b249aefa8c1c9e6ae345971978643.tar.bz2
android_packages_apps_CMFileManager-de844c23749b249aefa8c1c9e6ae345971978643.zip
Revert "CMFM: Fix landscape/rotation issues in file system info dialog"
The original commit is incomplete, and either causes 2 overlapping disk usage graphs to be drawn upon device rotation, or causes the disk usage graph to be improperly sized upon device rotation.. Revert the commit to bring in CAF's fixes for the original issue, which does not exhibit the issue mentioned above. This reverts commit c25f3b995f410883856929972096c8e375cd5377. Change-Id: Ie699b17e07d4ea2b04b03181fe13c6d93ef5da62
-rw-r--r--res/layout/filesystem_info_dialog.xml548
-rwxr-xr-xsrc/com/cyanogenmod/filemanager/activities/NavigationActivity.java11
-rw-r--r--src/com/cyanogenmod/filemanager/ui/dialogs/FilesystemInfoDialog.java30
3 files changed, 268 insertions, 321 deletions
diff --git a/res/layout/filesystem_info_dialog.xml b/res/layout/filesystem_info_dialog.xml
index 9f83578b..596a0266 100644
--- a/res/layout/filesystem_info_dialog.xml
+++ b/res/layout/filesystem_info_dialog.xml
@@ -15,367 +15,355 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
<!-- Tabs -->
<LinearLayout
- android:id="@+id/filesystem_tabs"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
+ android:id="@+id/filesystem_tabs"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
<LinearLayout
- android:id="@+id/filesystem_info_dialog_tabhost"
- android:layout_width="match_parent"
- android:layout_height="@dimen/default_row_height"
- android:orientation="horizontal" >
+ android:id="@+id/filesystem_info_dialog_tabhost"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/default_row_height"
+ android:orientation="horizontal" >
<TextView
- android:id="@+id/filesystem_info_dialog_tab_info"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/material_selector"
- android:clickable="true"
- android:gravity="center_horizontal|center_vertical"
- android:text="@string/filesystem_info_dialog_tab_info"
- android:textAllCaps="true"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_dialog_tab_info"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/material_selector"
+ android:clickable="true"
+ android:gravity="center_horizontal|center_vertical"
+ android:text="@string/filesystem_info_dialog_tab_info"
+ android:textAllCaps="true"
+ android:textAppearance="@style/primary_text_appearance" />
<include
- android:id="@+id/filesystem_info_dialog_tab_divider1"
- layout="@layout/horizontal_divider" />
+ android:id="@+id/filesystem_info_dialog_tab_divider1"
+ layout="@layout/horizontal_divider" />
<TextView
- android:id="@+id/filesystem_info_dialog_tab_disk_usage"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/material_selector"
- android:clickable="true"
- android:gravity="center_horizontal|center_vertical"
- android:text="@string/filesystem_info_dialog_tab_disk_usage"
- android:textAllCaps="true"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_dialog_tab_disk_usage"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/material_selector"
+ android:clickable="true"
+ android:gravity="center_horizontal|center_vertical"
+ android:text="@string/filesystem_info_dialog_tab_disk_usage"
+ android:textAllCaps="true"
+ android:textAppearance="@style/primary_text_appearance" />
</LinearLayout>
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
<include
- android:id="@+id/filesystem_info_dialog_tab_divider2"
- layout="@layout/vertical_divider" />
+ android:id="@+id/filesystem_info_dialog_tab_divider2"
+ layout="@layout/vertical_divider" />
</LinearLayout>
</LinearLayout>
<!-- Info -->
<ScrollView
- android:id="@+id/filesystem_tab_info"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/filesystem_tabs"
- android:paddingBottom="@dimen/extra_large_margin"
- android:paddingTop="@dimen/default_margin"
- android:scrollbars="vertical">
+ android:id="@+id/filesystem_tab_info"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/filesystem_tabs"
+ android:paddingBottom="@dimen/extra_large_margin"
+ android:paddingTop="@dimen/default_margin"
+ android:scrollbars="vertical">
<TableLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:shrinkColumns="1" >
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:shrinkColumns="1" >
<!-- Status -->
<TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
<TextView
- android:id="@+id/filesystem_info_status_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_status"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_status_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_status"
+ android:textAppearance="@style/primary_text_appearance" />
<Switch
- android:id="@+id/filesystem_info_status"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="start"
- android:layout_margin="@dimen/default_margin"
- android:textOff="@string/mount_point_readonly"
- android:textOn="@string/mount_point_readwrite" />
+ android:id="@+id/filesystem_info_status"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start"
+ android:layout_margin="@dimen/default_margin"
+ android:textOff="@string/mount_point_readonly"
+ android:textOn="@string/mount_point_readwrite" />
</TableRow>
<!-- Mount Point -->
<TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
<TextView
- android:id="@+id/filesystem_info_mount_point_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_mount_point"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_mount_point_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_mount_point"
+ android:textAppearance="@style/primary_text_appearance" />
<TextView
- android:id="@+id/filesystem_info_mount_point"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:paddingEnd="@dimen/double_margin"
- android:gravity="start|center_vertical"
- android:singleLine="false"
- android:textAppearance="@style/secondary_text_appearance" />
+ android:id="@+id/filesystem_info_mount_point"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:paddingEnd="@dimen/double_margin"
+ android:gravity="start|center_vertical"
+ android:singleLine="false"
+ android:textAppearance="@style/secondary_text_appearance" />
</TableRow>
<!-- Device -->
<TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
<TextView
- android:id="@+id/filesystem_info_device_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_device"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_device_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_device"
+ android:textAppearance="@style/primary_text_appearance" />
<TextView
- android:id="@+id/filesystem_info_device"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:paddingEnd="@dimen/double_margin"
- android:gravity="start|center_vertical"
- android:singleLine="false"
- android:textAppearance="@style/secondary_text_appearance" />
+ android:id="@+id/filesystem_info_device"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:paddingEnd="@dimen/double_margin"
+ android:gravity="start|center_vertical"
+ android:singleLine="false"
+ android:textAppearance="@style/secondary_text_appearance" />
</TableRow>
<!-- Type -->
<TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
<TextView
- android:id="@+id/filesystem_info_type_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|top"
- android:text="@string/filesystem_info_dialog_type"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_type_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|top"
+ android:text="@string/filesystem_info_dialog_type"
+ android:textAppearance="@style/primary_text_appearance" />
<TextView
- android:id="@+id/filesystem_info_type"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:paddingEnd="@dimen/double_margin"
- android:gravity="start|center_vertical"
- android:singleLine="false"
- android:textAppearance="@style/secondary_text_appearance" />
+ android:id="@+id/filesystem_info_type"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:paddingEnd="@dimen/double_margin"
+ android:gravity="start|center_vertical"
+ android:singleLine="false"
+ android:textAppearance="@style/secondary_text_appearance" />
</TableRow>
<!-- Options -->
<TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
<TextView
- android:id="@+id/filesystem_info_options_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_options"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_options_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_options"
+ android:textAppearance="@style/primary_text_appearance" />
<TextView
- android:id="@+id/filesystem_info_options"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:paddingEnd="@dimen/double_margin"
- android:gravity="start|center_vertical"
- android:singleLine="false"
- android:maxLines="5"
- android:textAppearance="@style/secondary_text_appearance" />
+ android:id="@+id/filesystem_info_options"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:paddingEnd="@dimen/double_margin"
+ android:gravity="start|center_vertical"
+ android:singleLine="false"
+ android:maxLines="5"
+ android:textAppearance="@style/secondary_text_appearance" />
</TableRow>
<!-- Dump/Pass -->
<TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
<TextView
- android:id="@+id/filesystem_info_dump_pass_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_dump_pass"
- android:textAppearance="@style/primary_text_appearance" />
+ android:id="@+id/filesystem_info_dump_pass_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_dump_pass"
+ android:textAppearance="@style/primary_text_appearance" />
<TextView
- android:id="@+id/filesystem_info_dump_pass"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:paddingEnd="@dimen/double_margin"
- android:gravity="start|center_vertical"
- android:singleLine="false"
- android:textAppearance="@style/secondary_text_appearance" />
+ android:id="@+id/filesystem_info_dump_pass"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:paddingEnd="@dimen/double_margin"
+ android:gravity="start|center_vertical"
+ android:singleLine="false"
+ android:textAppearance="@style/secondary_text_appearance" />
</TableRow>
<!-- Info message -->
<TextView
- android:id="@+id/filesystem_info_msg"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin"
- android:contentDescription="@null"
- android:drawableStart="@drawable/ic_material_light_fs_warning"
- android:drawablePadding="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:singleLine="false"
- android:background="@drawable/material_selector"
- android:text="@string/filesystem_info_mount_not_allowed_msg"
- android:textAppearance="@style/secondary_text_appearance"
- android:textSize="@dimen/note_text_size"
- android:visibility="gone" />
+ android:id="@+id/filesystem_info_msg"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin"
+ android:contentDescription="@null"
+ android:drawableStart="@drawable/ic_material_light_fs_warning"
+ android:drawablePadding="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:singleLine="false"
+ android:background="@drawable/material_selector"
+ android:text="@string/filesystem_info_mount_not_allowed_msg"
+ android:textAppearance="@style/secondary_text_appearance"
+ android:textSize="@dimen/note_text_size"
+ android:visibility="gone" />
</TableLayout>
</ScrollView>
<!-- Disk Usage -->
- <ScrollView
- android:id="@+id/filesystem_tab_diskusage"
+ <LinearLayout
+ android:id="@+id/filesystem_tab_diskusage"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/filesystem_tabs"
+ android:visibility="gone" >
+
+ <com.cyanogenmod.filemanager.ui.widgets.DiskUsageGraph
+ android:id="@+id/filesystem_disk_usage_graph"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight=".30"
+ android:layout_margin="@dimen/extra_large_margin" />
+
+ <TableLayout
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight=".70"
+ android:layout_gravity="start|center_vertical"
+ android:paddingBottom="@dimen/extra_large_margin"
+ android:paddingTop="@dimen/default_margin"
+ android:shrinkColumns="1" >
+
+ <!-- Total -->
+ <TableRow
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
+
+ <TextView
+ android:id="@+id/filesystem_info_total_disk_usage_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/filesystem_tabs"
- android:scrollbars="vertical"
- android:visibility="gone">
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_total_disk_usage"
+ android:textAppearance="@style/primary_text_appearance" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <com.cyanogenmod.filemanager.ui.widgets.DiskUsageGraph
- android:id="@+id/filesystem_disk_usage_graph"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight=".30"
- android:layout_margin="@dimen/extra_large_margin" />
-
- <TableLayout
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight=".70"
- android:layout_gravity="start|center_vertical"
- android:paddingBottom="@dimen/extra_large_margin"
- android:paddingTop="@dimen/default_margin"
- android:shrinkColumns="1" >
-
- <!-- Total -->
- <TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
-
- <TextView
- android:id="@+id/filesystem_info_total_disk_usage_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_total_disk_usage"
- android:textAppearance="@style/primary_text_appearance" />
-
- <TextView
- android:id="@+id/filesystem_info_total_disk_usage"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:textAppearance="@style/secondary_text_appearance" />
- </TableRow>
-
- <!-- Used -->
- <TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
-
- <TextView
- android:id="@+id/filesystem_info_used_disk_usage_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_used_disk_usage"
- android:textAppearance="@style/primary_text_appearance" />
-
- <TextView
- android:id="@+id/filesystem_info_used_disk_usage"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:textAppearance="@style/secondary_text_appearance" />
- </TableRow>
-
- <!-- Free -->
- <TableRow
- android:layout_marginStart="@dimen/extra_large_margin"
- android:layout_marginEnd="@dimen/extra_large_margin" >
-
- <TextView
- android:id="@+id/filesystem_info_free_disk_usage_label"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:text="@string/filesystem_info_dialog_free_disk_usage"
- android:textAppearance="@style/primary_text_appearance" />
-
- <TextView
- android:id="@+id/filesystem_info_free_disk_usage"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/default_margin"
- android:gravity="start|center_vertical"
- android:textAppearance="@style/secondary_text_appearance" />
- </TableRow>
- </TableLayout>
- </LinearLayout>
- <GridLayout
- android:id="@+id/ll_legend"
- android:gravity="center"
- android:layout_centerHorizontal="true"
- android:visibility="invisible"
- android:layout_below="@id/filesystem_tab_diskusage"
- android:orientation="horizontal"
- android:columnCount="4"
- android:columnOrderPreserved="true"
- android:rowOrderPreserved="true"
- android:useDefaultMargins="true"
- android:padding="@dimen/legend_padding"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
- </LinearLayout>
+ <TextView
+ android:id="@+id/filesystem_info_total_disk_usage"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:textAppearance="@style/secondary_text_appearance" />
+ </TableRow>
- </ScrollView>
+ <!-- Used -->
+ <TableRow
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
+
+ <TextView
+ android:id="@+id/filesystem_info_used_disk_usage_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_used_disk_usage"
+ android:textAppearance="@style/primary_text_appearance" />
+
+ <TextView
+ android:id="@+id/filesystem_info_used_disk_usage"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:textAppearance="@style/secondary_text_appearance" />
+ </TableRow>
+
+ <!-- Free -->
+ <TableRow
+ android:layout_marginStart="@dimen/extra_large_margin"
+ android:layout_marginEnd="@dimen/extra_large_margin" >
+
+ <TextView
+ android:id="@+id/filesystem_info_free_disk_usage_label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:text="@string/filesystem_info_dialog_free_disk_usage"
+ android:textAppearance="@style/primary_text_appearance" />
+
+ <TextView
+ android:id="@+id/filesystem_info_free_disk_usage"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/default_margin"
+ android:gravity="start|center_vertical"
+ android:textAppearance="@style/secondary_text_appearance" />
+ </TableRow>
+ </TableLayout>
+ </LinearLayout>
+
+ <GridLayout
+ android:id="@+id/ll_legend"
+ android:gravity="center"
+ android:layout_centerHorizontal="true"
+ android:visibility="invisible"
+ android:layout_below="@id/filesystem_tab_diskusage"
+ android:orientation="horizontal"
+ android:columnCount="4"
+ android:columnOrderPreserved="true"
+ android:rowOrderPreserved="true"
+ android:useDefaultMargins="true"
+ android:padding="@dimen/legend_padding"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
</RelativeLayout>
diff --git a/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java b/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java
index fa165c4c..8c234ed0 100755
--- a/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java
+++ b/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java
@@ -206,7 +206,6 @@ public class NavigationActivity extends Activity
private SearchView mSearchView;
private NavigationCustomTitleView mCustomTitleView;
private InputMethodManager mImm;
- private FilesystemInfoDialog.OnConfigChangeListener mOnConfigChangeListener;
private ListPopupWindow mPopupWindow;
private ActionsDialog mActionsDialog;
@@ -807,9 +806,6 @@ public class NavigationActivity extends Activity
mDrawerToggle.onConfigurationChanged(newConfig);
}
}
- if (mActiveDialog != null && mOnConfigChangeListener != null) {
- mOnConfigChangeListener.onConfigurationChanged(newConfig);
- }
NavigationView navView = getCurrentNavigationView();
if (navView != null) {
navView.refreshViewMode();
@@ -2306,13 +2302,6 @@ public class NavigationActivity extends Activity
}
}
});
- mOnConfigChangeListener = dialog.getOnConfigChangeListener();
- dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
- @Override
- public void onDismiss(DialogInterface dialog) {
- mOnConfigChangeListener = null;
- }
- });
dialog.show();
}
diff --git a/src/com/cyanogenmod/filemanager/ui/dialogs/FilesystemInfoDialog.java b/src/com/cyanogenmod/filemanager/ui/dialogs/FilesystemInfoDialog.java
index 235ae45c..318f69e7 100644
--- a/src/com/cyanogenmod/filemanager/ui/dialogs/FilesystemInfoDialog.java
+++ b/src/com/cyanogenmod/filemanager/ui/dialogs/FilesystemInfoDialog.java
@@ -19,7 +19,6 @@ package com.cyanogenmod.filemanager.ui.dialogs;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
-import android.content.res.Configuration;
import android.database.Cursor;
import android.util.Log;
import android.view.LayoutInflater;
@@ -158,11 +157,6 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis
}
- public interface OnConfigChangeListener {
- void onConfigurationChanged(Configuration newConfig);
- }
-
-
private static final String TAG = "FilesystemInfoDialog"; //$NON-NLS-1$
@@ -193,22 +187,6 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis
private final boolean mIsAdvancedMode;
private boolean mIsInUsageTab = false;
- private final OnConfigChangeListener mOnConfigChangeListener = new OnConfigChangeListener() {
- @Override
- public void onConfigurationChanged(Configuration newConfig) {
- if (mDiskUsageGraph != null) {
- populateLegend();
- mDiskUsageGraph.post(new Runnable() {
- @Override
- public void run() {
- //Animate disk usage graph
- FilesystemInfoDialog.this.mDiskUsageGraph.drawDiskUsage(mDiskUsage);
- }
- });
- }
- }
- };
-
/**
* Constructor of <code>FilesystemInfoDialog</code>.
*
@@ -270,14 +248,6 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis
this.mOnMountListener = onMountListener;
}
- public OnConfigChangeListener getOnConfigChangeListener() {
- return mOnConfigChangeListener;
- }
-
- public void setOnDismissListener(final DialogInterface.OnDismissListener listener) {
- mDialog.setOnDismissListener(listener);
- }
-
/**
* Method that fill the dialog with the data of the mount point.
*