mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -05:00
Added new button style and converted account_settings and the select_secret_key_layout to use it
This commit is contained in:
parent
4beff43a83
commit
9091c22240
@ -28,8 +28,7 @@ import android.widget.AdapterView;
|
|||||||
import android.widget.AdapterView.OnItemSelectedListener;
|
import android.widget.AdapterView.OnItemSelectedListener;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Button;
|
||||||
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;
|
||||||
@ -57,7 +56,7 @@ public class AccountSettingsFragment extends Fragment implements
|
|||||||
private Spinner mCompression;
|
private Spinner mCompression;
|
||||||
|
|
||||||
private SelectSecretKeyLayoutFragment mSelectKeyFragment;
|
private SelectSecretKeyLayoutFragment mSelectKeyFragment;
|
||||||
private BootstrapButton mCreateKeyButton;
|
private Button mCreateKeyButton;
|
||||||
|
|
||||||
KeyValueSpinnerAdapter mEncryptionAdapter;
|
KeyValueSpinnerAdapter mEncryptionAdapter;
|
||||||
KeyValueSpinnerAdapter mHashAdapter;
|
KeyValueSpinnerAdapter mHashAdapter;
|
||||||
@ -107,7 +106,7 @@ public class AccountSettingsFragment extends Fragment implements
|
|||||||
.findViewById(R.id.api_account_settings_encryption_algorithm);
|
.findViewById(R.id.api_account_settings_encryption_algorithm);
|
||||||
mHashAlgorithm = (Spinner) view.findViewById(R.id.api_account_settings_hash_algorithm);
|
mHashAlgorithm = (Spinner) view.findViewById(R.id.api_account_settings_hash_algorithm);
|
||||||
mCompression = (Spinner) view.findViewById(R.id.api_account_settings_compression);
|
mCompression = (Spinner) view.findViewById(R.id.api_account_settings_compression);
|
||||||
mCreateKeyButton = (BootstrapButton) view.findViewById(R.id.api_account_settings_create_key);
|
mCreateKeyButton = (Button) view.findViewById(R.id.api_account_settings_create_key);
|
||||||
|
|
||||||
mCreateKeyButton.setOnClickListener(new View.OnClickListener() {
|
mCreateKeyButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,10 +30,9 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.beardedhen.androidbootstrap.BootstrapButton;
|
|
||||||
|
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
import org.sufficientlysecure.keychain.pgp.KeyRing;
|
||||||
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
|
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
|
||||||
@ -45,7 +44,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment implements LoaderMan
|
|||||||
private TextView mKeyUserIdRest;
|
private TextView mKeyUserIdRest;
|
||||||
private TextView mKeyMasterKeyIdHex;
|
private TextView mKeyMasterKeyIdHex;
|
||||||
private TextView mNoKeySelected;
|
private TextView mNoKeySelected;
|
||||||
private BootstrapButton mSelectKeyButton;
|
private Button mSelectKeyButton;
|
||||||
private Boolean mFilterCertify, mFilterSign;
|
private Boolean mFilterCertify, mFilterSign;
|
||||||
|
|
||||||
private Uri mReceivedUri = null;
|
private Uri mReceivedUri = null;
|
||||||
@ -117,8 +116,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment implements LoaderMan
|
|||||||
mKeyUserId = (TextView) view.findViewById(R.id.select_secret_key_user_id);
|
mKeyUserId = (TextView) view.findViewById(R.id.select_secret_key_user_id);
|
||||||
mKeyUserIdRest = (TextView) view.findViewById(R.id.select_secret_key_user_id_rest);
|
mKeyUserIdRest = (TextView) view.findViewById(R.id.select_secret_key_user_id_rest);
|
||||||
mKeyMasterKeyIdHex = (TextView) view.findViewById(R.id.select_secret_key_master_key_hex);
|
mKeyMasterKeyIdHex = (TextView) view.findViewById(R.id.select_secret_key_master_key_hex);
|
||||||
mSelectKeyButton = (BootstrapButton) view
|
mSelectKeyButton = (Button) view.findViewById(R.id.select_secret_key_select_key_button);
|
||||||
.findViewById(R.id.select_secret_key_select_key_button);
|
|
||||||
mFilterCertify = false;
|
mFilterCertify = false;
|
||||||
mFilterSign = false;
|
mFilterSign = false;
|
||||||
mSelectKeyButton.setOnClickListener(new OnClickListener() {
|
mSelectKeyButton.setOnClickListener(new OnClickListener() {
|
||||||
|
BIN
OpenKeychain/src/main/res/drawable-hdpi/ic_action_accounts.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-hdpi/ic_action_accounts.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 641 B |
BIN
OpenKeychain/src/main/res/drawable-mdpi/ic_action_accounts.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-mdpi/ic_action_accounts.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 506 B |
BIN
OpenKeychain/src/main/res/drawable-xhdpi/ic_action_accounts.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-xhdpi/ic_action_accounts.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 765 B |
BIN
OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_accounts.png
Normal file
BIN
OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_accounts.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
37
OpenKeychain/src/main/res/drawable/button_edgy.xml
Normal file
37
OpenKeychain/src/main/res/drawable/button_edgy.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_pressed="true" >
|
||||||
|
<shape android:shape="rectangle" >
|
||||||
|
<padding
|
||||||
|
android:bottom="6dip"
|
||||||
|
android:left="6dip"
|
||||||
|
android:right="6dip"
|
||||||
|
android:top="6dip" />
|
||||||
|
<stroke android:color="#cccccc" android:width="1.5dip" />
|
||||||
|
<stroke android:color="#ebebeb" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:state_focused="true">
|
||||||
|
<shape android:shape="rectangle" >
|
||||||
|
<padding
|
||||||
|
android:bottom="6dip"
|
||||||
|
android:left="6dip"
|
||||||
|
android:right="6dip"
|
||||||
|
android:top="6dip" />
|
||||||
|
<stroke android:color="#cccccc" android:width="1.5dip" />
|
||||||
|
<solid android:color="#ebebeb"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item >
|
||||||
|
<shape android:shape="rectangle" >
|
||||||
|
<padding
|
||||||
|
android:bottom="6dip"
|
||||||
|
android:left="6dip"
|
||||||
|
android:right="6dip"
|
||||||
|
android:top="6dip" />
|
||||||
|
<stroke android:color="#cccccc" android:width="1.5dip" />
|
||||||
|
<solid android:color="#ffffff" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
@ -1,6 +1,5 @@
|
|||||||
<?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 xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -43,7 +42,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:layout="@layout/select_secret_key_layout_fragment" />
|
tools:layout="@layout/select_secret_key_layout_fragment" />
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<Button
|
||||||
android:id="@+id/api_account_settings_create_key"
|
android:id="@+id/api_account_settings_create_key"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -52,9 +51,9 @@
|
|||||||
android:layout_marginRight="4dp"
|
android:layout_marginRight="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:text="@string/api_settings_create_key"
|
android:text="@string/api_settings_create_key"
|
||||||
bootstrapbutton:bb_icon_left="fa-key"
|
android:background="@drawable/button_edgy"
|
||||||
bootstrapbutton:bb_size="default"
|
android:drawableLeft="@drawable/ic_action_accounts"
|
||||||
bootstrapbutton:bb_type="default" />
|
android:textSize="14dip"/>
|
||||||
|
|
||||||
<org.sufficientlysecure.keychain.ui.widget.FoldableLinearLayout
|
<org.sufficientlysecure.keychain.ui.widget.FoldableLinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<?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 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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<Button
|
||||||
android:id="@+id/select_secret_key_select_key_button"
|
android:id="@+id/select_secret_key_select_key_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -14,9 +13,9 @@
|
|||||||
android:layout_marginRight="4dp"
|
android:layout_marginRight="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:text="@string/api_settings_select_key"
|
android:text="@string/api_settings_select_key"
|
||||||
bootstrapbutton:bb_icon_left="fa-key"
|
android:drawableLeft="@drawable/ic_action_accounts"
|
||||||
bootstrapbutton:bb_size="default"
|
android:background="@drawable/button_edgy"
|
||||||
bootstrapbutton:bb_type="default" />
|
android:textSize="14dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user