mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 03:25:05 -05:00
Added button_rounded style
converted decrypt_file_fragment to new style
This commit is contained in:
parent
d19c97a714
commit
bd44516576
@ -32,8 +32,8 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
|
||||||
import com.beardedhen.androidbootstrap.BootstrapButton;
|
|
||||||
import com.devspark.appmsg.AppMsg;
|
import com.devspark.appmsg.AppMsg;
|
||||||
|
|
||||||
import org.sufficientlysecure.keychain.Constants;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
@ -57,7 +57,7 @@ public class DecryptFileFragment extends DecryptFragment {
|
|||||||
// view
|
// view
|
||||||
private EditText mFilename;
|
private EditText mFilename;
|
||||||
private CheckBox mDeleteAfter;
|
private CheckBox mDeleteAfter;
|
||||||
private BootstrapButton mBrowse;
|
private ImageButton mBrowse;
|
||||||
private View mDecryptButton;
|
private View mDecryptButton;
|
||||||
|
|
||||||
private String mInputFilename = null;
|
private String mInputFilename = null;
|
||||||
@ -75,7 +75,7 @@ public class DecryptFileFragment extends DecryptFragment {
|
|||||||
View view = inflater.inflate(R.layout.decrypt_file_fragment, container, false);
|
View view = inflater.inflate(R.layout.decrypt_file_fragment, container, false);
|
||||||
|
|
||||||
mFilename = (EditText) view.findViewById(R.id.decrypt_file_filename);
|
mFilename = (EditText) view.findViewById(R.id.decrypt_file_filename);
|
||||||
mBrowse = (BootstrapButton) view.findViewById(R.id.decrypt_file_browse);
|
mBrowse = (ImageButton) view.findViewById(R.id.decrypt_file_browse);
|
||||||
mDeleteAfter = (CheckBox) view.findViewById(R.id.decrypt_file_delete_after_decryption);
|
mDeleteAfter = (CheckBox) view.findViewById(R.id.decrypt_file_delete_after_decryption);
|
||||||
mDecryptButton = view.findViewById(R.id.decrypt_file_action_decrypt);
|
mDecryptButton = view.findViewById(R.id.decrypt_file_action_decrypt);
|
||||||
mBrowse.setOnClickListener(new View.OnClickListener() {
|
mBrowse.setOnClickListener(new View.OnClickListener() {
|
||||||
|
40
OpenKeychain/src/main/res/drawable/button_rounded.xml
Normal file
40
OpenKeychain/src/main/res/drawable/button_rounded.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?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" />
|
||||||
|
<corners android:radius="10dip" />
|
||||||
|
<stroke android:color="#cccccc" android:width="2dip" />
|
||||||
|
<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" />
|
||||||
|
<corners android:radius="10dip" />
|
||||||
|
<stroke android:color="#cccccc" android:width="2dip" />
|
||||||
|
<solid android:color="#ebebeb"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item >
|
||||||
|
<shape android:shape="rectangle" >
|
||||||
|
<padding
|
||||||
|
android:bottom="6dip"
|
||||||
|
android:left="6dip"
|
||||||
|
android:right="6dip"
|
||||||
|
android:top="6dip" />
|
||||||
|
<corners android:radius="10dip" />
|
||||||
|
<stroke android:color="#cccccc" android:width="2dip" />
|
||||||
|
<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"?>
|
||||||
<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"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true">
|
android:fillViewport="true">
|
||||||
@ -43,7 +42,7 @@
|
|||||||
android:minLines="2"
|
android:minLines="2"
|
||||||
android:scrollbars="vertical" />
|
android:scrollbars="vertical" />
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<!--<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
android:id="@+id/decrypt_file_browse"
|
android:id="@+id/decrypt_file_browse"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -51,7 +50,14 @@
|
|||||||
bootstrapbutton:bb_icon_left="fa-folder-open"
|
bootstrapbutton:bb_icon_left="fa-folder-open"
|
||||||
bootstrapbutton:bb_roundedCorners="true"
|
bootstrapbutton:bb_roundedCorners="true"
|
||||||
bootstrapbutton:bb_size="default"
|
bootstrapbutton:bb_size="default"
|
||||||
bootstrapbutton:bb_type="default" />
|
bootstrapbutton:bb_type="default" />-->
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/decrypt_file_browse"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:src="@drawable/ic_action_collection"
|
||||||
|
android:background="@drawable/button_rounded"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
|
Loading…
Reference in New Issue
Block a user