android / android/codelab-android-compose

Jetpack Compose Basics tutorial doesn't mention changing app theme

オープン
#247 コメント 0 件 リアクション 0 件 担当者 1 名 @JolandaVerhoef が担当を希望しています GitHub で見る
主要言語
Kotlin
スター
1.7k
フォーク
799
PR マージ指標
30日以内にマージされた PR はありません

説明

The tutorial here implicitly depends on using a day/night theme in themes.xml: https://developer.android.com/codelabs/jetpack-compose-basics

For example, themes.xml in the solution contains this code:

```




<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

<style name="Theme.BasicsCodelab.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>

```

However, creating a new Compose project with Android Studio results in this theme:

```
<resources>

<style name="Theme.BasicsCodelab" parent="android:Theme.Material.Light.NoActionBar">
<item name="android:statusBarColor">@color/purple_700</item>

```

This leads to differences in expected behavior and actual behavior from following the tutorial. For example, components won't display a dark background without wrapping them in a compose Surface. The system bar also won't follow dark mode and there may also be differences with system dialogs and other components.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。