From 47d9e8208cee6d6b8e20681650131718191e3571 Mon Sep 17 00:00:00 2001 From: mahdihijazi Date: Mon, 29 Oct 2018 21:17:41 +0100 Subject: [PATCH] Android: Remove the cancel button from the file browser Fix the regresion from #7520, also it applies the change to the directory picker only. --- .../fragments/CustomFilePickerFragment.java | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java index 3f7913ca41..372d9854ca 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java @@ -28,22 +28,17 @@ public class CustomFilePickerFragment extends FilePickerFragment file); } - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) + @Override public void onActivityCreated(Bundle savedInstanceState) { - View view = super.onCreateView(inflater, container, savedInstanceState); - if (view == null) - return null; + super.onActivityCreated(savedInstanceState); - TextView ok = view.findViewById(R.id.nnf_button_ok); - TextView cancel = view.findViewById(R.id.nnf_button_cancel); + if (mode == MODE_DIR) + { + TextView ok = getActivity().findViewById(R.id.nnf_button_ok); + ok.setText(R.string.select_dir); - ok.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); - cancel.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); - - ok.setAllCaps(false); - cancel.setAllCaps(false); - ok.setText(R.string.select_dir); - return view; + TextView cancel = getActivity().findViewById(R.id.nnf_button_cancel); + cancel.setVisibility(View.GONE); + } } }