From 9428db505c9257ab8ee6c5656e630221162a14ec Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sat, 28 Mar 2020 20:14:30 +0100 Subject: [PATCH] Android: Change the file browser dialog ok button title I hope this will make it more clear to users that they are suppose to select the dircetory that has the games. Original commit by mahdihijazi for Dolphin-emu. --- .../fragments/CustomFilePickerFragment.java | 21 +++++++++++++++++++ .../app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 23 insertions(+) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/fragments/CustomFilePickerFragment.java b/src/android/app/src/main/java/org/citra/citra_emu/fragments/CustomFilePickerFragment.java index 4324ecf38..a726840d4 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/fragments/CustomFilePickerFragment.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/fragments/CustomFilePickerFragment.java @@ -1,9 +1,11 @@ package org.citra.citra_emu.fragments; import android.net.Uri; +import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.content.FileProvider; import android.support.v7.widget.Toolbar; +import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -27,6 +29,25 @@ public class CustomFilePickerFragment extends FilePickerFragment { file); } + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, 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); + + 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; + } + @Override protected View inflateRootView(LayoutInflater inflater, ViewGroup container) { View view = super.inflateRootView(inflater, container); diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index e03b52b27..1c608763d 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -135,4 +135,6 @@ Loading Settings... The external storage needs to be available in order to use Citra + + Select This Directory