code cleanup
This commit is contained in:
parent
6cff3dd25b
commit
996b025d1e
6 changed files with 6 additions and 9 deletions
|
|
@ -120,5 +120,4 @@ abstract public class Predictions {
|
|||
abstract public void onAccept(String word, String sequence);
|
||||
abstract protected boolean isRetryAllowed();
|
||||
abstract protected void onDbWords(ArrayList<String> dbWords, boolean retryAllowed);
|
||||
abstract protected ArrayList<String> generateWordVariations(String baseWord);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ public class SyllablePredictions extends Predictions {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ArrayList<String> generateWordVariations(String baseWord) {
|
||||
baseWord = baseWord == null ? "" : baseWord;
|
||||
ArrayList<String> variants = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class PreferencesActivity extends ActivityWithNavigation implements Prefe
|
|||
/**
|
||||
* onBackPressed() is deprecated, so calling the onBackPressed() on the Fragments is now more complicated.
|
||||
*/
|
||||
@NonNull public OnBackPressedCallback onBackPressedCallback = new OnBackPressedCallback(true) {
|
||||
@NonNull public final OnBackPressedCallback onBackPressedCallback = new OnBackPressedCallback(true) {
|
||||
@Override
|
||||
public void handleOnBackPressed() {
|
||||
Fragment previousFragment = getSupportFragmentManager().findFragmentById(R.id.preferences_container);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
|||
|
||||
public class HotkeysScreen extends BaseScreenFragment {
|
||||
public static final String NAME = "Hotkeys";
|
||||
@NonNull static HashMap<String, PreferenceHotkey> hotkeys = new HashMap<>();
|
||||
@NonNull static final HashMap<String, PreferenceHotkey> hotkeys = new HashMap<>();
|
||||
|
||||
|
||||
public HotkeysScreen() { init(); }
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ abstract class BaseMainLayout {
|
|||
|
||||
protected WindowInsets onApplyInsets(@NonNull View v, @NonNull WindowInsets windowInsets) {
|
||||
if (DeviceInfo.AT_LEAST_ANDROID_15) {
|
||||
return preventEdgeToEdge(v, windowInsets);
|
||||
preventEdgeToEdge(v, windowInsets);
|
||||
return WindowInsets.CONSUMED;
|
||||
} else {
|
||||
return windowInsets;
|
||||
}
|
||||
|
|
@ -77,7 +78,7 @@ abstract class BaseMainLayout {
|
|||
* the bottom of the View will be cut off by the system navigation bar.
|
||||
*/
|
||||
@RequiresApi(api = Build.VERSION_CODES.VANILLA_ICE_CREAM)
|
||||
protected WindowInsets preventEdgeToEdge(@NonNull View v, @NonNull WindowInsets windowInsets) {
|
||||
protected void preventEdgeToEdge(@NonNull View v, @NonNull WindowInsets windowInsets) {
|
||||
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(insets.left, 0, insets.right, insets.bottom);
|
||||
|
||||
|
|
@ -90,8 +91,6 @@ abstract class BaseMainLayout {
|
|||
e2ePaddingBottomPortrait = insets.bottom;
|
||||
}
|
||||
}
|
||||
|
||||
return WindowInsets.CONSUMED;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class SystemSettings {
|
|||
/**
|
||||
* Even though the background changes automatically on Android 15, thanks to edge-to-edge,
|
||||
* the text/icon color remains the device default. This function allows us to change it.
|
||||
* @see : <a href="https://stackoverflow.com/a/77240330">the only working solution</a>.
|
||||
* @see: <a href="https://stackoverflow.com/a/77240330">the only working solution</a>.
|
||||
*/
|
||||
public static void setNavigationBarDarkTheme(@Nullable Window window, boolean dark) {
|
||||
if (!DeviceInfo.AT_LEAST_ANDROID_11) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue