From e0985878d732674626eee947a8d27c7a9193495c Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Tue, 6 May 2014 19:18:32 +0200 Subject: [PATCH] ui: use textview buttons in decrypt verify dialogue --- .../keychain/ui/DecryptFileFragment.java | 4 +- .../keychain/ui/DecryptMessageFragment.java | 8 +-- .../main/res/layout/decrypt_file_fragment.xml | 15 +++-- .../res/layout/decrypt_message_fragment.xml | 59 ++++++++++--------- .../res/layout/decrypt_result_include.xml | 42 +++++++++---- 5 files changed, 75 insertions(+), 53 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFileFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFileFragment.java index 0f88ee753..d953e2591 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFileFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFileFragment.java @@ -54,7 +54,7 @@ public class DecryptFileFragment extends DecryptFragment { private EditText mFilename; private CheckBox mDeleteAfter; private BootstrapButton mBrowse; - private BootstrapButton mDecryptButton; + private View mDecryptButton; private String mInputFilename = null; private String mOutputFilename = null; @@ -71,7 +71,7 @@ public class DecryptFileFragment extends DecryptFragment { mFilename = (EditText) view.findViewById(R.id.decrypt_file_filename); mBrowse = (BootstrapButton) view.findViewById(R.id.decrypt_file_browse); mDeleteAfter = (CheckBox) view.findViewById(R.id.decrypt_file_delete_after_decryption); - mDecryptButton = (BootstrapButton) view.findViewById(R.id.decrypt_file_action_decrypt); + mDecryptButton = view.findViewById(R.id.decrypt_file_action_decrypt); mBrowse.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { FileHelper.openFile(DecryptFileFragment.this, mFilename.getText().toString(), "*/*", diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptMessageFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptMessageFragment.java index 454ee4415..ddc326acf 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptMessageFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptMessageFragment.java @@ -47,8 +47,8 @@ public class DecryptMessageFragment extends DecryptFragment { // view private EditText mMessage; - private BootstrapButton mDecryptButton; - private BootstrapButton mDecryptFromCLipboardButton; + private View mDecryptButton; + private View mDecryptFromCLipboardButton; // model private String mCiphertext; @@ -61,8 +61,8 @@ public class DecryptMessageFragment extends DecryptFragment { View view = inflater.inflate(R.layout.decrypt_message_fragment, container, false); mMessage = (EditText) view.findViewById(R.id.message); - mDecryptButton = (BootstrapButton) view.findViewById(R.id.action_decrypt); - mDecryptFromCLipboardButton = (BootstrapButton) view.findViewById(R.id.action_decrypt_from_clipboard); + mDecryptButton = view.findViewById(R.id.action_decrypt); + mDecryptFromCLipboardButton = view.findViewById(R.id.action_decrypt_from_clipboard); mDecryptButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { diff --git a/OpenKeychain/src/main/res/layout/decrypt_file_fragment.xml b/OpenKeychain/src/main/res/layout/decrypt_file_fragment.xml index 597652713..b43991ff1 100644 --- a/OpenKeychain/src/main/res/layout/decrypt_file_fragment.xml +++ b/OpenKeychain/src/main/res/layout/decrypt_file_fragment.xml @@ -74,15 +74,18 @@ android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> - diff --git a/OpenKeychain/src/main/res/layout/decrypt_message_fragment.xml b/OpenKeychain/src/main/res/layout/decrypt_message_fragment.xml index 831d7e888..6c1eb3bdd 100644 --- a/OpenKeychain/src/main/res/layout/decrypt_message_fragment.xml +++ b/OpenKeychain/src/main/res/layout/decrypt_message_fragment.xml @@ -37,43 +37,46 @@ android:scrollHorizontally="true" android:layout_weight="1" /> - - - + android:gravity="center_vertical" + android:layout_weight="1" /> - + + + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:padding="8dp" + android:src="@drawable/ic_action_copy" + android:layout_gravity="center_vertical" + style="@style/SelectableItem" /> + + + + diff --git a/OpenKeychain/src/main/res/layout/decrypt_result_include.xml b/OpenKeychain/src/main/res/layout/decrypt_result_include.xml index 70faa1d80..76b20e75f 100644 --- a/OpenKeychain/src/main/res/layout/decrypt_result_include.xml +++ b/OpenKeychain/src/main/res/layout/decrypt_result_include.xml @@ -11,20 +11,36 @@ android:paddingBottom="4dp" android:background="@color/result_blue"> + + + android:textColor="@color/white" + android:layout_gravity="center_horizontal" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" /> + + + android:orientation="horizontal" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp"> + + - - \ No newline at end of file