mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
(partially) remove workaround for key params
This commit is contained in:
parent
5b4ba11fb7
commit
2466187eb3
4 changed files with 168 additions and 168 deletions
|
@ -23,6 +23,7 @@ import android.view.Gravity;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
|
@ -692,4 +693,12 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
public boolean isTablet() {
|
||||
return mContext.getResources().getInteger(R.integer.config_screen_metrics) >= 3;
|
||||
}
|
||||
|
||||
public int getStringResIdByName(final String name) {
|
||||
return mContext.getResources().getIdentifier(name, "string", mContext.getPackageName());
|
||||
}
|
||||
|
||||
public String getInLocale(@StringRes final int resId, final Locale locale) {
|
||||
return RunInLocaleKt.runInLocale(mContext, locale, (ctx) -> ctx.getString(resId));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue