In android on app launch, a preview screen is shown. This is before the splash screen. In a Sencha - Cordova app even if we have added the splash screen plugin, before the splash screen this preview window will appear. In my last post I have written how to change the theme of this preview screen in a pure Sencha Touch app. Here I'm writing how to add a custom theme for Sencha Touch+cordova app.
First create an xml file inside,
project-folder/cordova/platforms/android/res/values
The name of the XML file could be anything. Let's call it themes.xml. Then define your theme inside it.
Eg:
I'm going to override the NoTitleBar theme.. To do that this is what we should put inside themes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8'?> | |
<resources> | |
<color name="my_theme_color">#FF0000</color> | |
<style name="MyTheme" parent="android:Theme.NoTitleBar"> | |
<item name="android:windowBackground">@color/my_theme_color</item> | |
<item name="android:colorBackground">@color/my_theme_color</item> | |
</style> | |
</resources> |
project-folder/cordova/platforms/android
change the theme as follows.
android:theme="@style/MyTheme"
FINALLY, someone made that so simple to explain! Many thanks bro...from NY
ReplyDeleteCool! I'm glad this helped you.
DeleteI’m surely coming again to read these articles and blogs free wordpress themes
ReplyDelete