File tree Expand file tree Collapse file tree 6 files changed +8
-78
lines changed
java/xyz/teamgravity/multilinehinttextfield Expand file tree Collapse file tree 6 files changed +8
-78
lines changed Original file line number Diff line number Diff line change 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" />
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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
4131fun 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}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments