diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-05-08 15:46:57 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-05-08 15:46:57 +0200 |
commit | 33cad382f96b673587e841932ea322a1dd6fa23b (patch) | |
tree | 571da2040f52346a734c936d7a7c37d2e3c28afd /OpenKeychain | |
parent | 5a1120e79113c94bcc8620ba086d6203d62b1b1d (diff) | |
download | open-keychain-33cad382f96b673587e841932ea322a1dd6fa23b.tar.gz open-keychain-33cad382f96b673587e841932ea322a1dd6fa23b.tar.bz2 open-keychain-33cad382f96b673587e841932ea322a1dd6fa23b.zip |
Use flat buttons where appropriate
Diffstat (limited to 'OpenKeychain')
15 files changed, 77 insertions, 40 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java index 29969ca55..bd12a3b52 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java @@ -29,7 +29,6 @@ import android.support.v4.app.LoaderManager; import android.support.v4.app.NavUtils; import android.support.v4.content.CursorLoader; import android.support.v4.content.Loader; -import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; import android.view.MenuItem; import android.view.View; @@ -42,7 +41,6 @@ import android.widget.ListView; import android.widget.Spinner; import android.widget.TextView; -import com.beardedhen.androidbootstrap.BootstrapButton; import com.devspark.appmsg.AppMsg; import org.spongycastle.openpgp.PGPPublicKeyRing; @@ -68,7 +66,7 @@ import java.util.ArrayList; */ public class CertifyKeyActivity extends ActionBarActivity implements SelectSecretKeyLayoutFragment.SelectSecretKeyCallback, LoaderManager.LoaderCallbacks<Cursor> { - private BootstrapButton mSignButton; + private View mSignButton; private CheckBox mUploadKeyCheckbox; private Spinner mSelectKeyserverSpinner; @@ -95,7 +93,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements mSelectKeyFragment.setCallback(this); mSelectKeyFragment.setFilterCertify(true); - mSelectKeyserverSpinner = (Spinner) findViewById(R.id.sign_key_keyserver); + mSelectKeyserverSpinner = (Spinner) findViewById(R.id.upload_key_keyserver); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, Preferences.getPreferences(this) .getKeyServers() @@ -122,7 +120,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements } }); - mSignButton = (BootstrapButton) findViewById(R.id.sign_key_sign_button); + mSignButton = findViewById(R.id.sign_key_sign_button); mSignButton.setOnClickListener(new OnClickListener() { @Override @@ -350,7 +348,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements // fill values for this action Bundle data = new Bundle(); - Spinner keyServer = (Spinner) findViewById(R.id.sign_key_keyserver); + Spinner keyServer = (Spinner) findViewById(R.id.upload_key_keyserver); String server = (String) keyServer.getSelectedItem(); data.putString(KeychainIntentService.UPLOAD_KEY_SERVER, server); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java index f71ef6d46..bb5d2e922 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java @@ -86,7 +86,7 @@ public class ImportKeysActivity extends ActionBarActivity implements ActionBar.O private ImportKeysListFragment mListFragment; private String[] mNavigationStrings; private Fragment mCurrentFragment; - private BootstrapButton mImportButton; + private View mImportButton; private static final Class[] NAVIGATION_CLASSES = new Class[]{ ImportKeysServerFragment.class, @@ -111,7 +111,7 @@ public class ImportKeysActivity extends ActionBarActivity implements ActionBar.O setContentView(R.layout.import_keys_activity); - mImportButton = (BootstrapButton) findViewById(R.id.import_import); + mImportButton = findViewById(R.id.import_import); mImportButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java index 90783aa8b..dbd1b7507 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/UploadKeyActivity.java @@ -32,8 +32,6 @@ import android.widget.ArrayAdapter; import android.widget.Spinner; import android.widget.Toast; -import com.beardedhen.androidbootstrap.BootstrapButton; - import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.helper.Preferences; @@ -46,7 +44,7 @@ import org.sufficientlysecure.keychain.util.Log; * Sends the selected public key to a keyserver */ public class UploadKeyActivity extends ActionBarActivity { - private BootstrapButton mUploadButton; + private View mUploadButton; private Spinner mKeyServerSpinner; private Uri mDataUri; @@ -55,10 +53,10 @@ public class UploadKeyActivity extends ActionBarActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.key_server_export); + setContentView(R.layout.upload_key_activity); - mUploadButton = (BootstrapButton) findViewById(R.id.btn_export_to_server); - mKeyServerSpinner = (Spinner) findViewById(R.id.sign_key_keyserver); + mUploadButton = findViewById(R.id.upload_key_action_upload); + mKeyServerSpinner = (Spinner) findViewById(R.id.upload_key_keyserver); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, Preferences.getPreferences(this) diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_download.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_download.png Binary files differnew file mode 100644 index 000000000..1f3d06519 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_download.png diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_upload.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_upload.png Binary files differnew file mode 100644 index 000000000..b53640176 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_upload.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_download.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_download.png Binary files differnew file mode 100644 index 000000000..c2ead0cef --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_download.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_upload.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_upload.png Binary files differnew file mode 100644 index 000000000..5bef3ca81 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_upload.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_download.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_download.png Binary files differnew file mode 100644 index 000000000..38a3aeea6 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_download.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_upload.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_upload.png Binary files differnew file mode 100644 index 000000000..27af9a43c --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_upload.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_download.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_download.png Binary files differnew file mode 100644 index 000000000..ef7785a48 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_download.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_upload.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_upload.png Binary files differnew file mode 100644 index 000000000..48a0cd149 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_upload.png diff --git a/OpenKeychain/src/main/res/layout/certify_key_activity.xml b/OpenKeychain/src/main/res/layout/certify_key_activity.xml index 6fd047187..bb43fa805 100644 --- a/OpenKeychain/src/main/res/layout/certify_key_activity.xml +++ b/OpenKeychain/src/main/res/layout/certify_key_activity.xml @@ -135,22 +135,37 @@ android:text="@string/label_send_key" /> <Spinner - android:id="@+id/sign_key_keyserver" + android:id="@+id/upload_key_keyserver" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="4dp" android:layout_marginTop="4dp" android:enabled="false" /> - <com.beardedhen.androidbootstrap.BootstrapButton + <TextView + style="@style/SectionHeader" + android:layout_width="wrap_content" + android:layout_height="0dp" + android:layout_marginTop="14dp" + android:text="@string/section_actions" + android:layout_weight="1" /> + + <TextView android:id="@+id/sign_key_sign_button" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:layout_marginBottom="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="match_parent" - android:layout_height="60dp" - android:layout_marginBottom="4dp" - android:layout_marginTop="14dp" - android:text="@string/btn_certify" - bootstrapbutton:bb_icon_left="fa-pencil" - bootstrapbutton:bb_type="info" /> + android:layout_height="match_parent" + android:text="@string/key_view_action_certify" + android:minHeight="?android:attr/listPreferredItemHeight" + android:drawableRight="@drawable/ic_action_good" + android:drawablePadding="8dp" + android:gravity="center_vertical" + android:clickable="true" + style="@style/SelectableItem" /> + </LinearLayout> </ScrollView>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/edit_key_activity.xml b/OpenKeychain/src/main/res/layout/edit_key_activity.xml index fc4422cf0..1ce5c096f 100644 --- a/OpenKeychain/src/main/res/layout/edit_key_activity.xml +++ b/OpenKeychain/src/main/res/layout/edit_key_activity.xml @@ -33,7 +33,7 @@ android:padding="4dp" android:text="@string/btn_set_passphrase" bootstrapbutton:bb_icon_left="fa-pencil" - bootstrapbutton:bb_type="info" /> + bootstrapbutton:bb_type="default" /> <LinearLayout android:id="@+id/edit_key_container" diff --git a/OpenKeychain/src/main/res/layout/import_keys_activity.xml b/OpenKeychain/src/main/res/layout/import_keys_activity.xml index eb1333704..876374700 100644 --- a/OpenKeychain/src/main/res/layout/import_keys_activity.xml +++ b/OpenKeychain/src/main/res/layout/import_keys_activity.xml @@ -25,15 +25,26 @@ android:paddingLeft="16dp" android:paddingRight="16dp"> - <com.beardedhen.androidbootstrap.BootstrapButton + <View + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="?android:attr/listDivider" /> + + <TextView android:id="@+id/import_import" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:layout_marginBottom="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="match_parent" - android:layout_height="50dp" - android:layout_marginTop="4dp" - android:layout_marginBottom="4dp" + android:layout_height="match_parent" android:text="@string/import_import" - bootstrapbutton:bb_icon_left="fa-download" - bootstrapbutton:bb_type="info" /> + android:minHeight="?android:attr/listPreferredItemHeight" + android:drawableRight="@drawable/ic_action_download" + android:drawablePadding="8dp" + android:gravity="center_vertical" + android:clickable="true" + style="@style/SelectableItem" /> </LinearLayout> diff --git a/OpenKeychain/src/main/res/layout/key_server_export.xml b/OpenKeychain/src/main/res/layout/upload_key_activity.xml index 6031bf7c7..5a6f732d5 100644 --- a/OpenKeychain/src/main/res/layout/key_server_export.xml +++ b/OpenKeychain/src/main/res/layout/upload_key_activity.xml @@ -2,14 +2,14 @@ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent" > + android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="16dp" android:paddingRight="16dp" - android:orientation="vertical" > + android:orientation="vertical"> <TextView style="@style/SectionHeader" @@ -18,23 +18,38 @@ android:layout_marginBottom="4dp" android:layout_marginTop="14dp" android:text="@string/section_key_server" /> - + <Spinner - android:id="@+id/sign_key_keyserver" + android:id="@+id/upload_key_keyserver" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="4dp" android:layout_marginTop="4dp" /> - <com.beardedhen.androidbootstrap.BootstrapButton - android:id="@+id/btn_export_to_server" - android:layout_width="match_parent" - android:layout_height="60dp" - android:layout_marginBottom="4dp" + <TextView + style="@style/SectionHeader" + android:layout_width="wrap_content" + android:layout_height="0dp" android:layout_marginTop="14dp" + android:text="@string/section_actions" + android:layout_weight="1" /> + + <TextView + android:id="@+id/upload_key_action_upload" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:layout_marginBottom="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="match_parent" android:text="@string/btn_export_to_server" - bootstrapbutton:bb_icon_left="fa-upload" - bootstrapbutton:bb_type="info" /> + android:minHeight="?android:attr/listPreferredItemHeight" + android:drawableRight="@drawable/ic_action_upload" + android:drawablePadding="8dp" + android:gravity="center_vertical" + android:clickable="true" + style="@style/SelectableItem" /> + </LinearLayout> </ScrollView>
\ No newline at end of file |