romainguy
06/03/2020, 9:44 PMGuy Bieber
06/03/2020, 9:58 PM<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
tools:replace="android:theme"
android:theme ="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.nikolamotor.bluetoothle.BluetoothLeService" />
</application>
Vinay Gaba
06/03/2020, 10:02 PM<item name="android:windowBackground">color_name</item>
Hopefully Romain was referring to this and not some compose magic that I was unaware about 😅AndroidManifest
and also use a different MaterialTheme
inside the activity ? I’m guessing MaterialTheme
would be what the user sees on the screen?romainguy
06/03/2020, 10:07 PMGuy Bieber
06/03/2020, 10:08 PMvar splashView = SplashView()
setContent {
MaterialTheme {
splashView.view()
}
}
Vinay Gaba
06/03/2020, 10:13 PMdarkColorPalette()
Guy Bieber
06/03/2020, 10:16 PMMaterialTheme(colors = darkColorPalette())
Vinay Gaba
06/03/2020, 10:24 PMval light = lightColorPalette()
val dark = darkColorPalette()
val colors = if (isSystemInDarkTheme()) { dark } else { light }
Guy Bieber
06/03/2020, 10:25 PMVinay Gaba
06/03/2020, 10:26 PMSplashView
is a composable?Guy Bieber
06/03/2020, 10:28 PMVinay Gaba
06/03/2020, 10:28 PMMaterialTheme.colors.surface
or MaterialTheme.colors.primaryColor
fun Card(
modifier: Modifier = Modifier,
shape: Shape = MaterialTheme.shapes.medium,
color: Color = MaterialTheme.colors.surface,
contentColor: Color = contentColorFor(color),
border: Border? = null,
elevation: Dp = 1.dp,
content: @Composable () -> Unit
) {
MaterialTheme.colors.surface
by default when you don’t give it a colorGuy Bieber
06/03/2020, 10:31 PMAdam Powell
06/03/2020, 10:51 PM@style/AppTheme.NoActionBar
theme declaration from the activity element in your manifest, it'll take you over to the resource xml file that holds that theme in your app. (probably res/values/styles.xml
if you're using the default project template)@style/Theme.AppCompat.Light.NoActionBar
- get rid of the .Light
part in there.Guy Bieber
06/04/2020, 3:06 AMandroid:theme="@style/AppTheme.NoActionBar">
romainguy
06/04/2020, 5:47 AMAdrian Blanco
06/04/2020, 7:34 AM