Updated file_dialog to use the new buttons

This commit is contained in:
Daniel Albert 2014-06-29 13:21:33 +02:00
parent e731dc139f
commit 4beff43a83
3 changed files with 9 additions and 13 deletions

View file

@ -34,9 +34,9 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Spinner;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.devspark.appmsg.AppMsg;
import org.sufficientlysecure.keychain.Constants;
@ -68,7 +68,7 @@ public class EncryptFileFragment extends Fragment {
private EditText mFilename = null;
private CheckBox mDeleteAfter = null;
private CheckBox mShareAfter = null;
private BootstrapButton mBrowse = null;
private ImageButton mBrowse = null;
private View mEncryptFile;
private FileDialogFragment mFileDialog;
@ -105,7 +105,7 @@ public class EncryptFileFragment extends Fragment {
});
mFilename = (EditText) view.findViewById(R.id.filename);
mBrowse = (BootstrapButton) view.findViewById(R.id.btn_browse);
mBrowse = (ImageButton) view.findViewById(R.id.btn_browse);
mBrowse.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if (Constants.KITKAT) {

View file

@ -35,10 +35,9 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import com.beardedhen.androidbootstrap.BootstrapButton;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.helper.FileHelper;
@ -60,7 +59,7 @@ public class FileDialogFragment extends DialogFragment {
private Messenger mMessenger;
private EditText mFilename;
private BootstrapButton mBrowse;
private ImageButton mBrowse;
private CheckBox mCheckBox;
private TextView mMessageTextView;
@ -114,7 +113,7 @@ public class FileDialogFragment extends DialogFragment {
mFilename = (EditText) view.findViewById(R.id.input);
mFilename.setText(mOutputFilename);
mBrowse = (BootstrapButton) view.findViewById(R.id.btn_browse);
mBrowse = (ImageButton) view.findViewById(R.id.btn_browse);
mBrowse.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// only .asc or .gpg files

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@ -31,17 +30,15 @@
android:minLines="2"
android:scrollbars="vertical" />
<com.beardedhen.androidbootstrap.BootstrapButton
<ImageButton
android:id="@+id/btn_browse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="4dp"
android:contentDescription="@string/filemanager_title_open"
bootstrapbutton:bb_icon_left="fa-folder-open"
bootstrapbutton:bb_roundedCorners="true"
bootstrapbutton:bb_size="default"
bootstrapbutton:bb_type="default" />
android:background="@drawable/button_rounded"
android:src="@drawable/ic_action_collection"/>
</LinearLayout>
<CheckBox