Kotlin Custom Theme (KCT)

I know how to apply a theme to the entire app, but where would I apply a theme to just one activity?

Solutip

You can apply a theme to any activity by including  android:theme  inside  <aktivitas> the manifest file. For example:

  • <activity android:theme="@android:style/Theme.Dialog">
  • <activity android:theme="@style/CustomTheme">

And if you want to set the theme programmatically, use it  setTheme() before calling the method  setContentView() and  super.onCreate() inside the method  onCreate().


Post a Comment

Previous Next

نموذج الاتصال