Merge pull request #1871 from runnerway/ui-01
Minor UI improvements and cleanup
This commit is contained in:
@@ -30,7 +30,6 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.EditTextPreference;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
@@ -211,9 +210,6 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
initializePassphraseCacheSubs(
|
||||
(CheckBoxPreference) findPreference(Constants.Pref.PASSPHRASE_CACHE_SUBS));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,15 +587,4 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||
|| ExperimentalPrefsFragment.class.getName().equals(fragmentName)
|
||||
|| super.isValidFragment(fragmentName);
|
||||
}
|
||||
|
||||
private static void initializePassphraseCacheSubs(final CheckBoxPreference mPassphraseCacheSubs) {
|
||||
mPassphraseCacheSubs.setChecked(sPreferences.getPassphraseCacheSubs());
|
||||
mPassphraseCacheSubs.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
mPassphraseCacheSubs.setChecked((Boolean) newValue);
|
||||
sPreferences.setPassphraseCacheSubs((Boolean) newValue);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,12 +107,6 @@ public class Preferences {
|
||||
return mSharedPreferences.getBoolean(Pref.PASSPHRASE_CACHE_SUBS, false);
|
||||
}
|
||||
|
||||
public void setPassphraseCacheSubs(boolean value) {
|
||||
SharedPreferences.Editor editor = mSharedPreferences.edit();
|
||||
editor.putBoolean(Pref.PASSPHRASE_CACHE_SUBS, value);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
public boolean getCachedConsolidate() {
|
||||
return mSharedPreferences.getBoolean(Pref.CACHED_CONSOLIDATE, false);
|
||||
}
|
||||
|
||||
@@ -10,12 +10,11 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="24dp">
|
||||
android:paddingTop="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dip"
|
||||
android:text="@string/backup_text"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
@@ -36,8 +35,6 @@
|
||||
android:drawableRight="@drawable/ic_save_grey_24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="@string/backup_all"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
@@ -56,8 +53,6 @@
|
||||
android:drawableRight="@drawable/ic_save_grey_24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="@string/backup_public_keys"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
@@ -78,16 +73,9 @@
|
||||
android:drawableRight="@drawable/ic_folder_grey_24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="@string/btn_decrypt_files"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@@ -8,33 +7,29 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
android:paddingTop="16dp">
|
||||
|
||||
<TextView
|
||||
style="@style/SectionHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/section_encrypt" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/encrypt_files"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:clickable="true"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:text="@string/btn_encrypt_files"
|
||||
android:drawableRight="@drawable/ic_folder_grey_24dp"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical" />
|
||||
android:drawableRight="@drawable/ic_folder_grey_24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:text="@string/btn_encrypt_files"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -43,23 +38,16 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/encrypt_text"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:clickable="true"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:text="@string/btn_encrypt_text"
|
||||
android:drawableRight="@drawable/ic_comment_text_grey600_24dp"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
android:drawableRight="@drawable/ic_comment_text_grey600_24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:text="@string/btn_encrypt_text"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
style="@style/SectionHeader"
|
||||
@@ -70,18 +58,16 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/decrypt_files"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:clickable="true"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:text="@string/btn_decrypt_files"
|
||||
android:drawableRight="@drawable/ic_folder_grey_24dp"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical" />
|
||||
android:drawableRight="@drawable/ic_folder_grey_24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:text="@string/btn_decrypt_files"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -90,38 +76,31 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/decrypt_from_clipboard"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
android:clickable="true"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="0dp"
|
||||
tools:ignore="UseCompoundDrawables">
|
||||
|
||||
<TextView
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/btn_decrypt_clipboard" />
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_decrypt_clipboard"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/clipboard_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_content_paste_grey_24dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:src="@drawable/ic_content_paste_grey_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider"
|
||||
android:layout_marginBottom="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
@@ -5,17 +5,13 @@
|
||||
android:key="search_keyserver_pref"
|
||||
android:summary="@string/pref_keyserver_summary"
|
||||
android:title="@string/pref_keyserver" />
|
||||
|
||||
<PreferenceScreen
|
||||
android:dependency="search_keyserver_pref"
|
||||
android:key="keyServers"
|
||||
android:persistent="false"
|
||||
android:title="@string/label_keyservers" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="search_keybase_pref"
|
||||
android:summary="@string/pref_keybase_summary"
|
||||
android:title="@string/pref_keybase" />
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -1,15 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen
|
||||
android:key="passphraseCacheTtls"
|
||||
android:persistent="false"
|
||||
android:title="@string/label_passphrase_cache_ttl" />
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="passphraseCacheSubs"
|
||||
android:persistent="true"
|
||||
android:title="@string/label_passphrase_cache_subs" />
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="useNumKeypadForYubikeyPin"
|
||||
android:persistent="true"
|
||||
android:title="@string/label_use_num_keypad_for_security_token_pin" />
|
||||
</PreferenceScreen>
|
||||
|
||||
Reference in New Issue
Block a user