Added button_rounded style

converted decrypt_file_fragment to new style
This commit is contained in:
Daniel Albert 2014-06-28 21:12:56 +02:00
parent d19c97a714
commit bd44516576
3 changed files with 52 additions and 6 deletions

View File

@ -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() {

View 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>

View File

@ -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