There are two possible ways where you can change the icon of the HOME button in the actionbar in an Android app.

One is within the AndroidManifest.xml file itself.

However, the problem with this approach is that the same drawable will be used as launcher icons of your app.

If you want the launcher icon intact and only change the icon of the HOME button itself, you can do it by calling the setLogo() method of ActionBar.

You also need to call setDisplayUseLogoEnabled() and set it to true so the logo will be used as the HOME button’s icon.

In Sencha Touch version 2.0, there is currently no way to modify the color of an active or inactive indicator of Ext.carousel.Indicator.

To do so, you will have to go to the app.css file located in resources/css/ in your project folder.

Look for keywords that have the substring carousel in it.

If your carousel does not use any ui setting specifically, you can modify the section that has the dark theme since that is its default.

Look for .x-carousel-indicator-dark span.

There is a value background-color: rgba(0, 0, 0, 0.1);

Change the values as you like. The first 3 parameters are its RGB (red, green, blue) values while the 4th parameter is its alpha value. Think of the alpha value as its transparency equivalent. 1 being clear while 0 being transparent.

The CSS code below that is .x-carousel-indicator-dark span.x-carousel-indicator-active which indicates the color value for its active state.

This one is tricky because I totally was lost until I luckily came across a forum post that explained how Android works behind the scenes during orientation change.

So my Android widget has two layouts, one visible and one hidden. The visible layout is default while the hidden layout will only be shown if data is present.

When orientation change happens (portrait, landscape), the problem is that the hidden layout which I programmaticaly set to visible is not shown.

Use Jona from Stack Overflow mentioned this important note that solved my problem.

“When the screen is rotated and the widget needs to be restored the Android system will restore it using the data from the last RemoteViews update. I was updating parts of the widget separately so when it needed to restore only one part got updated. The fix is always update everything on your RemoteViews all at once.”

So that is the solution. Whenever you instantiate and inflate RemoteViews, be sure that you also set the View states on everything.

Related Posts Plugin for WordPress, Blogger...