안드로이드 Theme

유시현·어제
0

Android

목록 보기
34/34

기본적으로 안드로이드 프로젝트의 테마는 AndroidManifest.xml 에서 정의된다.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.ThemeTest"
        tools:targetApi="31" />

</manifest>

android:theme="@style/Theme.ThemeTest" <- 이렇게

theme 폴터 밑에 theme.xml 이랑 theme.xml(night) 이렇게 되어있을거다.

theme.xml : 라이트 모드(Light Mode)에서 사용하는 테마 설정(라이트 모드는 기본모드)
theme.xml(night) : 다크 모드(Dark Mode)에서 사용하는 테마 설정

보통 NoActionBar 이름이 붙은 테마를 많이 사용하는데 이 테마마다 백그라운드 색상이 다 다르니 각각 확인해보고 사용해야한다. 보통 백그라운드가 흰색이 아닌경우가 많다.

테마를 아예 설정하지 안았을경우도 백그라운드가 흰색이 아닌데 어떤 테마가 기본테마인지를 모르겠다.

profile
안드로이드 ,ios 공부하고 있습니다

0개의 댓글