Android: Remove the cancel button from the file browser
Fix the regresion from #7520, also it applies the change to the directory picker only.
This commit is contained in:
parent
0140009114
commit
47d9e8208c
|
@ -28,22 +28,17 @@ public class CustomFilePickerFragment extends FilePickerFragment
|
||||||
file);
|
file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override public void onActivityCreated(Bundle savedInstanceState)
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
|
||||||
{
|
{
|
||||||
View view = super.onCreateView(inflater, container, savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
if (view == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
TextView ok = view.findViewById(R.id.nnf_button_ok);
|
if (mode == MODE_DIR)
|
||||||
TextView cancel = view.findViewById(R.id.nnf_button_cancel);
|
{
|
||||||
|
TextView ok = getActivity().findViewById(R.id.nnf_button_ok);
|
||||||
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);
|
ok.setText(R.string.select_dir);
|
||||||
return view;
|
|
||||||
|
TextView cancel = getActivity().findViewById(R.id.nnf_button_cancel);
|
||||||
|
cancel.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue