Loading res/layout/filesystem_info_dialog.xml +280 −268 Original line number Diff line number Diff line Loading @@ -257,13 +257,23 @@ </ScrollView> <!-- Disk Usage --> <LinearLayout <ScrollView android:id="@+id/filesystem_tab_diskusage" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/filesystem_tabs" android:scrollbars="vertical" android:visibility="gone"> <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" Loading Loading @@ -350,7 +360,6 @@ </TableRow> </TableLayout> </LinearLayout> <GridLayout android:id="@+id/ll_legend" android:gravity="center" Loading @@ -365,5 +374,8 @@ android:padding="@dimen/legend_padding" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> </ScrollView> </RelativeLayout> src/com/cyanogenmod/filemanager/activities/NavigationActivity.java +11 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ public class NavigationActivity extends Activity private SearchView mSearchView; private NavigationCustomTitleView mCustomTitleView; private InputMethodManager mImm; private FilesystemInfoDialog.OnConfigChangeListener mOnConfigChangeListener; private final BroadcastReceiver mNotificationReceiver = new BroadcastReceiver() { @Override Loading Loading @@ -798,6 +799,9 @@ public class NavigationActivity extends Activity mDrawerToggle.onConfigurationChanged(newConfig); } } if (mActiveDialog != null && mOnConfigChangeListener != null) { mOnConfigChangeListener.onConfigurationChanged(newConfig); } } /** Loading Loading @@ -2285,6 +2289,13 @@ public class NavigationActivity extends Activity } } }); mOnConfigChangeListener = dialog.getOnConfigChangeListener(); dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { mOnConfigChangeListener = null; } }); dialog.show(); } Loading src/com/cyanogenmod/filemanager/ui/dialogs/FilesystemInfoDialog.java +30 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ 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; Loading Loading @@ -157,6 +158,11 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis } public interface OnConfigChangeListener { void onConfigurationChanged(Configuration newConfig); } private static final String TAG = "FilesystemInfoDialog"; //$NON-NLS-1$ Loading Loading @@ -187,6 +193,22 @@ 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>. * Loading Loading @@ -248,6 +270,14 @@ 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. * Loading Loading
res/layout/filesystem_info_dialog.xml +280 −268 Original line number Diff line number Diff line Loading @@ -257,13 +257,23 @@ </ScrollView> <!-- Disk Usage --> <LinearLayout <ScrollView android:id="@+id/filesystem_tab_diskusage" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/filesystem_tabs" android:scrollbars="vertical" android:visibility="gone"> <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" Loading Loading @@ -350,7 +360,6 @@ </TableRow> </TableLayout> </LinearLayout> <GridLayout android:id="@+id/ll_legend" android:gravity="center" Loading @@ -365,5 +374,8 @@ android:padding="@dimen/legend_padding" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> </ScrollView> </RelativeLayout>
src/com/cyanogenmod/filemanager/activities/NavigationActivity.java +11 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ public class NavigationActivity extends Activity private SearchView mSearchView; private NavigationCustomTitleView mCustomTitleView; private InputMethodManager mImm; private FilesystemInfoDialog.OnConfigChangeListener mOnConfigChangeListener; private final BroadcastReceiver mNotificationReceiver = new BroadcastReceiver() { @Override Loading Loading @@ -798,6 +799,9 @@ public class NavigationActivity extends Activity mDrawerToggle.onConfigurationChanged(newConfig); } } if (mActiveDialog != null && mOnConfigChangeListener != null) { mOnConfigChangeListener.onConfigurationChanged(newConfig); } } /** Loading Loading @@ -2285,6 +2289,13 @@ public class NavigationActivity extends Activity } } }); mOnConfigChangeListener = dialog.getOnConfigChangeListener(); dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { mOnConfigChangeListener = null; } }); dialog.show(); } Loading
src/com/cyanogenmod/filemanager/ui/dialogs/FilesystemInfoDialog.java +30 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ 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; Loading Loading @@ -157,6 +158,11 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis } public interface OnConfigChangeListener { void onConfigurationChanged(Configuration newConfig); } private static final String TAG = "FilesystemInfoDialog"; //$NON-NLS-1$ Loading Loading @@ -187,6 +193,22 @@ 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>. * Loading Loading @@ -248,6 +270,14 @@ 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. * Loading