Use flat buttons where appropriate

This commit is contained in:
Dominik Schürmann 2014-05-08 15:46:57 +02:00
parent 5a1120e791
commit 33cad382f9
15 changed files with 79 additions and 42 deletions

View File

@ -29,7 +29,6 @@ import android.support.v4.app.LoaderManager;
import android.support.v4.app.NavUtils; import android.support.v4.app.NavUtils;
import android.support.v4.content.CursorLoader; import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
@ -42,7 +41,6 @@ import android.widget.ListView;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.devspark.appmsg.AppMsg; import com.devspark.appmsg.AppMsg;
import org.spongycastle.openpgp.PGPPublicKeyRing; import org.spongycastle.openpgp.PGPPublicKeyRing;
@ -68,7 +66,7 @@ import java.util.ArrayList;
*/ */
public class CertifyKeyActivity extends ActionBarActivity implements public class CertifyKeyActivity extends ActionBarActivity implements
SelectSecretKeyLayoutFragment.SelectSecretKeyCallback, LoaderManager.LoaderCallbacks<Cursor> { SelectSecretKeyLayoutFragment.SelectSecretKeyCallback, LoaderManager.LoaderCallbacks<Cursor> {
private BootstrapButton mSignButton; private View mSignButton;
private CheckBox mUploadKeyCheckbox; private CheckBox mUploadKeyCheckbox;
private Spinner mSelectKeyserverSpinner; private Spinner mSelectKeyserverSpinner;
@ -95,7 +93,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
mSelectKeyFragment.setCallback(this); mSelectKeyFragment.setCallback(this);
mSelectKeyFragment.setFilterCertify(true); 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, ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, Preferences.getPreferences(this) android.R.layout.simple_spinner_item, Preferences.getPreferences(this)
.getKeyServers() .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() { mSignButton.setOnClickListener(new OnClickListener() {
@Override @Override
@ -350,7 +348,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
// fill values for this action // fill values for this action
Bundle data = new Bundle(); 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(); String server = (String) keyServer.getSelectedItem();
data.putString(KeychainIntentService.UPLOAD_KEY_SERVER, server); data.putString(KeychainIntentService.UPLOAD_KEY_SERVER, server);

View File

@ -86,7 +86,7 @@ public class ImportKeysActivity extends ActionBarActivity implements ActionBar.O
private ImportKeysListFragment mListFragment; private ImportKeysListFragment mListFragment;
private String[] mNavigationStrings; private String[] mNavigationStrings;
private Fragment mCurrentFragment; private Fragment mCurrentFragment;
private BootstrapButton mImportButton; private View mImportButton;
private static final Class[] NAVIGATION_CLASSES = new Class[]{ private static final Class[] NAVIGATION_CLASSES = new Class[]{
ImportKeysServerFragment.class, ImportKeysServerFragment.class,
@ -111,7 +111,7 @@ public class ImportKeysActivity extends ActionBarActivity implements ActionBar.O
setContentView(R.layout.import_keys_activity); setContentView(R.layout.import_keys_activity);
mImportButton = (BootstrapButton) findViewById(R.id.import_import); mImportButton = findViewById(R.id.import_import);
mImportButton.setOnClickListener(new OnClickListener() { mImportButton.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

View File

@ -32,8 +32,6 @@ import android.widget.ArrayAdapter;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.Toast; import android.widget.Toast;
import com.beardedhen.androidbootstrap.BootstrapButton;
import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.helper.Preferences; import org.sufficientlysecure.keychain.helper.Preferences;
@ -46,7 +44,7 @@ import org.sufficientlysecure.keychain.util.Log;
* Sends the selected public key to a keyserver * Sends the selected public key to a keyserver
*/ */
public class UploadKeyActivity extends ActionBarActivity { public class UploadKeyActivity extends ActionBarActivity {
private BootstrapButton mUploadButton; private View mUploadButton;
private Spinner mKeyServerSpinner; private Spinner mKeyServerSpinner;
private Uri mDataUri; private Uri mDataUri;
@ -55,10 +53,10 @@ public class UploadKeyActivity extends ActionBarActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(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); mUploadButton = findViewById(R.id.upload_key_action_upload);
mKeyServerSpinner = (Spinner) findViewById(R.id.sign_key_keyserver); mKeyServerSpinner = (Spinner) findViewById(R.id.upload_key_keyserver);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, Preferences.getPreferences(this) android.R.layout.simple_spinner_item, Preferences.getPreferences(this)

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

View File

@ -135,22 +135,37 @@
android:text="@string/label_send_key" /> android:text="@string/label_send_key" />
<Spinner <Spinner
android:id="@+id/sign_key_keyserver" android:id="@+id/upload_key_keyserver"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:enabled="false" /> android:enabled="false" />
<com.beardedhen.androidbootstrap.BootstrapButton <TextView
android:id="@+id/sign_key_sign_button" style="@style/SectionHeader"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="60dp" android:layout_height="0dp"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp" android:layout_marginTop="14dp"
android:text="@string/btn_certify" android:text="@string/section_actions"
bootstrapbutton:bb_icon_left="fa-pencil" android:layout_weight="1" />
bootstrapbutton:bb_type="info" />
<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="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> </LinearLayout>
</ScrollView> </ScrollView>

View File

@ -33,7 +33,7 @@
android:padding="4dp" android:padding="4dp"
android:text="@string/btn_set_passphrase" android:text="@string/btn_set_passphrase"
bootstrapbutton:bb_icon_left="fa-pencil" bootstrapbutton:bb_icon_left="fa-pencil"
bootstrapbutton:bb_type="info" /> bootstrapbutton:bb_type="default" />
<LinearLayout <LinearLayout
android:id="@+id/edit_key_container" android:id="@+id/edit_key_container"

View File

@ -25,15 +25,26 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp"> android:paddingRight="16dp">
<com.beardedhen.androidbootstrap.BootstrapButton <View
android:id="@+id/import_import"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="1dip"
android:layout_marginTop="4dp" android:background="?android:attr/listDivider" />
android:layout_marginBottom="4dp"
<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="match_parent"
android:text="@string/import_import" android:text="@string/import_import"
bootstrapbutton:bb_icon_left="fa-download" android:minHeight="?android:attr/listPreferredItemHeight"
bootstrapbutton:bb_type="info" /> android:drawableRight="@drawable/ic_action_download"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true"
style="@style/SelectableItem" />
</LinearLayout> </LinearLayout>

View File

@ -2,14 +2,14 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto" xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:orientation="vertical" > android:orientation="vertical">
<TextView <TextView
style="@style/SectionHeader" style="@style/SectionHeader"
@ -18,23 +18,38 @@
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:layout_marginTop="14dp" android:layout_marginTop="14dp"
android:text="@string/section_key_server" /> android:text="@string/section_key_server" />
<Spinner <Spinner
android:id="@+id/sign_key_keyserver" android:id="@+id/upload_key_keyserver"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:layout_marginTop="4dp" /> android:layout_marginTop="4dp" />
<com.beardedhen.androidbootstrap.BootstrapButton <TextView
android:id="@+id/btn_export_to_server" style="@style/SectionHeader"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="60dp" android:layout_height="0dp"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp" 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" android:text="@string/btn_export_to_server"
bootstrapbutton:bb_icon_left="fa-upload" android:minHeight="?android:attr/listPreferredItemHeight"
bootstrapbutton:bb_type="info" /> android:drawableRight="@drawable/ic_action_upload"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true"
style="@style/SelectableItem" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>