Skip to content

Commit a118f40

Browse files
Setup Material3;
1 parent 1a4e585 commit a118f40

File tree

6 files changed

+8
-78
lines changed

6 files changed

+8
-78
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<activity
1616
android:name=".MainActivity"
1717
android:exported="true"
18-
android:label="@string/app_name"
1918
android:theme="@style/Theme.MultiLineHintTextField">
2019
<intent-filter>
2120
<action android:name="android.intent.action.MAIN" />

app/src/main/java/xyz/teamgravity/multilinehinttextfield/MainActivity.kt

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,12 @@ class MainActivity : ComponentActivity() {
1717
super.onCreate(savedInstanceState)
1818
setContent {
1919
MultiLineHintTextFieldTheme {
20-
// A surface container using the 'background' color from the theme
21-
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
22-
Greeting("Android")
20+
Surface(
21+
modifier = Modifier.fillMaxSize(),
22+
color = MaterialTheme.colorScheme.background
23+
) {
2324
}
2425
}
2526
}
2627
}
27-
}
28-
29-
@Composable
30-
fun Greeting(name: String, modifier: Modifier = Modifier) {
31-
Text(
32-
text = "Hello $name!",
33-
modifier = modifier
34-
)
35-
}
36-
37-
@Preview(showBackground = true)
38-
@Composable
39-
fun GreetingPreview() {
40-
MultiLineHintTextFieldTheme {
41-
Greeting("Android")
42-
}
4328
}

app/src/main/java/xyz/teamgravity/multilinehinttextfield/ui/theme/Theme.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,11 @@ private val LightColorScheme = lightColorScheme(
2525
primary = Purple40,
2626
secondary = PurpleGrey40,
2727
tertiary = Pink40
28-
29-
/* Other default colors to override
30-
background = Color(0xFFFFFBFE),
31-
surface = Color(0xFFFFFBFE),
32-
onPrimary = Color.White,
33-
onSecondary = Color.White,
34-
onTertiary = Color.White,
35-
onBackground = Color(0xFF1C1B1F),
36-
onSurface = Color(0xFF1C1B1F),
37-
*/
3828
)
3929

4030
@Composable
4131
fun MultiLineHintTextFieldTheme(
4232
darkTheme: Boolean = isSystemInDarkTheme(),
43-
// Dynamic color is available on Android 12+
4433
dynamicColor: Boolean = true,
4534
content: @Composable () -> Unit
4635
) {
@@ -64,7 +53,6 @@ fun MultiLineHintTextFieldTheme(
6453

6554
MaterialTheme(
6655
colorScheme = colorScheme,
67-
typography = Typography,
6856
content = content
6957
)
7058
}

app/src/main/java/xyz/teamgravity/multilinehinttextfield/ui/theme/Type.kt

Lines changed: 0 additions & 34 deletions
This file was deleted.

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

Lines changed: 0 additions & 10 deletions
This file was deleted.

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<resources>
2+
<resources xmlns:tools="http://schemas.android.com/tools">
33

4-
<style name="Theme.MultiLineHintTextField" parent="android:Theme.Material.Light.NoActionBar" />
4+
<style name="Theme.MultiLineHintTextField" parent="android:Theme.Material.Light.NoActionBar">
5+
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
6+
</style>
57
</resources>

0 commit comments

Comments
 (0)