From f1c844fed0fdf898fd6d027529cb2570eb52bec5 Mon Sep 17 00:00:00 2001 From: brainbreaker Date: Wed, 8 Feb 2017 01:38:40 +0530 Subject: Explorer File View option in Settings working now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explorer file view option in Settings is working now. To listen to the preference updates in the app a custom class SettingsListernerModel has been added. SettingsListenerModel.java file contains the methods to instantiate and set OnSettingPreferenceChangedListener in the implementing class. LibreOfficeUIActivity implements this listener and it is triggered by onSharedPreferenceChanged() method in SettingsActivity. This class can also be used to listen to other preference changes in Settings. Change-Id: I063024df01cf183d2a6211648e32805795af20a9 Reviewed-on: https://gerrit.libreoffice.org/34012 Reviewed-by: Aleksandar Stefanović Tested-by: Aleksandar Stefanović --- android/source/res/menu/view_menu.xml | 9 ---- android/source/res/xml/libreoffice_preferences.xml | 2 +- .../src/java/org/libreoffice/SettingsActivity.java | 25 ++++++++-- .../org/libreoffice/SettingsListenerModel.java | 56 ++++++++++++++++++++++ .../org/libreoffice/ui/LibreOfficeUIActivity.java | 42 +++++----------- 5 files changed, 90 insertions(+), 44 deletions(-) create mode 100644 android/source/src/java/org/libreoffice/SettingsListenerModel.java (limited to 'android') diff --git a/android/source/res/menu/view_menu.xml b/android/source/res/menu/view_menu.xml index fe28da2cf701..3c0003b96fe0 100644 --- a/android/source/res/menu/view_menu.xml +++ b/android/source/res/menu/view_menu.xml @@ -7,24 +7,15 @@ android:title="@string/sort" android:icon="@drawable/ic_sort_black_24dp" app:showAsAction="ifRoom"> - - - - - - - - + android:summary="View files as a grid or in a list."/>