mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-24 01:32:16 -05:00
More UI rework
This commit is contained in:
parent
0706005732
commit
0e83df21cf
@ -88,14 +88,14 @@ public final class Constants {
|
||||
|
||||
public static final class DrawerItems {
|
||||
public static final Class KEY_LIST = KeyListActivity.class;
|
||||
public static final Class ENCRYPT_FILE = EncryptFileActivity.class;
|
||||
public static final Class ENCRYPT_TEXT = EncryptTextActivity.class;
|
||||
public static final Class ENCRYPT_FILE = EncryptFileActivity.class;
|
||||
public static final Class DECRYPT = DecryptActivity.class;
|
||||
public static final Class REGISTERED_APPS_LIST = AppsListActivity.class;
|
||||
public static final Class[] ARRAY = new Class[]{
|
||||
KEY_LIST,
|
||||
ENCRYPT_FILE,
|
||||
ENCRYPT_TEXT,
|
||||
ENCRYPT_FILE,
|
||||
DECRYPT,
|
||||
REGISTERED_APPS_LIST
|
||||
};
|
||||
|
@ -83,8 +83,8 @@ public class DrawerActivity extends ActionBarActivity {
|
||||
|
||||
NavItem mItemIconTexts[] = new NavItem[]{
|
||||
new NavItem(R.drawable.ic_action_person, getString(R.string.nav_keys)),
|
||||
new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt_files)),
|
||||
new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt_text)),
|
||||
new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt_files)),
|
||||
new NavItem(R.drawable.ic_action_not_secure, getString(R.string.nav_decrypt)),
|
||||
new NavItem(R.drawable.ic_action_view_as_list, getString(R.string.nav_apps))};
|
||||
|
||||
@ -248,7 +248,8 @@ public class DrawerActivity extends ActionBarActivity {
|
||||
|
||||
/**
|
||||
* NavItem constructor
|
||||
* @param icon The icons resource-id
|
||||
*
|
||||
* @param icon The icons resource-id
|
||||
* @param title The title of the menu entry
|
||||
*/
|
||||
public NavItem(int icon, String title) {
|
||||
|
@ -210,9 +210,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView {
|
||||
}
|
||||
|
||||
public String getPrimary() {
|
||||
if (mUserId[0] != null && mUserId[2] != null) {
|
||||
return mUserId[0] + " (" + mUserId[2] + ")";
|
||||
} else if (mUserId[0] != null) {
|
||||
if (mUserId[0] != null) {
|
||||
return mUserId[0];
|
||||
} else {
|
||||
return mUserId[1];
|
||||
@ -220,7 +218,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView {
|
||||
}
|
||||
|
||||
public String getSecondary() {
|
||||
if (mUserId[0] != null) {
|
||||
if (mUserId[1] != null) {
|
||||
return mUserId[1];
|
||||
} else {
|
||||
return getKeyIdHex();
|
||||
|
@ -133,7 +133,7 @@ public abstract class KeySpinner extends Spinner implements LoaderManager.Loader
|
||||
inner = new CursorAdapter(null, null, 0) {
|
||||
@Override
|
||||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
||||
return View.inflate(getContext(), R.layout.keyspinner_key, null);
|
||||
return View.inflate(getContext(), R.layout.keyspinner_item, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -210,7 +210,7 @@ public abstract class KeySpinner extends Spinner implements LoaderManager.Loader
|
||||
} else {
|
||||
v = convertView;
|
||||
}
|
||||
((TextView) v.findViewById(R.id.keyspinner_key_name)).setText("None");
|
||||
((TextView) v.findViewById(R.id.keyspinner_key_name)).setText(R.string.choice_none);
|
||||
v.findViewById(R.id.keyspinner_key_email).setVisibility(View.GONE);
|
||||
v.findViewById(R.id.keyspinner_key_id).setVisibility(View.GONE);
|
||||
} else {
|
||||
|
@ -41,19 +41,29 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_settings_settings" />
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/api_settings_key"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:padding="0dp"
|
||||
android:layout_margin="0dp">
|
||||
|
||||
<org.sufficientlysecure.keychain.ui.widget.SignKeySpinner
|
||||
android:id="@+id/api_account_settings_key_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
<TextView
|
||||
android:paddingLeft="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/api_settings_key"
|
||||
android:paddingRight="8dp" />
|
||||
|
||||
<org.sufficientlysecure.keychain.ui.widget.SignKeySpinner
|
||||
android:id="@+id/api_account_settings_key_spinner"
|
||||
android:minHeight="56dip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@ -67,9 +77,8 @@
|
||||
android:paddingRight="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/api_settings_create_key"
|
||||
android:minHeight="48dp"
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
android:drawableRight="@drawable/ic_action_new_account"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
@ -87,38 +96,71 @@
|
||||
custom:foldedLabel="@string/api_settings_show_advanced"
|
||||
custom:unFoldedLabel="@string/api_settings_hide_advanced">
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_encryption_algorithm"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:padding="0dp"
|
||||
android:layout_margin="0dp">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/api_account_settings_encryption_algorithm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:paddingLeft="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/label_encryption_algorithm"
|
||||
android:paddingRight="8dp" />
|
||||
|
||||
<TextView
|
||||
<Spinner
|
||||
android:id="@+id/api_account_settings_encryption_algorithm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_hash_algorithm"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:padding="0dp"
|
||||
android:layout_margin="0dp">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/api_account_settings_hash_algorithm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:paddingLeft="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/label_hash_algorithm"
|
||||
android:paddingRight="8dp" />
|
||||
|
||||
<TextView
|
||||
<Spinner
|
||||
android:id="@+id/api_account_settings_hash_algorithm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_message_compression"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:padding="0dp"
|
||||
android:layout_margin="0dp">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/api_account_settings_compression"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:paddingLeft="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/label_message_compression"
|
||||
android:paddingRight="8dp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/api_account_settings_compression"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</org.sufficientlysecure.keychain.ui.widget.FoldableLinearLayout>
|
||||
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
<TextView
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
@ -32,6 +30,7 @@
|
||||
|
||||
<org.sufficientlysecure.keychain.ui.widget.SignKeySpinner
|
||||
android:id="@+id/sign"
|
||||
android:minHeight="56dip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
@ -1,24 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/attachment_bg_holo">
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/attachment_bg_holo">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@android:id/text1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="4dp"/>
|
||||
android:id="@android:id/text1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="4dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="32dip"
|
||||
android:layout_height="32dip"
|
||||
android:layout_marginLeft="12dip"
|
||||
android:cropToPadding="true"
|
||||
android:background="#ccc"
|
||||
android:scaleType="centerCrop"/>
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="32dip"
|
||||
android:layout_height="32dip"
|
||||
android:layout_marginLeft="12dip"
|
||||
android:cropToPadding="true"
|
||||
android:background="#ccc"
|
||||
android:scaleType="centerCrop" />
|
||||
</LinearLayout>
|
@ -1,51 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dip"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dip"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="18sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
<TextView android:id="@android:id/title"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="18sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
<TextView android:id="@android:id/text1"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginTop="-4dip"/>
|
||||
<TextView android:id="@android:id/text2"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginTop="-4dip"/>
|
||||
android:paddingLeft="8dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginTop="-4dip" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text2"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:typeface="monospace"
|
||||
android:layout_marginTop="-4dip" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="56dip"
|
||||
android:layout_height="56dip"
|
||||
android:layout_marginLeft="12dip"
|
||||
android:cropToPadding="true"
|
||||
android:background="#ccc"
|
||||
android:scaleType="centerCrop"/>
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="56dip"
|
||||
android:layout_height="56dip"
|
||||
android:layout_marginLeft="12dip"
|
||||
android:cropToPadding="true"
|
||||
android:background="#ccc"
|
||||
android:scaleType="centerCrop" />
|
||||
</LinearLayout>
|
@ -90,19 +90,18 @@
|
||||
<string name="label_passphrase_again">Repeat Passphrase</string>
|
||||
<string name="label_algorithm">Algorithm</string>
|
||||
<string name="label_ascii_armor">File ASCII Armor</string>
|
||||
<string name="label_file_ascii_armor">Files: ASCII Armor</string>
|
||||
<string name="label_file_ascii_armor">Enable ASCII Armor</string>
|
||||
<string name="label_write_version_header">Let others know that you\'re using OpenKeychain</string>
|
||||
<string name="label_write_version_header_summary">Writes \'OpenKeychain v2.7\' to OpenPGP signatures, ciphertext, and exported keys</string>
|
||||
<string name="label_use_default_yubikey_pin">Use default Yubikey PIN</string>
|
||||
<string name="label_label_use_default_yubikey_pin_summary">Uses default PIN (123456) to access Yubikeys over NFC</string>
|
||||
<string name="label_asymmetric_from">Signed by:</string>
|
||||
<string name="label_to">Encrypt to:</string>
|
||||
<string name="label_delete_after_encryption">Files: Delete After Encryption</string>
|
||||
<string name="label_delete_after_encryption">Delete File After Encryption</string>
|
||||
<string name="label_delete_after_decryption">Delete After Decryption</string>
|
||||
<string name="label_encryption_algorithm">Encryption Algorithm</string>
|
||||
<string name="label_hash_algorithm">Hash Algorithm</string>
|
||||
<string name="label_asymmetric">With Public Key</string>
|
||||
<string name="label_symmetric">With Passphrase</string>
|
||||
<string name="label_symmetric">Encrypt With Passphrase</string>
|
||||
<string name="label_passphrase_cache_ttl">Passphrase Cache</string>
|
||||
<string name="label_message_compression">Message Compression</string>
|
||||
<string name="label_file_compression">File Compression</string>
|
||||
@ -416,7 +415,7 @@
|
||||
<string name="api_settings_package_signature">SHA-256 of Package Signature</string>
|
||||
<string name="api_settings_accounts">Accounts</string>
|
||||
<string name="api_settings_settings">Settings</string>
|
||||
<string name="api_settings_key">My key for this account</string>
|
||||
<string name="api_settings_key">Account key:</string>
|
||||
<string name="api_settings_accounts_empty">No accounts attached to this app.</string>
|
||||
<string name="api_create_account_text">"The app requests the creation of a new account. Please select one of your existing keys or create a new one.\nApps are restricted to the usage of keys you select here!"</string>
|
||||
<string name="api_update_account_text">"The key saved for this account has been deleted. Please select a different one!\nApps are restricted to the usage of keys you select here!"</string>
|
||||
@ -512,7 +511,7 @@
|
||||
<string name="my_keys">My Keys</string>
|
||||
|
||||
<!-- hints -->
|
||||
<string name="encrypt_content_edit_text_hint">The message entered here will be signed using the key selected in \'Signed by\' and encrypted for all recipients selected in \'Encrypt to\'.</string>
|
||||
<string name="encrypt_content_edit_text_hint">Type text</string>
|
||||
<string name="decrypt_content_edit_text_hint">Enter ciphertext here to decrypt and/or verify…</string>
|
||||
|
||||
<!-- certs -->
|
||||
@ -755,7 +754,7 @@
|
||||
<string name="passp_cache_notif_n_keys">OpenKeychain has cached %d passphrases</string>
|
||||
<string name="passp_cache_notif_keys">Cached Passphrases:</string>
|
||||
<string name="passp_cache_notif_clear">Clear Cache</string>
|
||||
<string name="passp_cache_notif_pwd">Password</string>
|
||||
<string name="passp_cache_notif_pwd">Passphrase</string>
|
||||
|
||||
<!-- unsorted -->
|
||||
<string name="section_certifier_id">Certifier</string>
|
||||
|
Loading…
Reference in New Issue
Block a user