mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Storage selection dialog works in nightmode #463
This commit is contained in:
parent
75a1c3fa0e
commit
4014b24474
@ -50,7 +50,7 @@ dependencies {
|
||||
compile 'io.reactivex:rxandroid:1.1.0'
|
||||
compile 'io.reactivex:rxjava:1.1.3'
|
||||
|
||||
compile 'eu.mhutti1.utils.storage:android-storage-devices:0.4.7'
|
||||
compile 'eu.mhutti1.utils.storage:android-storage-devices:0.4.8'
|
||||
compile 'com.jakewharton:butterknife:8.0.1'
|
||||
apt 'com.jakewharton:butterknife-compiler:8.0.1'
|
||||
|
||||
|
@ -50,6 +50,7 @@ import org.kiwix.kiwixmobile.library.LibraryAdapter;
|
||||
import org.kiwix.kiwixmobile.library.entity.LibraryNetworkEntity;
|
||||
import org.kiwix.kiwixmobile.network.KiwixService;
|
||||
import org.kiwix.kiwixmobile.utils.StorageUtils;
|
||||
import org.kiwix.kiwixmobile.utils.StyleUtils;
|
||||
|
||||
import eu.mhutti1.utils.storage.StorageDevice;
|
||||
import eu.mhutti1.utils.storage.StorageSelectDialog;
|
||||
@ -203,8 +204,9 @@ public class LibraryFragment extends Fragment implements AdapterView.OnItemClick
|
||||
FragmentManager fm = getFragmentManager();
|
||||
StorageSelectDialog dialogFragment = new StorageSelectDialog();
|
||||
Bundle b = new Bundle();
|
||||
b.putString("INTERNAL", getResources().getString(R.string.internal_storage));
|
||||
b.putString("EXTERNAL", getResources().getString(R.string.external_storage));
|
||||
b.putString(StorageSelectDialog.STORAGE_DIALOG_INTERNAL, getResources().getString(R.string.internal_storage));
|
||||
b.putString(StorageSelectDialog.STORAGE_DIALOG_EXTERNAL, getResources().getString(R.string.external_storage));
|
||||
b.putInt(StorageSelectDialog.STORAGE_DIALOG_THEME, StyleUtils.dialogStyle());
|
||||
dialogFragment.setArguments(b);
|
||||
dialogFragment.setOnSelectListener(this);
|
||||
dialogFragment.show(fm, getResources().getString(R.string.pref_storage));
|
||||
|
@ -51,6 +51,7 @@ import org.kiwix.kiwixmobile.database.KiwixDatabase;
|
||||
import org.kiwix.kiwixmobile.database.RecentSearchDao;
|
||||
import org.kiwix.kiwixmobile.utils.DimenUtils;
|
||||
import org.kiwix.kiwixmobile.utils.LanguageUtils;
|
||||
import org.kiwix.kiwixmobile.utils.StyleUtils;
|
||||
import org.kiwix.kiwixmobile.views.SliderPreference;
|
||||
|
||||
import static org.kiwix.kiwixmobile.utils.StyleUtils.dialogStyle;
|
||||
@ -261,6 +262,7 @@ public class KiwixSettingsActivity extends AppCompatActivity {
|
||||
}
|
||||
if (key.equals(PREF_NIGHTMODE)) {
|
||||
KiwixMobileActivity.refresh = true;
|
||||
KiwixMobileActivity.nightMode = sharedPreferences.getBoolean(PREF_NIGHTMODE, false);
|
||||
getActivity().recreate();
|
||||
}
|
||||
|
||||
@ -312,8 +314,9 @@ public class KiwixSettingsActivity extends AppCompatActivity {
|
||||
FragmentManager fm = getFragmentManager();
|
||||
StorageSelectDialog dialogFragment = new StorageSelectDialog();
|
||||
Bundle b = new Bundle();
|
||||
b.putString("INTERNAL", getResources().getString(R.string.internal_storage));
|
||||
b.putString("EXTERNAL", getResources().getString(R.string.external_storage));
|
||||
b.putString(StorageSelectDialog.STORAGE_DIALOG_INTERNAL, getResources().getString(R.string.internal_storage));
|
||||
b.putString(StorageSelectDialog.STORAGE_DIALOG_EXTERNAL, getResources().getString(R.string.external_storage));
|
||||
b.putInt(StorageSelectDialog.STORAGE_DIALOG_THEME, StyleUtils.dialogStyle());
|
||||
dialogFragment.setArguments(b);
|
||||
dialogFragment.setOnSelectListener(this);
|
||||
dialogFragment.show(fm, getResources().getString(R.string.pref_storage));
|
||||
|
Loading…
x
Reference in New Issue
Block a user