diff --git a/app/src/main/java/com/horaapps/leafpic/SelectAlbumBottomSheet.java b/app/src/main/java/com/horaapps/leafpic/SelectAlbumBottomSheet.java index f7e95bb9d..2b723b523 100644 --- a/app/src/main/java/com/horaapps/leafpic/SelectAlbumBottomSheet.java +++ b/app/src/main/java/com/horaapps/leafpic/SelectAlbumBottomSheet.java @@ -7,18 +7,21 @@ import android.app.Dialog; import android.content.SharedPreferences; import android.os.AsyncTask; +import android.os.Environment; import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.BottomSheetDialogFragment; import android.support.design.widget.CoordinatorLayout; import android.support.v4.content.ContextCompat; +import android.support.v7.app.AlertDialog; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.LinearLayout; @@ -138,7 +141,7 @@ public void onClick(View v) { llNewFolder.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - newFolderDialog(); + //newFolderDialog(); } }); @@ -182,15 +185,17 @@ public void onClick(View v) { private void newFolderDialog() { Toast.makeText(getContext(),"New Folder",Toast.LENGTH_SHORT).show(); - /* + root = new File(Environment.getExternalStorageDirectory().getAbsolutePath()); curFolder=root; ListDir(curFolder); - Dialog dialog= new Dialog(getContext()); + + final AlertDialog.Builder deleteDialog = new AlertDialog.Builder(getContext(), + R.style.AlertDialog_Light); + + Dialog dialog = new Dialog(getContext()); dialog.setContentView(R.layout.dialog_explorer); dialog.setTitle("Dialog Explorer"); - dialog.setCancelable(true); - dialog.setCanceledOnTouchOutside(true); textFolder = (TextView) dialog.findViewById(R.id.folder); btnUP = (Button) dialog.findViewById(R.id.up); @@ -202,6 +207,7 @@ public void onClick(View v){ }); dialog_ListView = (ListView) dialog.findViewById(R.id.folder_list); + dialog_ListView.setOnItemClickListener(new AdapterView.OnItemClickListener(){ @Override public void onItemClick(AdapterView parent, View view, int position, long id) { @@ -214,10 +220,11 @@ public void onItemClick(AdapterView parent, View view, int position, long id) } } }); - */ + } void ListDir(File f){ + if(f.equals(root)){ btnUP.setEnabled(false); } else { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index ed479fe31..18e04c95d 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -463,7 +463,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/ll_more_options_theme" - android:visibility="gone" + android:visibility="visible" android:orientation="vertical">