Smaller UI fixes

This commit is contained in:
Dominik Schürmann
2014-08-04 00:49:16 +02:00
parent c2ca841ac9
commit 4979ccd645
7 changed files with 61 additions and 58 deletions

View File

@@ -50,6 +50,7 @@
android:required="false" /> android:required="false" />
<permission android:name="org.sufficientlysecure.keychain.WRITE_TEMPORARY_STORAGE" /> <permission android:name="org.sufficientlysecure.keychain.WRITE_TEMPORARY_STORAGE" />
<uses-permission android:name="org.sufficientlysecure.keychain.WRITE_TEMPORARY_STORAGE" /> <uses-permission android:name="org.sufficientlysecure.keychain.WRITE_TEMPORARY_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
@@ -155,8 +156,9 @@
<action android:name="org.sufficientlysecure.keychain.action.ENCRYPT" /> <action android:name="org.sufficientlysecure.keychain.action.ENCRYPT" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" /> <data android:scheme="file" />
<data android:scheme="content"/> <data android:scheme="content" />
</intent-filter> </intent-filter>
<!-- Android's Send Action --> <!-- Android's Send Action -->
<intent-filter android:label="@string/intent_send_encrypt"> <intent-filter android:label="@string/intent_send_encrypt">
@@ -174,26 +176,16 @@
android:label="@string/title_decrypt" android:label="@string/title_decrypt"
android:windowSoftInputMode="stateHidden"> android:windowSoftInputMode="stateHidden">
<!--&lt;!&ndash; VIEW with mimeType: TODO (from email app) &ndash;&gt;--> <!-- VIEW with mimeType application/pgp-encrypted -->
<!--<intent-filter android:label="@string/intent_import_key">--> <intent-filter android:label="@string/intent_import_key">
<!--<action android:name="android.intent.action.VIEW" />--> <action android:name="android.intent.action.VIEW" />
<!--<category android:name="android.intent.category.BROWSABLE" />--> <category android:name="android.intent.category.BROWSABLE" />
<!--<category android:name="android.intent.category.DEFAULT" />--> <category android:name="android.intent.category.DEFAULT" />
<!--&lt;!&ndash; mime type as defined in http://tools.ietf.org/html/rfc3156 &ndash;&gt;--> <!-- mime type as defined in http://tools.ietf.org/html/rfc3156 -->
<!--<data android:mimeType="application/pgp-signature" />--> <data android:mimeType="application/pgp-encrypted" />
<!--</intent-filter>--> </intent-filter>
<!--&lt;!&ndash; VIEW with mimeType: TODO (from email app) &ndash;&gt;-->
<!--<intent-filter android:label="@string/intent_import_key">-->
<!--<action android:name="android.intent.action.VIEW" />-->
<!--<category android:name="android.intent.category.BROWSABLE" />-->
<!--<category android:name="android.intent.category.DEFAULT" />-->
<!--&lt;!&ndash; mime type as defined in http://tools.ietf.org/html/rfc3156 &ndash;&gt;-->
<!--<data android:mimeType="application/pgp-encrypted" />-->
<!--</intent-filter>-->
<!-- Keychain's own Actions --> <!-- Keychain's own Actions -->
<!-- DECRYPT with text as extra --> <!-- DECRYPT with text as extra -->
<intent-filter> <intent-filter>
@@ -206,8 +198,9 @@
<action android:name="org.sufficientlysecure.keychain.action.DECRYPT" /> <action android:name="org.sufficientlysecure.keychain.action.DECRYPT" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" /> <data android:scheme="file" />
<data android:scheme="content"/> <data android:scheme="content" />
</intent-filter> </intent-filter>
<!-- Android's Send Action --> <!-- Android's Send Action -->
<intent-filter android:label="@string/intent_send_decrypt"> <intent-filter android:label="@string/intent_send_decrypt">
@@ -227,7 +220,7 @@
<data android:host="*" /> <data android:host="*" />
<data android:scheme="file" /> <data android:scheme="file" />
<data android:scheme="content" /> <data android:scheme="content" />
<!-- GnuPG ASCII data, mostly keys, but sometimes signatures and encrypted data --> <!-- GnuPG ASCII data, mostly keys, but sometimes signatures and encrypted data -->
<data android:pathPattern=".*\\.asc" /> <data android:pathPattern=".*\\.asc" />
<data android:pathPattern=".*\\..*\\.asc" /> <data android:pathPattern=".*\\..*\\.asc" />
@@ -649,10 +642,10 @@
</service> </service>
<provider <provider
android:name=".provider.TemporaryStorageProvider" android:name=".provider.TemporaryStorageProvider"
android:authorities="org.sufficientlysecure.keychain.tempstorage" android:authorities="org.sufficientlysecure.keychain.tempstorage"
android:writePermission="org.sufficientlysecure.keychain.WRITE_TEMPORARY_STORAGE" android:writePermission="org.sufficientlysecure.keychain.WRITE_TEMPORARY_STORAGE"
android:exported="true" /> android:exported="true" />
</application> </application>

View File

@@ -489,7 +489,7 @@ public class EncryptActivity extends DrawerActivity implements EncryptActivityIn
* Android's Action * Android's Action
*/ */
if (Intent.ACTION_SEND.equals(action) && type != null) { if (Intent.ACTION_SEND.equals(action) && type != null) {
// When sending to APG Encrypt via share menu // When sending to OpenKeychain Encrypt via share menu
if ("text/plain".equals(type)) { if ("text/plain".equals(type)) {
// Plain text // Plain text
String sharedText = intent.getStringExtra(Intent.EXTRA_TEXT); String sharedText = intent.getStringExtra(Intent.EXTRA_TEXT);

View File

@@ -115,6 +115,7 @@ public class EncryptAsymmetricFragment extends Fragment implements EncryptActivi
} }
}); });
mEncryptKeyView = (EncryptKeyCompletionView) view.findViewById(R.id.recipient_list); mEncryptKeyView = (EncryptKeyCompletionView) view.findViewById(R.id.recipient_list);
mEncryptKeyView.setThreshold(1); // Start working from first character
return view; return view;
} }

View File

@@ -149,6 +149,14 @@ public class AddUserIdDialogFragment extends DialogFragment implements OnEditorA
} }
}); });
mName.setThreshold(1); // Start working from first character
mName.setAdapter(
new ArrayAdapter<String>
(getActivity(), android.R.layout.simple_spinner_dropdown_item,
ContactHelper.getPossibleUserNames(getActivity())
)
);
alert.setNegativeButton(android.R.string.cancel, new OnClickListener() { alert.setNegativeButton(android.R.string.cancel, new OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {

View File

@@ -1,39 +1,39 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"
android:layout_width="match_parent" android:orientation="vertical"
android:layout_height="wrap_content" android:paddingTop="4dp"
android:orientation="vertical" android:paddingBottom="4dp"
android:paddingTop="4dp" android:paddingRight="16dp"
android:paddingBottom="4dp" android:paddingLeft="16dp">
android:paddingRight="16dp"
android:paddingLeft="16dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp"
android:layout_margin="0dp"
style="@android:style/Widget.EditText">
<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"
android:text="@string/label_asymmetric_from" />
<Spinner
android:id="@+id/sign"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="0dp" android:layout_gravity="center_vertical" />
android:layout_margin="0dp"
style="@android:style/Widget.EditText">
<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"
android:text="@string/label_asymmetric_from"/>
<Spinner
android:id="@+id/sign"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout> </LinearLayout>
<org.sufficientlysecure.keychain.ui.widget.EncryptKeyCompletionView <org.sufficientlysecure.keychain.ui.widget.EncryptKeyCompletionView
android:id="@+id/recipient_list" android:id="@+id/recipient_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>

View File

@@ -2,6 +2,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/check_use_symmetric" android:title="@string/label_symmetric" android:checkable="true"/> <item android:id="@+id/check_use_symmetric" android:title="@string/label_symmetric" android:checkable="true"/>
<item android:id="@+id/check_use_armor" android:title="@string/label_ascii_armor" android:checkable="true" /> <item android:id="@+id/check_use_armor" android:title="@string/label_file_ascii_armor" android:checkable="true" />
<item android:id="@+id/check_delete_after_encrypt" android:title="@string/label_delete_after_encryption" android:checkable="true" /> <item android:id="@+id/check_delete_after_encrypt" android:title="@string/label_delete_after_encryption" android:checkable="true" />
</menu> </menu>

View File

@@ -113,12 +113,13 @@
<string name="label_passphrase_again">Repeat Passphrase</string> <string name="label_passphrase_again">Repeat Passphrase</string>
<string name="label_algorithm">Algorithm</string> <string name="label_algorithm">Algorithm</string>
<string name="label_ascii_armor">ASCII Armor</string> <string name="label_ascii_armor">ASCII Armor</string>
<string name="label_file_ascii_armor">Files: ASCII Armor</string>
<string name="label_conceal_pgp_application">Let others know that you\'re using OpenKeychain</string> <string name="label_conceal_pgp_application">Let others know that you\'re using OpenKeychain</string>
<string name="label_conceal_pgp_application_summary">Writes \'OpenKeychain v2.7\' to OpenPGP signatures, ciphertext, and exported keys</string> <string name="label_conceal_pgp_application_summary">Writes \'OpenKeychain v2.7\' to OpenPGP signatures, ciphertext, and exported keys</string>
<string name="label_select_public_keys">Recipients</string> <string name="label_select_public_keys">Recipients</string>
<string name="label_asymmetric_from">From:</string> <string name="label_asymmetric_from">From:</string>
<string name="label_to">To</string> <string name="label_to">To</string>
<string name="label_delete_after_encryption">Delete After Encryption</string> <string name="label_delete_after_encryption">Files: Delete After Encryption</string>
<string name="label_delete_after_decryption">Delete After Decryption</string> <string name="label_delete_after_decryption">Delete After Decryption</string>
<string name="label_share_after_encryption">Share After Encryption</string> <string name="label_share_after_encryption">Share After Encryption</string>
<string name="label_encryption_algorithm">Encryption Algorithm</string> <string name="label_encryption_algorithm">Encryption Algorithm</string>
@@ -538,7 +539,7 @@
<string name="my_keys">My Keys</string> <string name="my_keys">My Keys</string>
<!-- hints --> <!-- hints -->
<string name="encrypt_content_edit_text_hint">Write message here to encrypt and/or sign…</string> <string name="encrypt_content_edit_text_hint">The message entered here will be signed using the key selected in \'From\' and encrypted for all recipients selected in \'To\'.</string>
<string name="decrypt_content_edit_text_hint">Enter ciphertext here to decrypt and/or verify…</string> <string name="decrypt_content_edit_text_hint">Enter ciphertext here to decrypt and/or verify…</string>
<!-- certs --> <!-- certs -->