diff --git a/OpenPGP-Keychain/assets/fontawesome-webfont.ttf b/OpenPGP-Keychain/assets/fontawesome-webfont.ttf
new file mode 100644
index 000000000..7ec2e1de8
Binary files /dev/null and b/OpenPGP-Keychain/assets/fontawesome-webfont.ttf differ
diff --git a/OpenPGP-Keychain/res/drawable-finger/btn_circle.xml b/OpenPGP-Keychain/res/drawable-finger/btn_circle.xml
deleted file mode 100644
index 6c3c7fc1a..000000000
--- a/OpenPGP-Keychain/res/drawable-finger/btn_circle.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_disable.png b/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_disable.png
deleted file mode 100644
index ae063b545..000000000
Binary files a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_disable.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_disable_focused.png b/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_disable_focused.png
deleted file mode 100644
index 7a5d4fe4e..000000000
Binary files a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_disable_focused.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_normal.png b/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_normal.png
deleted file mode 100644
index 5eda66883..000000000
Binary files a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_normal.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_pressed.png b/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_pressed.png
deleted file mode 100644
index 88848bac2..000000000
Binary files a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_pressed.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_selected.png b/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_selected.png
deleted file mode 100644
index 74690705f..000000000
Binary files a/OpenPGP-Keychain/res/drawable-hdpi-finger/btn_circle_selected.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-hdpi-finger/ic_btn_round_minus.png b/OpenPGP-Keychain/res/drawable-hdpi-finger/ic_btn_round_minus.png
deleted file mode 100644
index 27af3faf4..000000000
Binary files a/OpenPGP-Keychain/res/drawable-hdpi-finger/ic_btn_round_minus.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-hdpi-finger/ic_btn_round_plus.png b/OpenPGP-Keychain/res/drawable-hdpi-finger/ic_btn_round_plus.png
deleted file mode 100644
index b24168c32..000000000
Binary files a/OpenPGP-Keychain/res/drawable-hdpi-finger/ic_btn_round_plus.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_disable.png b/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_disable.png
deleted file mode 100644
index 33b74a66c..000000000
Binary files a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_disable.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_disable_focused.png b/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_disable_focused.png
deleted file mode 100644
index 005ad8dca..000000000
Binary files a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_disable_focused.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_normal.png b/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_normal.png
deleted file mode 100644
index fc5af1c9f..000000000
Binary files a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_normal.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_pressed.png b/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_pressed.png
deleted file mode 100644
index 8f40afdfc..000000000
Binary files a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_pressed.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_selected.png b/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_selected.png
deleted file mode 100644
index c74fac227..000000000
Binary files a/OpenPGP-Keychain/res/drawable-mdpi-finger/btn_circle_selected.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-mdpi-finger/ic_btn_round_minus.png b/OpenPGP-Keychain/res/drawable-mdpi-finger/ic_btn_round_minus.png
deleted file mode 100644
index 96dbb17d2..000000000
Binary files a/OpenPGP-Keychain/res/drawable-mdpi-finger/ic_btn_round_minus.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable-mdpi-finger/ic_btn_round_plus.png b/OpenPGP-Keychain/res/drawable-mdpi-finger/ic_btn_round_plus.png
deleted file mode 100644
index 1ec8a956a..000000000
Binary files a/OpenPGP-Keychain/res/drawable-mdpi-finger/ic_btn_round_plus.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable/btn_circle_disable.png b/OpenPGP-Keychain/res/drawable/btn_circle_disable.png
deleted file mode 100644
index 33b74a66c..000000000
Binary files a/OpenPGP-Keychain/res/drawable/btn_circle_disable.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable/btn_circle_disable_focused.png b/OpenPGP-Keychain/res/drawable/btn_circle_disable_focused.png
deleted file mode 100644
index 005ad8dca..000000000
Binary files a/OpenPGP-Keychain/res/drawable/btn_circle_disable_focused.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable/btn_circle_normal.png b/OpenPGP-Keychain/res/drawable/btn_circle_normal.png
deleted file mode 100644
index fc5af1c9f..000000000
Binary files a/OpenPGP-Keychain/res/drawable/btn_circle_normal.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable/btn_circle_pressed.png b/OpenPGP-Keychain/res/drawable/btn_circle_pressed.png
deleted file mode 100644
index 8f40afdfc..000000000
Binary files a/OpenPGP-Keychain/res/drawable/btn_circle_pressed.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/drawable/btn_circle_selected.png b/OpenPGP-Keychain/res/drawable/btn_circle_selected.png
deleted file mode 100644
index c74fac227..000000000
Binary files a/OpenPGP-Keychain/res/drawable/btn_circle_selected.png and /dev/null differ
diff --git a/OpenPGP-Keychain/res/layout/decrypt.xml b/OpenPGP-Keychain/res/layout/decrypt.xml
index 0533e6d72..c52d873f1 100644
--- a/OpenPGP-Keychain/res/layout/decrypt.xml
+++ b/OpenPGP-Keychain/res/layout/decrypt.xml
@@ -16,18 +16,19 @@
-->
@@ -99,7 +100,7 @@
android:id="@+id/sourceLabel"
style="@style/SectionHeader"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="@string/label_message"
@@ -114,21 +115,21 @@
@@ -136,13 +137,13 @@
@@ -153,15 +154,19 @@
android:layout_weight="1"
android:inputType="textNoSuggestions" />
-
+ android:layout_margin="4dp"
+ bootstrapbutton:bb_icon_left="fa-folder-open"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
diff --git a/OpenPGP-Keychain/res/layout/edit_key.xml b/OpenPGP-Keychain/res/layout/edit_key.xml
index 20cc9f2ac..f8597b0df 100644
--- a/OpenPGP-Keychain/res/layout/edit_key.xml
+++ b/OpenPGP-Keychain/res/layout/edit_key.xml
@@ -16,6 +16,7 @@
-->
-
+ android:text="@string/btn_set_passphrase"
+ bootstrapbutton:bb_icon_left="fa-pencil"
+ bootstrapbutton:bb_type="info" />
@@ -80,7 +81,7 @@
@@ -94,10 +95,12 @@
android:paddingRight="10dip"
android:text="@string/label_expiry" />
-
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/none"
+ bootstrapbutton:bb_type="default" />
@@ -112,22 +115,25 @@
-
+ android:layout_margin="10dp"
+ bootstrapbutton:bb_icon_left="fa-minus"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="small"
+ bootstrapbutton:bb_type="danger" />
diff --git a/OpenPGP-Keychain/res/layout/edit_key_section.xml b/OpenPGP-Keychain/res/layout/edit_key_section.xml
index dd0a5d4bd..9f10ff8c1 100644
--- a/OpenPGP-Keychain/res/layout/edit_key_section.xml
+++ b/OpenPGP-Keychain/res/layout/edit_key_section.xml
@@ -1,31 +1,14 @@
-
-
@@ -40,19 +23,22 @@
android:singleLine="true"
android:text="Section Name" />
-
+ android:layout_margin="10dp"
+ bootstrapbutton:bb_icon_left="fa-plus"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="small"
+ bootstrapbutton:bb_type="success" />
-
+
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/layout/edit_key_user_id_item.xml b/OpenPGP-Keychain/res/layout/edit_key_user_id_item.xml
index a3955389f..74f929bf6 100644
--- a/OpenPGP-Keychain/res/layout/edit_key_user_id_item.xml
+++ b/OpenPGP-Keychain/res/layout/edit_key_user_id_item.xml
@@ -1,21 +1,6 @@
-
-
@@ -90,12 +75,18 @@
-
+ android:layout_gravity="center_vertical"
+ android:layout_margin="10dp"
+ android:layout_marginLeft="4dip"
+ android:layout_marginRight="6dip"
+ bootstrapbutton:bb_icon_left="fa-minus"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="small"
+ bootstrapbutton:bb_type="danger" />
@@ -43,7 +44,7 @@
android:id="@+id/modeLabel"
style="@style/SectionHeader"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="@string/label_asymmetric" />
@@ -57,18 +58,18 @@
@@ -80,7 +81,7 @@
android:text="@string/label_sign" />
@@ -108,7 +109,7 @@
@@ -122,18 +123,22 @@
android:text="@string/label_select_public_keys"
android:textAppearance="?android:attr/textAppearanceMedium" />
-
+ android:layout_margin="4dp"
+ android:text="@string/btn_select_encrypt_keys"
+ bootstrapbutton:bb_icon_left="fa-key"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
@@ -151,7 +156,7 @@
@@ -169,7 +174,7 @@
@@ -177,7 +182,7 @@
@@ -192,7 +197,7 @@
android:id="@+id/sourceLabel"
style="@style/SectionHeader"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="@string/label_message"
@@ -207,34 +212,34 @@
@@ -245,15 +250,19 @@
android:layout_weight="1"
android:inputType="textNoSuggestions" />
-
+ android:layout_margin="4dp"
+ bootstrapbutton:bb_icon_left="fa-folder-open"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
@@ -275,7 +284,7 @@
@@ -288,7 +297,7 @@
diff --git a/OpenPGP-Keychain/res/layout/file_dialog.xml b/OpenPGP-Keychain/res/layout/file_dialog.xml
index ce3b1ea60..87816067f 100644
--- a/OpenPGP-Keychain/res/layout/file_dialog.xml
+++ b/OpenPGP-Keychain/res/layout/file_dialog.xml
@@ -16,6 +16,7 @@
-->
-
+ bootstrapbutton:bb_icon_left="fa-folder-open"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
@@ -22,19 +23,22 @@
android:paddingLeft="10dp"
android:paddingRight="10dp" >
-
+ android:layout_height="60dp"
+ android:padding="4dp"
+ android:text="@string/import_import"
+ bootstrapbutton:bb_icon_left="fa-download"
+ bootstrapbutton:bb_type="info" />
-
+ android:layout_height="60dp"
+ android:padding="4dp"
+ android:text="@string/import_sign_and_upload"
+ bootstrapbutton:bb_type="info" />
-
+ android:layout_height="60dp"
+ android:layout_margin="10dp"
+ android:text="@string/import_from_clipboard"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/layout/import_keys_file_fragment.xml b/OpenPGP-Keychain/res/layout/import_keys_file_fragment.xml
index 896be3989..126bcd8a6 100644
--- a/OpenPGP-Keychain/res/layout/import_keys_file_fragment.xml
+++ b/OpenPGP-Keychain/res/layout/import_keys_file_fragment.xml
@@ -1,5 +1,6 @@
@@ -16,12 +17,16 @@
android:minLines="2"
android:scrollbars="vertical" />
-
+ bootstrapbutton:bb_icon_left="fa-folder-open"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/layout/import_keys_keyserver_fragment.xml b/OpenPGP-Keychain/res/layout/import_keys_keyserver_fragment.xml
index 18e87205b..74a2d7853 100644
--- a/OpenPGP-Keychain/res/layout/import_keys_keyserver_fragment.xml
+++ b/OpenPGP-Keychain/res/layout/import_keys_keyserver_fragment.xml
@@ -1,13 +1,17 @@
-
+ android:layout_height="60dp"
+ android:layout_margin="10dp"
+ android:text="@string/menu_key_server"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
diff --git a/OpenPGP-Keychain/res/layout/import_keys_nfc_fragment.xml b/OpenPGP-Keychain/res/layout/import_keys_nfc_fragment.xml
index b34bb80c3..6d70578af 100644
--- a/OpenPGP-Keychain/res/layout/import_keys_nfc_fragment.xml
+++ b/OpenPGP-Keychain/res/layout/import_keys_nfc_fragment.xml
@@ -1,13 +1,17 @@
-
+ android:layout_height="60dp"
+ android:layout_margin="10dp"
+ android:text="@string/menu_import_from_nfc"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/layout/import_keys_qr_code_fragment.xml b/OpenPGP-Keychain/res/layout/import_keys_qr_code_fragment.xml
index 0a49b014a..f3c09a41d 100644
--- a/OpenPGP-Keychain/res/layout/import_keys_qr_code_fragment.xml
+++ b/OpenPGP-Keychain/res/layout/import_keys_qr_code_fragment.xml
@@ -1,14 +1,19 @@
-
+ android:layout_height="60dp"
+ android:layout_margin="10dp"
+ android:text="@string/menu_import_from_qr_code"
+ bootstrapbutton:bb_icon_left="fa-barcode"
+ bootstrapbutton:bb_size="default"
+ bootstrapbutton:bb_type="default" />
@@ -45,12 +46,14 @@
android:text="@string/key_list_empty_text2"
android:textAppearance="?android:attr/textAppearanceSmall" />
-
+ bootstrapbutton:bb_icon_left="fa-plus"
+ bootstrapbutton:bb_type="default" />
-
+ bootstrapbutton:bb_icon_left="fa-download"
+ bootstrapbutton:bb_type="default" />
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/layout/key_server_editor.xml b/OpenPGP-Keychain/res/layout/key_server_editor.xml
index 51ff8a663..058a43eaf 100644
--- a/OpenPGP-Keychain/res/layout/key_server_editor.xml
+++ b/OpenPGP-Keychain/res/layout/key_server_editor.xml
@@ -1,52 +1,40 @@
-
-
-
+ android:orientation="vertical" >
+ android:layout_marginLeft="3dip"
+ android:orientation="horizontal" >
-
-
+ android:layout_weight="1"
+ android:inputType="textUri" />
+
+ android:background="?android:attr/listDivider" />
-
+
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/layout/key_server_preference.xml b/OpenPGP-Keychain/res/layout/key_server_preference.xml
index e9b1d5a95..8b99e5d2f 100644
--- a/OpenPGP-Keychain/res/layout/key_server_preference.xml
+++ b/OpenPGP-Keychain/res/layout/key_server_preference.xml
@@ -1,21 +1,6 @@
-
-
@@ -57,15 +42,18 @@
android:textAppearance="?android:attr/textAppearanceSmall" />
-
+ bootstrapbutton:bb_icon_left="fa-plus"
+ bootstrapbutton:bb_roundedCorners="true"
+ bootstrapbutton:bb_size="small"
+ bootstrapbutton:bb_type="success" />
-
+ android:layout_height="60dp"
+ android:padding="4dp"
+ android:text="@string/key_view_action_encrypt"
+ bootstrapbutton:bb_icon_left="fa-lock"
+ bootstrapbutton:bb_type="info" />
\ No newline at end of file
diff --git a/OpenPGP-Keychain/res/raw/help_about.html b/OpenPGP-Keychain/res/raw/help_about.html
index 8b412ded0..54af42b16 100644
--- a/OpenPGP-Keychain/res/raw/help_about.html
+++ b/OpenPGP-Keychain/res/raw/help_about.html
@@ -12,15 +12,15 @@ And don't add newlines before or after p tags because of transifex -->
Developers OpenPGP Keychain
- Dominik Schürmann (Lead developer)
-- Ash Hughes
+- Ash Hughes (crypto patches)
- Brian C. Barnes
-- Bahtiar 'kalkin' Gadimov
+- Bahtiar 'kalkin' Gadimov (UI)
Developers APG 1.x
-- Thialfihar (Lead developer)
-- Senecaso (QRCode, sign key, upload key)
+- 'Thialfihar' (Lead developer)
+- 'Senecaso' (QRCode, sign key, upload key)
- Oliver Runge
- Markus Doits
diff --git a/OpenPGP-Keychain/res/values/styles.xml b/OpenPGP-Keychain/res/values/styles.xml
index ef3ff63f6..15214fa62 100644
--- a/OpenPGP-Keychain/res/values/styles.xml
+++ b/OpenPGP-Keychain/res/values/styles.xml
@@ -18,16 +18,6 @@
-
-
-
-
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java
index 78ad4c9be..f7fc49083 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java
@@ -60,7 +60,6 @@ import android.view.View.OnClickListener;
import android.view.animation.AnimationUtils;
import android.widget.CheckBox;
import android.widget.EditText;
-import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -70,6 +69,7 @@ import android.widget.ViewFlipper;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
+import com.beardedhen.androidbootstrap.BootstrapButton;
@SuppressLint("NewApi")
public class DecryptActivity extends SherlockFragmentActivity {
@@ -107,7 +107,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
private EditText mFilename = null;
private CheckBox mDeleteAfter = null;
- private ImageButton mBrowse = null;
+ private BootstrapButton mBrowse = null;
private String mInputFilename = null;
private String mOutputFilename = null;
@@ -216,7 +216,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
mMessage.setMinimumHeight(height);
mFilename = (EditText) findViewById(R.id.filename);
- mBrowse = (ImageButton) findViewById(R.id.btn_browse);
+ mBrowse = (BootstrapButton) findViewById(R.id.btn_browse);
mBrowse.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
FileHelper.openFile(DecryptActivity.this, mFilename.getText().toString(), "*/*",
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
index d141fbe3a..569a16c41 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
@@ -55,7 +55,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
-import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
@@ -64,6 +63,7 @@ import android.widget.Toast;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class EditKeyActivity extends KeyActivity {
@@ -91,7 +91,7 @@ public class EditKeyActivity extends KeyActivity {
private String mCurrentPassPhrase = null;
private String mNewPassPhrase = null;
- private Button mChangePassPhrase;
+ private BootstrapButton mChangePassPhrase;
private CheckBox mNoPassphrase;
@@ -336,7 +336,7 @@ public class EditKeyActivity extends KeyActivity {
}
}
};
-
+
deleteKey(mDataUri, Id.type.secret_key, returnHandler);
return true;
}
@@ -426,7 +426,7 @@ public class EditKeyActivity extends KeyActivity {
setContentView(R.layout.edit_key);
// find views
- mChangePassPhrase = (Button) findViewById(R.id.edit_key_btn_change_pass_phrase);
+ mChangePassPhrase = (BootstrapButton) findViewById(R.id.edit_key_btn_change_pass_phrase);
mNoPassphrase = (CheckBox) findViewById(R.id.edit_key_no_passphrase);
// Build layout based on given userIds and keys
@@ -653,7 +653,7 @@ public class EditKeyActivity extends KeyActivity {
}
private void updatePassPhraseButtonText() {
- mChangePassPhrase.setText(isPassphraseSet() ? R.string.btn_change_passphrase
- : R.string.btn_set_passphrase);
+ mChangePassPhrase.setText(isPassphraseSet() ? getString(R.string.btn_change_passphrase)
+ : getString(R.string.btn_set_passphrase));
}
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
index 2dfdf254e..681548c9b 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
@@ -55,10 +55,8 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.AnimationUtils;
import android.widget.ArrayAdapter;
-import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
-import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
@@ -68,6 +66,7 @@ import android.widget.ViewFlipper;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class EncryptActivity extends SherlockFragmentActivity {
@@ -87,7 +86,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
private long mEncryptionKeyIds[] = null;
private EditText mMessage = null;
- private Button mSelectKeysButton = null;
+ private BootstrapButton mSelectKeysButton = null;
private boolean mEncryptEnabled = false;
private String mEncryptString = "";
@@ -117,7 +116,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
private EditText mFilename = null;
private CheckBox mDeleteAfter = null;
- private ImageButton mBrowse = null;
+ private BootstrapButton mBrowse = null;
private String mInputFilename = null;
private String mOutputFilename = null;
@@ -825,7 +824,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
mModeLabel.setOnClickListener(nextModeClickListener);
mMessage = (EditText) findViewById(R.id.message);
- mSelectKeysButton = (Button) findViewById(R.id.btn_selectEncryptKeys);
+ mSelectKeysButton = (BootstrapButton) findViewById(R.id.btn_selectEncryptKeys);
mSign = (CheckBox) findViewById(R.id.sign);
mMainUserId = (TextView) findViewById(R.id.mainUserId);
mMainUserIdRest = (TextView) findViewById(R.id.mainUserIdRest);
@@ -841,7 +840,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
mMessage.setMinimumHeight(height);
mFilename = (EditText) findViewById(R.id.filename);
- mBrowse = (ImageButton) findViewById(R.id.btn_browse);
+ mBrowse = (BootstrapButton) findViewById(R.id.btn_browse);
mBrowse.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
FileHelper.openFile(EncryptActivity.this, mFilename.getText().toString(), "*/*",
@@ -896,9 +895,9 @@ public class EncryptActivity extends SherlockFragmentActivity {
private void updateView() {
if (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0) {
- mSelectKeysButton.setText(R.string.no_keys_selected);
+ mSelectKeysButton.setText(getString(R.string.no_keys_selected));
} else if (mEncryptionKeyIds.length == 1) {
- mSelectKeysButton.setText(R.string.one_key_selected);
+ mSelectKeysButton.setText(getString(R.string.one_key_selected));
} else {
mSelectKeysButton.setText("" + mEncryptionKeyIds.length + " "
+ getResources().getString(R.string.n_keys_selected));
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
index f83d469ac..94b5304a1 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
@@ -19,6 +19,7 @@ package org.sufficientlysecure.keychain.ui;
import java.util.ArrayList;
import java.util.List;
+
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.helper.ActionBarHelper;
@@ -28,6 +29,7 @@ import org.sufficientlysecure.keychain.ui.adapter.ImportKeysListEntry;
import org.sufficientlysecure.keychain.ui.dialog.DeleteFileDialogFragment;
import org.sufficientlysecure.keychain.ui.dialog.FileDialogFragment;
import org.sufficientlysecure.keychain.util.Log;
+
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.ProgressDialog;
@@ -43,12 +45,15 @@ import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
+import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Toast;
+
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.OnNavigationListener;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.MenuItem;
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class ImportKeysActivity extends SherlockFragmentActivity implements OnNavigationListener {
public static final String ACTION_IMPORT_KEY = Constants.INTENT_PREFIX + "IMPORT_KEY";
@@ -74,12 +79,30 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
OnNavigationListener mOnNavigationListener;
String[] mNavigationStrings;
+ BootstrapButton mImportButton;
+ BootstrapButton mImportSignUploadButton;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.import_keys);
+ mImportButton = (BootstrapButton) findViewById(R.id.import_import);
+ mImportButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ importKeys();
+ }
+ });
+ mImportSignUploadButton = (BootstrapButton) findViewById(R.id.import_sign_and_upload);
+ mImportSignUploadButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ signAndUploadOnClick();
+ }
+ });
+
// set actionbar without home button if called from another app
ActionBarHelper.setBackButton(this);
@@ -398,11 +421,11 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
}
}
- public void importOnClick(View view) {
+ public void importOnClick() {
importKeys();
}
- public void signAndUploadOnClick(View view) {
+ public void signAndUploadOnClick() {
// first, import!
// importOnClick(view);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java
index dcb7dbcc6..31f758395 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysClipboardFragment.java
@@ -26,12 +26,13 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
-import android.widget.Button;
+
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class ImportKeysClipboardFragment extends Fragment {
private ImportKeysActivity mImportActivity;
- private Button mButton;
+ private BootstrapButton mButton;
/**
* Creates new instance of this fragment
@@ -52,7 +53,7 @@ public class ImportKeysClipboardFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.import_keys_clipboard_fragment, container, false);
- mButton = (Button) view.findViewById(R.id.import_clipboard_button);
+ mButton = (BootstrapButton) view.findViewById(R.id.import_clipboard_button);
mButton.setOnClickListener(new OnClickListener() {
@Override
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java
index fbca9013b..ea76d2898 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysFileFragment.java
@@ -31,14 +31,15 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
-import android.widget.ImageButton;
+
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class ImportKeysFileFragment extends Fragment {
public static final String ARG_PATH = "path";
private ImportKeysActivity mImportActivity;
private EditText mFilename;
- private ImageButton mBrowse;
+ private BootstrapButton mBrowse;
/**
* Creates new instance of this fragment
@@ -61,7 +62,7 @@ public class ImportKeysFileFragment extends Fragment {
View view = inflater.inflate(R.layout.import_keys_file_fragment, container, false);
mFilename = (EditText) view.findViewById(R.id.import_keys_file_input);
- mBrowse = (ImageButton) view.findViewById(R.id.import_keys_file_browse);
+ mBrowse = (BootstrapButton) view.findViewById(R.id.import_keys_file_browse);
mBrowse.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysNFCFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysNFCFragment.java
index 2d756dde6..83af8cf48 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysNFCFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysNFCFragment.java
@@ -26,11 +26,12 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
-import android.widget.Button;
+
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class ImportKeysNFCFragment extends Fragment {
- private Button mButton;
+ private BootstrapButton mButton;
/**
* Creates new instance of this fragment
@@ -51,7 +52,7 @@ public class ImportKeysNFCFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.import_keys_nfc_fragment, container, false);
- mButton = (Button) view.findViewById(R.id.import_nfc_button);
+ mButton = (BootstrapButton) view.findViewById(R.id.import_nfc_button);
mButton.setOnClickListener(new OnClickListener() {
@Override
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysQrCodeFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysQrCodeFragment.java
index 62b59b4f7..f9ead3a94 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysQrCodeFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysQrCodeFragment.java
@@ -30,18 +30,18 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
-import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
+import com.beardedhen.androidbootstrap.BootstrapButton;
import com.google.zxing.integration.android.IntentIntegratorSupportV4;
import com.google.zxing.integration.android.IntentResult;
public class ImportKeysQrCodeFragment extends Fragment {
private ImportKeysActivity mImportActivity;
- private Button mButton;
+ private BootstrapButton mButton;
private TextView mText;
private ProgressBar mProgress;
@@ -66,7 +66,7 @@ public class ImportKeysQrCodeFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.import_keys_qr_code_fragment, container, false);
- mButton = (Button) view.findViewById(R.id.import_qrcode_button);
+ mButton = (BootstrapButton) view.findViewById(R.id.import_qrcode_button);
mText = (TextView) view.findViewById(R.id.import_qrcode_text);
mProgress = (ProgressBar) view.findViewById(R.id.import_qrcode_progress);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysServerFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysServerFragment.java
index 106c8ebef..c985f1f60 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysServerFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysServerFragment.java
@@ -24,12 +24,13 @@ import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
-import android.view.ViewGroup;
import android.view.View.OnClickListener;
-import android.widget.Button;
+import android.view.ViewGroup;
+
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class ImportKeysServerFragment extends Fragment {
- private Button mButton;
+ private BootstrapButton mButton;
/**
* Creates new instance of this fragment
@@ -50,7 +51,7 @@ public class ImportKeysServerFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.import_keys_keyserver_fragment, container, false);
- mButton = (Button) view.findViewById(R.id.import_keyserver_button);
+ mButton = (BootstrapButton) view.findViewById(R.id.import_keyserver_button);
mButton.setOnClickListener(new OnClickListener() {
@Override
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
index 3ce1d08d0..88503a5c4 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
@@ -22,9 +22,9 @@ import java.util.Set;
import org.sufficientlysecure.keychain.Id;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.provider.KeychainContract;
-import org.sufficientlysecure.keychain.provider.ProviderHelper;
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
import org.sufficientlysecure.keychain.provider.KeychainContract.UserIds;
+import org.sufficientlysecure.keychain.provider.ProviderHelper;
import org.sufficientlysecure.keychain.ui.adapter.KeyListPublicAdapter;
import org.sufficientlysecure.keychain.ui.dialog.DeleteKeyDialogFragment;
@@ -45,13 +45,14 @@ import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.view.ViewGroup;
import android.view.View.OnClickListener;
+import android.view.ViewGroup;
import android.widget.AbsListView.MultiChoiceModeListener;
import android.widget.AdapterView;
-import android.widget.Button;
import android.widget.ListView;
+import com.beardedhen.androidbootstrap.BootstrapButton;
+
/**
* Public key list with sticky list headers. It does _not_ extend ListFragment because it uses
* StickyListHeaders library which does not extend upon ListView.
@@ -63,8 +64,8 @@ public class KeyListPublicFragment extends Fragment implements AdapterView.OnIte
private StickyListHeadersListView mStickyList;
// empty layout
- private Button mButtonEmptyCreate;
- private Button mButtonEmptyImport;
+ private BootstrapButton mButtonEmptyCreate;
+ private BootstrapButton mButtonEmptyImport;
/**
* Load custom layout with StickyListView from library
@@ -73,7 +74,7 @@ public class KeyListPublicFragment extends Fragment implements AdapterView.OnIte
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.key_list_public_fragment, container, false);
- mButtonEmptyCreate = (Button) view.findViewById(R.id.key_list_empty_button_create);
+ mButtonEmptyCreate = (BootstrapButton) view.findViewById(R.id.key_list_empty_button_create);
mButtonEmptyCreate.setOnClickListener(new OnClickListener() {
@Override
@@ -86,7 +87,7 @@ public class KeyListPublicFragment extends Fragment implements AdapterView.OnIte
}
});
- mButtonEmptyImport = (Button) view.findViewById(R.id.key_list_empty_button_import);
+ mButtonEmptyImport = (BootstrapButton) view.findViewById(R.id.key_list_empty_button_import);
mButtonEmptyImport.setOnClickListener(new OnClickListener() {
@Override
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyViewActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyViewActivity.java
index 7d51c2ff4..fb04bb1f8 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyViewActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyViewActivity.java
@@ -52,12 +52,12 @@ import android.os.Message;
import android.text.format.DateFormat;
import android.view.View;
import android.view.View.OnClickListener;
-import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
+import com.beardedhen.androidbootstrap.BootstrapButton;
@SuppressLint("NewApi")
public class KeyViewActivity extends KeyActivity implements CreateNdefMessageCallback,
@@ -70,7 +70,7 @@ public class KeyViewActivity extends KeyActivity implements CreateNdefMessageCal
private TextView mFingerint;
private TextView mExpiry;
private TextView mCreation;
- private Button mActionEncrypt;
+ private BootstrapButton mActionEncrypt;
// NFC
private NfcAdapter mNfcAdapter;
@@ -90,7 +90,7 @@ public class KeyViewActivity extends KeyActivity implements CreateNdefMessageCal
mExpiry = (TextView) this.findViewById(R.id.expiry);
mCreation = (TextView) this.findViewById(R.id.creation);
mAlgorithm = (TextView) this.findViewById(R.id.algorithm);
- mActionEncrypt = (Button) this.findViewById(R.id.action_encrypt);
+ mActionEncrypt = (BootstrapButton) this.findViewById(R.id.action_encrypt);
Intent intent = getIntent();
mDataUri = intent.getData();
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/FileDialogFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/FileDialogFragment.java
index 730fcc520..e65da2aa8 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/FileDialogFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/FileDialogFragment.java
@@ -18,9 +18,9 @@
package org.sufficientlysecure.keychain.ui.dialog;
import org.sufficientlysecure.keychain.Constants;
+import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.helper.FileHelper;
import org.sufficientlysecure.keychain.util.Log;
-import org.sufficientlysecure.keychain.R;
import android.app.Activity;
import android.app.AlertDialog;
@@ -36,7 +36,8 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
-import android.widget.ImageButton;
+
+import com.beardedhen.androidbootstrap.BootstrapButton;
// TODO: return result from file manager activity to this dialog! not the activity!
// do it like in ImportFileFragment!
@@ -55,6 +56,10 @@ public class FileDialogFragment extends DialogFragment {
private Messenger mMessenger;
+ private EditText mFilename;
+ private BootstrapButton mBrowse;
+ private CheckBox mCheckBox;
+
/**
* Creates new instance of this file dialog fragment
*/
@@ -90,10 +95,6 @@ public class FileDialogFragment extends DialogFragment {
String checkboxText = getArguments().getString(ARG_CHECKBOX_TEXT);
final int requestCode = getArguments().getInt(ARG_REQUEST_CODE);
- final EditText mFilename;
- final ImageButton mBrowse;
- final CheckBox mCheckBox;
-
LayoutInflater inflater = (LayoutInflater) activity
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
@@ -105,13 +106,13 @@ public class FileDialogFragment extends DialogFragment {
mFilename = (EditText) view.findViewById(R.id.input);
mFilename.setText(defaultFile);
- mBrowse = (ImageButton) view.findViewById(R.id.btn_browse);
+ mBrowse = (BootstrapButton) view.findViewById(R.id.btn_browse);
mBrowse.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// only .asc or .gpg files
- // setting it to text/plain prevents Cynaogenmod's file manager from selecting asc or gpg types!
- FileHelper.openFile(activity, mFilename.getText().toString(), "*/*",
- requestCode);
+ // setting it to text/plain prevents Cynaogenmod's file manager from selecting asc
+ // or gpg types!
+ FileHelper.openFile(activity, mFilename.getText().toString(), "*/*", requestCode);
}
});
@@ -196,4 +197,3 @@ public class FileDialogFragment extends DialogFragment {
}
}
}
-
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java
index 5748839bc..0f5d26644 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java
@@ -16,12 +16,18 @@
package org.sufficientlysecure.keychain.ui.widget;
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Vector;
+
import org.spongycastle.openpgp.PGPPublicKey;
import org.spongycastle.openpgp.PGPSecretKey;
import org.sufficientlysecure.keychain.Id;
+import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
import org.sufficientlysecure.keychain.util.Choice;
-import org.sufficientlysecure.keychain.R;
import android.app.DatePickerDialog;
import android.app.Dialog;
@@ -32,18 +38,12 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
-import android.widget.Button;
import android.widget.DatePicker;
-import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
-import java.text.DateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Vector;
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
private PGPSecretKey mKey;
@@ -51,12 +51,12 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
private EditorListener mEditorListener = null;
private boolean mIsMasterKey;
- ImageButton mDeleteButton;
+ BootstrapButton mDeleteButton;
TextView mAlgorithm;
TextView mKeyId;
Spinner mUsage;
TextView mCreationDate;
- Button mExpiryDateButton;
+ BootstrapButton mExpiryDateButton;
GregorianCalendar mExpiryDate;
private int mDatePickerResultCount = 0;
@@ -87,7 +87,7 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
mAlgorithm = (TextView) findViewById(R.id.algorithm);
mKeyId = (TextView) findViewById(R.id.keyId);
mCreationDate = (TextView) findViewById(R.id.creation);
- mExpiryDateButton = (Button) findViewById(R.id.expiry);
+ mExpiryDateButton = (BootstrapButton) findViewById(R.id.expiry);
mUsage = (Spinner) findViewById(R.id.usage);
Choice choices[] = {
new Choice(Id.choice.usage.sign_only, getResources().getString(
@@ -101,7 +101,7 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mUsage.setAdapter(adapter);
- mDeleteButton = (ImageButton) findViewById(R.id.delete);
+ mDeleteButton = (BootstrapButton) findViewById(R.id.delete);
mDeleteButton.setOnClickListener(this);
setExpiryDate(null);
@@ -118,16 +118,18 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
date.get(Calendar.DAY_OF_MONTH));
mDatePickerResultCount = 0;
dialog.setCancelable(true);
- dialog.setButton(Dialog.BUTTON_NEGATIVE, getContext()
- .getString(R.string.btn_no_date), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- if (mDatePickerResultCount++ == 0) // Note: Ignore results after the first
- // one - android sends multiples.
- {
- setExpiryDate(null);
- }
- }
- });
+ dialog.setButton(Dialog.BUTTON_NEGATIVE,
+ getContext().getString(R.string.btn_no_date),
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ if (mDatePickerResultCount++ == 0) // Note: Ignore results after the
+ // first
+ // one - android sends multiples.
+ {
+ setExpiryDate(null);
+ }
+ }
+ });
dialog.show();
}
});
@@ -237,7 +239,7 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
private void setExpiryDate(GregorianCalendar date) {
mExpiryDate = date;
if (date == null) {
- mExpiryDateButton.setText(R.string.none);
+ mExpiryDateButton.setText(getContext().getString(R.string.none));
} else {
mExpiryDateButton.setText(DateFormat.getDateInstance().format(date.getTime()));
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyServerEditor.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyServerEditor.java
index 5fdb2c9c8..01259ccd1 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyServerEditor.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyServerEditor.java
@@ -23,14 +23,15 @@ import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
-import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.beardedhen.androidbootstrap.BootstrapButton;
+
public class KeyServerEditor extends LinearLayout implements Editor, OnClickListener {
private EditorListener mEditorListener = null;
- ImageButton mDeleteButton;
+ BootstrapButton mDeleteButton;
TextView mServer;
public KeyServerEditor(Context context) {
@@ -48,7 +49,7 @@ public class KeyServerEditor extends LinearLayout implements Editor, OnClickList
mServer = (TextView) findViewById(R.id.server);
- mDeleteButton = (ImageButton) findViewById(R.id.delete);
+ mDeleteButton = (BootstrapButton) findViewById(R.id.delete);
mDeleteButton.setOnClickListener(this);
super.onFinishInflate();
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java
index 99190e9c7..91e3831b7 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java
@@ -45,17 +45,16 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragmentActivity;
+import com.beardedhen.androidbootstrap.BootstrapButton;
public class SectionView extends LinearLayout implements OnClickListener, EditorListener {
private LayoutInflater mInflater;
- private View mAdd;
- private ImageView mPlusButton;
+ private BootstrapButton mPlusButton;
private ViewGroup mEditors;
private TextView mTitle;
private int mType = 0;
@@ -103,7 +102,6 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
public void setCanEdit(boolean bCanEdit) {
canEdit = bCanEdit;
- mPlusButton = (ImageView) findViewById(R.id.plusbutton);
if (!canEdit) {
mPlusButton.setVisibility(View.INVISIBLE);
}
@@ -117,8 +115,8 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
setDrawingCacheEnabled(true);
setAlwaysDrawnWithCacheEnabled(true);
- mAdd = findViewById(R.id.header);
- mAdd.setOnClickListener(this);
+ mPlusButton = (BootstrapButton) findViewById(R.id.plusbutton);
+ mPlusButton.setOnClickListener(this);
mEditors = (ViewGroup) findViewById(R.id.editors);
mTitle = (TextView) findViewById(R.id.title);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java
index 6c65e840c..5428b626e 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java
@@ -27,14 +27,15 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.EditText;
-import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RadioButton;
+import com.beardedhen.androidbootstrap.BootstrapButton;
+
public class UserIdEditor extends LinearLayout implements Editor, OnClickListener {
private EditorListener mEditorListener = null;
- private ImageButton mDeleteButton;
+ private BootstrapButton mDeleteButton;
private RadioButton mIsMainUserId;
private EditText mName;
private EditText mEmail;
@@ -95,7 +96,7 @@ public class UserIdEditor extends LinearLayout implements Editor, OnClickListene
setDrawingCacheEnabled(true);
setAlwaysDrawnWithCacheEnabled(true);
- mDeleteButton = (ImageButton) findViewById(R.id.delete);
+ mDeleteButton = (BootstrapButton) findViewById(R.id.delete);
mDeleteButton.setOnClickListener(this);
mIsMainUserId = (RadioButton) findViewById(R.id.isMainUserId);
mIsMainUserId.setOnClickListener(this);