In my Sencha Touch app I had a component dataview. I had included an index bar and I needed to scroll to the relevant items when I click on index bar. This is what I did.
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
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.
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
I built a native Sencha Touch app using Sencha cmd.
I was having a problem. When I open the app before my splash screen loads a black screen was appearing. I found that the reason for this black screen is that on app launch, Android displays a simple preview window (based on your activity theme) as an immediate response to the user action. Then the preview window crossfades with the actual UI, once that has fully loaded [1].
I could not find a "nice" way to get rid of this black preview window. This is the only solution I found.
1. Go to AndroidManifest.xml inside the path_to_sencha_cmd/Sencha/Cmd/4.0.4.84/stbuild/st-res/android/
(I was using the version 4.0.4.84. The path depends on that.) 2. Inside application tag change the theme as android:theme="@android:style/Theme.Light" If you do not want the title bar use this instead of the above one. android:theme="@android:style/Theme.Light.NoTitleBar" I don't think this is a good way to solve the problem. But I could not find a better way rather than changing Sencha cmd code. References [1] https://plus.google.com/+AndroidDevelopers/posts/VVpjo7KDx4H