Skip to content

Commit

Permalink
[optimize|doc] Support per-app language; update README
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyD666 committed Dec 23, 2023
1 parent b5e5398 commit bc74aee
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
## 🤩 Screenshots

![ic_home_screen](image/en/ic_home_screen.jpg) ![ic_home_screen_search](image/en/ic_home_screen_search.jpg)
![ic_add_screen_edit](image/en/ic_add_screen_edit.jpg) ![ic_home_screen_share](image/en/ic_home_screen_share.jpg)
![ic_add_screen_add](image/en/ic_add_screen_add.jpg) ![ic_share](image/en/ic_share.jpg)
![ic_appearance_screen](image/en/ic_appearance_screen.jpg) ![ic_import_export_screen](image/en/ic_import_export_screen.jpg)
![ic_mini_tool_screen](image/en/ic_mini_tool_screen.jpg) ![ic_style_transfer_screen](image/en/ic_style_transfer_screen.jpg)
![ic_search_config_screen](image/en/ic_search_config_screen.jpg) ![ic_more_screen](image/en/ic_more_screen.jpg)
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
applicationId "com.skyd.rays"
minSdk 24
targetSdk 34
versionCode 58
versionCode 59
versionName "2.0"
flavorDimensions = ["versionName"]

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Rays"
tools:targetApi="31">
<activity
android:name=".ui.activity.MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/Theme.Rays.NoActionBar.Splash"
android:windowSoftInputMode="adjustResize">
<intent-filter>
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/java/com/skyd/rays/ui/activity/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,13 @@ class MainActivity : AppCompatActivity() {
}
}

private fun initIntent() {
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)

initIntent(intent)
}

private fun initIntent(intent: Intent? = getIntent()) {
val stickers: MutableList<UriWithStickerUuidBean> = when (intent?.action) {
Intent.ACTION_SEND -> {
val data = mutableListOf<UriWithStickerUuidBean>()
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/xml/locales_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="en" />
<locale android:name="zh" />
<locale android:name="pt" />
<locale android:name="nb" />
</locale-config>
2 changes: 1 addition & 1 deletion doc/README/README-zh-rCN.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
## 🤩应用截图

![ic_home_screen](../../image/zh-rCN/ic_home_screen.jpg) ![ic_home_screen_search](../../image/zh-rCN/ic_home_screen_search.jpg)
![ic_add_screen_edit](../../image/zh-rCN/ic_add_screen_edit.jpg) ![ic_home_screen_share](../../image/zh-rCN/ic_home_screen_share.jpg)
![ic_add_screen_add](../../image/zh-rCN/ic_add_screen_add.jpg) ![ic_share](../../image/zh-rCN/ic_share.jpg)
![ic_appearance_screen](../../image/zh-rCN/ic_appearance_screen.jpg) ![ic_import_export_screen](../../image/zh-rCN/ic_import_export_screen.jpg)
![ic_mini_tool_screen](../../image/zh-rCN/ic_mini_tool_screen.jpg) ![ic_style_transfer_screen](../../image/zh-rCN/ic_style_transfer_screen.jpg)
![ic_search_config_screen](../../image/zh-rCN/ic_search_config_screen.jpg) ![ic_more_screen](../../image/zh-rCN/ic_more_screen.jpg)
Expand Down
Binary file modified image/en/ic_about_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/en/ic_add_screen_add.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed image/en/ic_add_screen_edit.jpg
Binary file not shown.
Binary file modified image/en/ic_home_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed image/en/ic_home_screen_share.jpg
Binary file not shown.
Binary file added image/en/ic_share.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified image/zh-rCN/ic_about_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/zh-rCN/ic_add_screen_add.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed image/zh-rCN/ic_add_screen_edit.jpg
Binary file not shown.
Binary file modified image/zh-rCN/ic_home_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed image/zh-rCN/ic_home_screen_share.jpg
Binary file not shown.
Binary file added image/zh-rCN/ic_share.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bc74aee

Please sign in to comment.