remove the option to show the full path

This commit is contained in:
tibbi 2016-10-30 19:11:06 +01:00
parent b425ab9a34
commit 261ed5eeac
11 changed files with 1 additions and 71 deletions

View file

@ -37,12 +37,4 @@ public class Config {
public void setShowHidden(boolean show) {
mPrefs.edit().putBoolean(Constants.SHOW_HIDDEN, show).apply();
}
public boolean getShowFullPath() {
return mPrefs.getBoolean(Constants.SHOW_FULL_PATH, false);
}
public void setShowFullPath(boolean show) {
mPrefs.edit().putBoolean(Constants.SHOW_FULL_PATH, show).apply();
}
}

View file

@ -8,5 +8,4 @@ public class Constants {
public static final String IS_FIRST_RUN = "is_first_run";
public static final String IS_DARK_THEME = "is_dark_theme";
public static final String SHOW_HIDDEN = "show_hidden";
public static final String SHOW_FULL_PATH = "show_full_path";
}

View file

@ -14,7 +14,6 @@ import butterknife.OnClick;
public class SettingsActivity extends SimpleActivity {
@BindView(R.id.settings_dark_theme) SwitchCompat mDarkThemeSwitch;
@BindView(R.id.settings_show_hidden) SwitchCompat mShowHiddenSwitch;
@BindView(R.id.settings_show_full_path) SwitchCompat mShowFullPathSwitch;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -25,7 +24,6 @@ public class SettingsActivity extends SimpleActivity {
setupDarkTheme();
setupShowHidden();
setupShowFullPath();
}
private void setupDarkTheme() {
@ -36,10 +34,6 @@ public class SettingsActivity extends SimpleActivity {
mShowHiddenSwitch.setChecked(mConfig.getShowHidden());
}
private void setupShowFullPath() {
mShowFullPathSwitch.setChecked(mConfig.getShowFullPath());
}
@OnClick(R.id.settings_dark_theme_holder)
public void handleDarkTheme() {
mDarkThemeSwitch.setChecked(!mDarkThemeSwitch.isChecked());
@ -53,12 +47,6 @@ public class SettingsActivity extends SimpleActivity {
mConfig.setShowHidden(mShowHiddenSwitch.isChecked());
}
@OnClick(R.id.settings_show_full_path_holder)
public void handleShowFullPath() {
mShowFullPathSwitch.setChecked(!mShowFullPathSwitch.isChecked());
mConfig.setShowFullPath(mShowFullPathSwitch.isChecked());
}
private void restartActivity() {
TaskStackBuilder.create(getApplicationContext()).addNextIntentWithParentStack(getIntent()).startActivities();
}

View file

@ -28,22 +28,6 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
tryInitFileManager()
}
override fun onResume() {
super.onResume()
if (Utils.hasStoragePermission(applicationContext)) {
val showFullPath = mConfig!!.showFullPath
if (showFullPath != mShowFullPath)
initRootFileManager()
mShowFullPath = showFullPath
}
}
override fun onPause() {
super.onPause()
mShowFullPath = mConfig!!.showFullPath
}
override fun onDestroy() {
super.onDestroy()
mConfig.isFirstRun = false
@ -142,7 +126,6 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
private val STORAGE_PERMISSION = 1
private val BACK_PRESS_TIMEOUT = 5000
private var mShowFullPath: Boolean = false
private var mWasBackJustPressed: Boolean = false
}
}

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/settings_scrollview"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/settings_scrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -62,31 +62,5 @@
android:clickable="false"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_show_full_path_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_padding"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin">
<TextView
android:id="@+id/settings_show_full_path_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingLeft="@dimen/settings_padding"
android:text="@string/show_full_path"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/settings_show_full_path"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@null"
android:clickable="false"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>

View file

@ -79,5 +79,4 @@
<string name="settings">Einstellungen</string>
<string name="dark_theme">Dunkles Design</string>
<string name="show_hidden">Zeige versteckte Dateien und Ordner</string>
<string name="show_full_path">Zeige ganzen Dateipfad</string>
</resources>

View file

@ -79,5 +79,4 @@
<string name="settings">Impostazioni</string>
<string name="dark_theme">Tema scuro</string>
<string name="show_hidden">Mostra file e cartelle nascosti</string>
<string name="show_full_path">Mostra percorso completo</string>
</resources>

View file

@ -79,5 +79,4 @@
<string name="settings">設定</string>
<string name="dark_theme">ダークテーマ</string>
<string name="show_hidden">非表示のファイルとディレクトリーを表示する</string>
<string name="show_full_path">Show full path</string>
</resources>

View file

@ -79,5 +79,4 @@
<string name="settings">Definições</string>
<string name="dark_theme">Tema escuro</string>
<string name="show_hidden">Mostrar ficheiros e pastas ocultos</string>
<string name="show_full_path">Mostrar caminho completo</string>
</resources>

View file

@ -79,5 +79,4 @@
<string name="settings">Settings</string>
<string name="dark_theme">Mörkt tema</string>
<string name="show_hidden">Visa dolda filer</string>
<string name="show_full_path">Show full path</string>
</resources>

View file

@ -82,5 +82,4 @@
<string name="settings">Settings</string>
<string name="dark_theme">Dark theme</string>
<string name="show_hidden">Show hidden files and directories</string>
<string name="show_full_path">Show full path</string>
</resources>