Scroll to a given item in a dataview - Sencha Touch

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.

Here recordIndex is the index of the component in dataview that we need to scroll to.

Adding a custom theme for the android preview screen in a Sencha Touch - Cordova app

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,


The name of the XML file could be anything. Let's call it themes.xml. Then define your theme inside it.

I'm going to override the NoTitleBar theme.. To do that this is what we should put inside themes.xml

Now, in the android manifest XML file which is inside,


change the theme as follows.

Black screen before splash screen in Sencha Touch android app?

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/
(I was using the version 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.

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.