Skip to content

Commit abd802e

Browse files
committed
feat: add supported launcher version display
1 parent 781cc29 commit abd802e

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ android {
1515
versionName = property.project.app.versionName
1616
versionCode = property.project.app.versionCode
1717
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18+
19+
buildConfigField("String", "SUPPORTED_LAUNCHER_VERSION", "\"15.8.17\"")
1820
}
1921

2022
signingConfigs {

app/src/main/java/com/wizpizz/onepluspluslauncher/ui/activity/MainActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
2626
override fun onCreate() {
2727
refreshModuleStatus()
2828
binding.mainTextVersion.text = getString(R.string.module_version, BuildConfig.VERSION_NAME)
29+
binding.mainTextVersion2.text = getString(R.string.supported_launcher_version, BuildConfig.SUPPORTED_LAUNCHER_VERSION)
2930

3031
// Setup feature toggles - all enabled by default
3132
setupFeatureToggle(binding.autoFocusSearchSwipeSwitch, PREF_AUTO_FOCUS_SEARCH_SWIPE)

app/src/main/res/layout/activity_main.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,19 @@
9696
android:textColor="@color/white"
9797
android:textSize="13sp" />
9898

99-
<TextView
100-
android:id="@+id/main_text_release_version"
101-
android:layout_width="wrap_content"
102-
android:layout_height="wrap_content"
103-
android:layout_marginStart="5dp"
104-
android:alpha="0.8"
105-
android:ellipsize="end"
106-
android:singleLine="true"
107-
android:text="@string/module_version"
108-
android:textColor="@color/white"
109-
android:textSize="13sp" />
11099
</LinearLayout>
100+
101+
<TextView
102+
android:id="@+id/main_text_version2"
103+
android:layout_width="wrap_content"
104+
android:layout_height="0dp"
105+
android:layout_weight="1"
106+
android:alpha="0.8"
107+
android:ellipsize="end"
108+
android:singleLine="true"
109+
android:text="@string/supported_launcher_version"
110+
android:textColor="@color/white"
111+
android:textSize="13sp" />
111112
</LinearLayout>
112113
</LinearLayout>
113114

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
<string name="category_search_enhancement">Search Enhancement</string>
2020
<string name="category_auto_focus">Auto Focus (Show Keyboard)</string>
2121
<string name="category_search_redirect">Search Redirect (to app drawer)</string>
22+
<string name="supported_launcher_version">Supported Launcher Version: %s</string>
2223
</resources>

0 commit comments

Comments
 (0)