Permalink
Browse files

Android: Remove the cancel button from the file browser

Fix the regresion from #7520, also it applies the change
to the directory picker only.
  • Loading branch information...
mahdihijazi committed Oct 29, 2018
1 parent 0140009 commit 47d9e8208cee6d6b8e20681650131718191e3571
@@ -28,22 +28,17 @@ public Uri toUri(@NonNull final File file)
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;
TextView ok = view.findViewById(R.id.nnf_button_ok);
TextView cancel = view.findViewById(R.id.nnf_button_cancel);
super.onActivityCreated(savedInstanceState);
ok.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
cancel.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
if (mode == MODE_DIR)
{
TextView ok = getActivity().findViewById(R.id.nnf_button_ok);
ok.setText(R.string.select_dir);
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);
}
}
}

0 comments on commit 47d9e82

Please sign in to comment.