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