Skip to content

Commit 583214b

Browse files
committed
app: Bump version to 1.5.3
1 parent da6346e commit 583214b

9 files changed

Lines changed: 54 additions & 15 deletions

File tree

app/build.gradle.kts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@ val pkgName = "top.yukonga.fontWeightTest"
1313
@Suppress("UnstableApiUsage")
1414
android {
1515
namespace = pkgName
16-
compileSdk = 36
17-
1816
defaultConfig {
1917
applicationId = pkgName
20-
minSdk = 26
21-
targetSdk = 36
2218
versionCode = getVersionCode()
23-
versionName = "1.5.2"
19+
versionName = "1.5.3"
2420
}
2521
val properties = Properties()
2622
runCatching { properties.load(project.rootProject.file("local.properties").inputStream()) }

app/src/main/kotlin/top/yukonga/fontWeightTest/MainActivity.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package top.yukonga.fontWeightTest
22

33
import android.annotation.SuppressLint
4-
import android.content.pm.ActivityInfo
54
import android.os.Build
65
import android.os.Bundle
76
import androidx.activity.ComponentActivity
@@ -14,7 +13,6 @@ class MainActivity : ComponentActivity() {
1413
super.onCreate(savedInstanceState)
1514

1615
enableEdgeToEdge()
17-
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
1816
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
1917
window.isNavigationBarContrastEnforced = false
2018
}

app/src/main/kotlin/top/yukonga/fontWeightTest/ui/HomeView.kt

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,16 @@ fun SliderTestView() {
190190
}
191191
},
192192
label = stringResource(R.string.font_weight),
193+
useLabelAsPlaceholder = true,
193194
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
194195
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
196+
trailingIcon = {
197+
Text(
198+
text = stringResource(R.string.font_weight),
199+
fontSize = 13.sp,
200+
modifier = Modifier.padding(horizontal = 16.dp)
201+
)
202+
}
195203
)
196204
Slider(
197205
progress = fontWeightValue.toFloat(),
@@ -219,8 +227,16 @@ fun SliderTestView() {
219227
}
220228
},
221229
label = stringResource(R.string.font_size),
230+
useLabelAsPlaceholder = true,
222231
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
223232
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
233+
trailingIcon = {
234+
Text(
235+
text = stringResource(R.string.font_size),
236+
fontSize = 13.sp,
237+
modifier = Modifier.padding(horizontal = 16.dp)
238+
)
239+
}
224240
)
225241
Slider(
226242
progress = fontSizeValue.toFloat(),
@@ -234,12 +250,31 @@ fun SliderTestView() {
234250
}
235251
}
236252
TextField(
237-
modifier = Modifier.padding(top = 12.dp),
238253
value = customText,
239254
onValueChange = { customText = it },
240255
label = stringResource(R.string.custom_text),
256+
useLabelAsPlaceholder = true,
241257
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
242258
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
259+
modifier = Modifier.padding(top = 12.dp),
260+
trailingIcon = {
261+
Text(
262+
text = if (customText.isEmpty()) stringResource(R.string.custom_text) else stringResource(R.string.clear_text),
263+
fontSize = 14.sp,
264+
modifier = Modifier
265+
.then(
266+
if (customText.isNotEmpty())
267+
Modifier.clickable(
268+
indication = null,
269+
interactionSource = null,
270+
) {
271+
customText = ""
272+
}
273+
else Modifier
274+
)
275+
.padding(horizontal = 16.dp)
276+
)
277+
}
243278
)
244279
Text(
245280
modifier = Modifier.padding(top = 12.dp),

app/src/main/res/values-zh-rCN/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<string name="comparison_display">字重对比显示</string>
1212
<string name="variable_font">可变字体测试</string>
1313
<string name="custom_text">文本</string>
14+
<string name="clear_text">清除</string>
1415
<string name="device_font">设备字体</string>
1516
<string name="italic_font">倾斜字体</string>
1617
<string name="more_examples">更多示例</string>

app/src/main/res/values-zh-rTW/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<string name="comparison_display">字重對比顯示</string>
1212
<string name="variable_font">可變字體測試</string>
1313
<string name="custom_text">文本</string>
14+
<string name="clear_text">清除</string>
1415
<string name="device_font">設備字體</string>
1516
<string name="italic_font">傾斜字體</string>
1617
<string name="more_examples">更多範例</string>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<string name="comparison_display">Font weight display</string>
1212
<string name="variable_font">Variable font test</string>
1313
<string name="custom_text">Custom text</string>
14+
<string name="clear_text">Clear</string>
1415
<string name="device_font">Device font</string>
1516
<string name="italic_font">Italic font</string>
1617
<string name="more_examples">More Examples</string>

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[versions]
2-
androidGradlePlugin = "8.10.0"
2+
androidGradlePlugin = "8.11.0"
33
androidx-coreKtx = "1.16.0"
44
androidx-activity-compose = "1.10.1"
5-
androidx-compose-foundation = "1.8.1"
6-
haze = "1.5.4"
7-
kotlin = "2.1.20"
8-
miuix = "0.4.3"
5+
androidx-compose-foundation = "1.8.3"
6+
haze = "1.6.6"
7+
kotlin = "2.2.0"
8+
miuix = "0.4.7"
99

1010
[libraries]
1111
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-coreKtx" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ dependencyResolutionManagement {
2828
}
2929

3030
plugins {
31-
id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")
31+
id("com.android.settings") version ("8.11.0")
32+
id("org.gradle.toolchains.foojay-resolver-convention") version ("1.0.0")
33+
}
34+
35+
android {
36+
compileSdk = 36
37+
targetSdk = 36
38+
minSdk = 26
3239
}
3340

3441
rootProject.name = "FontWeightTest"

0 commit comments

Comments
 (0)