From 49ecd2f65c7774d53da37515dc53a7908d08470a Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sat, 2 May 2020 21:34:27 +0200 Subject: [PATCH] android: Run final format --- .../fragments/CustomFilePickerFragment.java | 2 +- .../citra/citra_emu/model/GameDatabase.java | 17 +++++----- src/android/app/src/main/jni/native.cpp | 5 ++- .../src/main/res/animator/settings_enter.xml | 6 ++-- .../src/main/res/animator/settings_exit.xml | 6 ++-- .../main/res/animator/settings_pop_enter.xml | 6 ++-- .../main/res/animator/setttings_pop_exit.xml | 6 ++-- .../src/main/res/layout/activity_settings.xml | 6 ++-- .../app/src/main/res/layout/card_game.xml | 2 +- .../src/main/res/layout/dialog_seekbar.xml | 14 ++++---- .../main/res/layout/filepicker_toolbar.xml | 6 ++-- .../main/res/layout/fragment_emulation.xml | 4 +-- .../app/src/main/res/layout/fragment_grid.xml | 8 ++--- .../src/main/res/layout/list_item_setting.xml | 20 +++++------ .../res/layout/list_item_setting_checkbox.xml | 18 +++++----- .../res/layout/list_item_settings_header.xml | 6 ++-- .../main/res/layout/premium_item_setting.xml | 2 +- .../res/layout/sysclock_datetime_picker.xml | 11 +++--- .../app/src/main/res/menu/menu_emulation.xml | 34 +++++++++---------- .../res/mipmap-anydpi-v26/ic_launcher.xml | 4 +-- .../app/src/main/res/values-fi/strings.xml | 2 +- .../app/src/main/res/values-ja/strings.xml | 2 +- .../res/values-night/styles_filepicker.xml | 1 + .../app/src/main/res/values/arrays.xml | 2 +- .../src/main/res/values/styles_filepicker.xml | 1 + 25 files changed, 95 insertions(+), 96 deletions(-) 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 e91b32113..1fa3ffeaa 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 @@ -96,7 +96,7 @@ public class CustomFilePickerFragment extends FilePickerFragment { @Override public void goUp() { - if(Environment.getExternalStorageDirectory().getPath().equals(mCurrentPath.getPath())) { + if (Environment.getExternalStorageDirectory().getPath().equals(mCurrentPath.getPath())) { return; } super.goUp(); diff --git a/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java b/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java index 3c9f905f7..215528541 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java @@ -168,13 +168,13 @@ public final class GameDatabase extends SQLiteOpenHelper { folderCursor.close(); Arrays.stream(NativeLibrary.GetInstalledGamePaths()) - .forEach(filePath -> attemptToAddGame(database, filePath)); + .forEach(filePath -> attemptToAddGame(database, filePath)); database.close(); } private static void addGamesRecursive(SQLiteDatabase database, File parent, Set allowedExtensions, int depth) { - if(depth <= 0) { + if (depth <= 0) { return; } @@ -189,8 +189,7 @@ public final class GameDatabase extends SQLiteOpenHelper { Set newExtensions = new HashSet<>(Arrays.asList( ".3ds", ".3dsx", ".elf", ".axf", ".cci", ".cxi", ".app")); addGamesRecursive(database, file, newExtensions, depth - 1); - } - else { + } else { String filePath = file.getPath(); int extensionStart = filePath.lastIndexOf('.'); @@ -224,11 +223,11 @@ public final class GameDatabase extends SQLiteOpenHelper { } ContentValues game = Game.asContentValues(name, - NativeLibrary.GetDescription(filePath).replace("\n", " "), - NativeLibrary.GetRegions(filePath), - filePath, - gameId, - NativeLibrary.GetCompany(filePath)); + NativeLibrary.GetDescription(filePath).replace("\n", " "), + NativeLibrary.GetRegions(filePath), + filePath, + gameId, + NativeLibrary.GetCompany(filePath)); // Try to update an existing game first. int rowsMatched = database.update(TABLE_NAME_GAMES, // Which table to update. diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 915bea1f7..67d121eef 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -250,9 +250,8 @@ jobjectArray Java_org_citra_citra_1emu_NativeLibrary_GetInstalledGamePaths( ScanDir(nullptr, "", FileUtil::GetUserPath(FileUtil::UserPath::NANDDir) + "00000000000000000000000000000000/title/00040010"); - jobjectArray jgames = - env->NewObjectArray(static_cast(games.size()), env->FindClass("java/lang/String"), - nullptr); + jobjectArray jgames = env->NewObjectArray(static_cast(games.size()), + env->FindClass("java/lang/String"), nullptr); for (jsize i = 0; i < games.size(); ++i) env->SetObjectArrayElement(jgames, i, env->NewStringUTF(games[i].c_str())); return jgames; diff --git a/src/android/app/src/main/res/animator/settings_enter.xml b/src/android/app/src/main/res/animator/settings_enter.xml index 23ba7b802..3c216a054 100644 --- a/src/android/app/src/main/res/animator/settings_enter.xml +++ b/src/android/app/src/main/res/animator/settings_enter.xml @@ -7,7 +7,7 @@ android:propertyName="yFraction" android:startOffset="@android:integer/config_shortAnimTime" android:valueFrom="1.0" - android:valueTo="0"/> + android:valueTo="0" /> + android:valueTo="0" /> + android:valueTo="0" /> \ No newline at end of file diff --git a/src/android/app/src/main/res/animator/settings_exit.xml b/src/android/app/src/main/res/animator/settings_exit.xml index fece2c34e..a233b6757 100644 --- a/src/android/app/src/main/res/animator/settings_exit.xml +++ b/src/android/app/src/main/res/animator/settings_exit.xml @@ -7,7 +7,7 @@ android:propertyName="visibleness" android:valueFrom="1.0f" android:valueTo="0.6f" - android:valueType="floatType"/> + android:valueType="floatType" /> + android:valueTo="-100.0" /> + android:valueTo="-100.0" /> \ No newline at end of file diff --git a/src/android/app/src/main/res/animator/settings_pop_enter.xml b/src/android/app/src/main/res/animator/settings_pop_enter.xml index 36c8a27e7..080bc27c4 100644 --- a/src/android/app/src/main/res/animator/settings_pop_enter.xml +++ b/src/android/app/src/main/res/animator/settings_pop_enter.xml @@ -7,7 +7,7 @@ android:propertyName="visibleness" android:valueFrom="0.6f" android:valueTo="1.0f" - android:valueType="floatType"/> + android:valueType="floatType" /> + android:valueTo="0" /> + android:valueTo="0" /> \ No newline at end of file diff --git a/src/android/app/src/main/res/animator/setttings_pop_exit.xml b/src/android/app/src/main/res/animator/setttings_pop_exit.xml index dd16018f2..4fccbcca2 100644 --- a/src/android/app/src/main/res/animator/setttings_pop_exit.xml +++ b/src/android/app/src/main/res/animator/setttings_pop_exit.xml @@ -6,7 +6,7 @@ android:interpolator="@android:interpolator/accelerate_cubic" android:propertyName="yFraction" android:valueFrom="0" - android:valueTo="1.0"/> + android:valueTo="1.0" /> + android:valueTo="100" /> + android:valueTo="100" /> \ No newline at end of file diff --git a/src/android/app/src/main/res/layout/activity_settings.xml b/src/android/app/src/main/res/layout/activity_settings.xml index 492fbf04e..11b91c45f 100644 --- a/src/android/app/src/main/res/layout/activity_settings.xml +++ b/src/android/app/src/main/res/layout/activity_settings.xml @@ -1,5 +1,5 @@ + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/frame_content" /> diff --git a/src/android/app/src/main/res/layout/card_game.xml b/src/android/app/src/main/res/layout/card_game.xml index 5675d4e7c..6e87490f9 100644 --- a/src/android/app/src/main/res/layout/card_game.xml +++ b/src/android/app/src/main/res/layout/card_game.xml @@ -44,7 +44,7 @@ app:layout_constraintStart_toEndOf="@+id/image_game_screen" app:layout_constraintTop_toTopOf="parent" tools:text="The Legend of Zelda\nOcarina of Time 3D" - android:textColor="@color/header_text" /> + android:textColor="@color/header_text" /> + xmlns:tools="http://schemas.android.com/tools" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + android:layout_marginBottom="@dimen/spacing_medlarge" /> + android:layout_marginBottom="@dimen/spacing_medlarge" /> + android:layout_toEndOf="@+id/text_value" /> \ No newline at end of file diff --git a/src/android/app/src/main/res/layout/filepicker_toolbar.xml b/src/android/app/src/main/res/layout/filepicker_toolbar.xml index 9d87570bc..644934171 100644 --- a/src/android/app/src/main/res/layout/filepicker_toolbar.xml +++ b/src/android/app/src/main/res/layout/filepicker_toolbar.xml @@ -1,6 +1,5 @@ - + android:orientation="vertical"> + + android:focusableInTouchMode="true" /> + android:visibility="gone" /> diff --git a/src/android/app/src/main/res/layout/fragment_grid.xml b/src/android/app/src/main/res/layout/fragment_grid.xml index e5f0a5dc0..f5b6c2e19 100644 --- a/src/android/app/src/main/res/layout/fragment_grid.xml +++ b/src/android/app/src/main/res/layout/fragment_grid.xml @@ -1,8 +1,8 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent"> + android:gravity="center" /> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?android:attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + android:gravity="center_vertical" + android:minHeight="72dp" + android:paddingTop="@dimen/spacing_large" + android:paddingBottom="@dimen/spacing_large"> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="72dp" + android:background="?android:attr/selectableItemBackground" + android:focusable="true" + android:clickable="true"> + tools:text="@string/frame_limit_enable" /> + android:clickable="false" /> \ No newline at end of file diff --git a/src/android/app/src/main/res/layout/list_item_settings_header.xml b/src/android/app/src/main/res/layout/list_item_settings_header.xml index 7a7d02cbc..d220dfd61 100644 --- a/src/android/app/src/main/res/layout/list_item_settings_header.xml +++ b/src/android/app/src/main/res/layout/list_item_settings_header.xml @@ -1,8 +1,8 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="48dp"> + android:textColor="@color/header_subtext" /> \ No newline at end of file diff --git a/src/android/app/src/main/res/layout/sysclock_datetime_picker.xml b/src/android/app/src/main/res/layout/sysclock_datetime_picker.xml index 1f0526b55..d082f5283 100644 --- a/src/android/app/src/main/res/layout/sysclock_datetime_picker.xml +++ b/src/android/app/src/main/res/layout/sysclock_datetime_picker.xml @@ -1,23 +1,22 @@ - + android:gravity="center"> + + android:spinnersShown="true" /> + android:timePickerMode="spinner" /> diff --git a/src/android/app/src/main/res/menu/menu_emulation.xml b/src/android/app/src/main/res/menu/menu_emulation.xml index e5c71fb86..b29c862e8 100644 --- a/src/android/app/src/main/res/menu/menu_emulation.xml +++ b/src/android/app/src/main/res/menu/menu_emulation.xml @@ -1,7 +1,7 @@ + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + tools:context="org.citra.citra_emu.activities.EmulationActivity"> + android:title="@string/emulation_edit_layout" /> + android:title="@string/emulation_toggle_controls" /> + android:title="@string/emulation_control_scale" /> + android:title="@string/emulation_touch_overlay_reset" /> @@ -31,11 +31,11 @@ + android:title="@string/menu_emulation_amiibo_load" /> + android:title="@string/menu_emulation_amiibo_remove" /> @@ -47,19 +47,19 @@ + android:title="@string/emulation_screen_layout_landscape" /> + android:title="@string/emulation_screen_layout_portrait" /> + android:title="@string/emulation_screen_layout_single" /> + android:title="@string/emulation_screen_layout_sidebyside" /> @@ -68,23 +68,23 @@ android:id="@+id/menu_emulation_swap_screens" app:showAsAction="never" android:title="@string/emulation_swap_screens" - android:checkable="true"/> + android:checkable="true" /> + android:checkable="true" /> + android:checkable="true" /> + android:title="@string/emulation_open_settings" /> diff --git a/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 036d09bc5..c9ad5f98f 100644 --- a/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/src/android/app/src/main/res/values-fi/strings.xml b/src/android/app/src/main/res/values-fi/strings.xml index dfdfdc88d..984af2d3c 100644 --- a/src/android/app/src/main/res/values-fi/strings.xml +++ b/src/android/app/src/main/res/values-fi/strings.xml @@ -93,4 +93,4 @@ Unohdin Tekstin pituus ei ole oikein (pitäisi olla %d merkkiä) Teksti on liian pitkä (ei pitäisi olla enempää kuin %d merkkiä) - + diff --git a/src/android/app/src/main/res/values-ja/strings.xml b/src/android/app/src/main/res/values-ja/strings.xml index 8b3a0e067..9dc441ec8 100644 --- a/src/android/app/src/main/res/values-ja/strings.xml +++ b/src/android/app/src/main/res/values-ja/strings.xml @@ -111,4 +111,4 @@ 空白だけの入力はできません 入力なしのまま進めることはできません - + diff --git a/src/android/app/src/main/res/values-night/styles_filepicker.xml b/src/android/app/src/main/res/values-night/styles_filepicker.xml index 79af40c03..1a175cdcf 100644 --- a/src/android/app/src/main/res/values-night/styles_filepicker.xml +++ b/src/android/app/src/main/res/values-night/styles_filepicker.xml @@ -1,4 +1,5 @@ +