App Icon disappear from action bar - android

I am developing an application for two languages (english & arabic),
I noticed that the app icon disappears from action bar when changing the language to Arabic.
I found out the solution by trial and error, this was due redundant styles.xml that was included in both folders values/styles.xml & values-ar/styles.xml,
can anyone can explain why this happened?
Also another question:
I noticed that the icon app and app title are aligned to the left of the action bar, How can i change the alignment to be to the right, upon changing the language to Arabic?
Cant I do that by using certain Theme in case of Arabic

It's likely that you have linked the appearance of icon to translate some text and is giving you problems in the application. It happened something similar and was due to this.
Hope it helps.

Related

Customize overview bar color in Android app developed with Cordova

I've developed an app using Cordova/Phonegap and web technologies, and want to personalize it a little bit, but I'm having trouble finding how.
In android, when users press the Overview button (the squared one), they can see an overview with cards for each of the open apps, these cards have a top bar with an icon and the name of the app. As shown in this screenshot:
By default the bar color is gray, but I would want it to be a different color that matches better the colors in my app. This is something that can be seen in other apps, that have different colors for that bar (e.g.: Chrome bar is blue, Email bar is orange, etc):
I tried using the theme-color meta value, but that didn't do anything. I also tried the status-bar plugin, this one changed the status bar when the app is open, but still shows the default gray bar in the overview card mode.
Is it possible to customize this overview bar color with Cordova/Phonegap? How would it be done?
Install:
cordova plugin add cordova-plugin-headercolor
Usage:
-.cs
window.plugins.headerColor.tint("#becb29");
OR
-config.xml
<preference name="HeaderColor" value="#becb29" />
Here is doc.
This answer pretty much sums it up:
https://stackoverflow.com/a/29291928/6709110
The method you are looking for is
setTaskDescription(new ActivityManager.TaskDescription(label, icon, color));
Here is the link to the documentation:
https://developer.android.com/reference/android/app/Activity.html#setTaskDescription(android.app.ActivityManager.TaskDescription)

What is this action bar, and where can I find it to modify it?

I am modifying an three year ago app from my company.
As you see on picture, there is a very ugly gray thin action bar on the top.
I want to modify it, but I couldn't find it anywhere in the packages.
This is an API 14 Android 4.0 app.
You should change the style of the app (or activity) with something like:
#android:style/Theme.NoTitleBar
You can find more here:
How disable / remove android activity label and label bar?
And create your own layout or use the action bar. If you just want to change the text, change the label

Android : Actionbar Icon disappearing in UI

I have put two icons from Android Icon Packager for action bar. The Info Action appears brightly while the next one, Refresh Action is not appearing. I use both as holo_dark. I tried switching just the refresh action, and it appears very very dimly.
I've try reading many many stuffs I seem to find nothing about this topic.
EDIT: I have solved this problem by deleting the whole refresh icon and then remove the line
android:icon="#drawable/ic_action_refresh"
in the XML. I then re-added the icon and it works like a charm. Voted both answer for caring about my question
Use Icon from your Android Package Opposite to Your Theme.
For eg: If you are using Holo_Dark Theme in your Application use Holo_White Icon Set for it.

Removing title bar changes display of ProgressDialog

In my android app, which is just a webview displaying a responsive web site, I want to remove the title bar so I add this to the application section of the manifest XML.
android:theme="#android:style/Theme.NoTitleBar"
The problem is, I get two totally different ProgressDialog UI treatments. The one with the title bar is much nicer so I would like to keep it, but I don't want a title bar.
I believe this relates to the theme. I want to keep the theme, just not the title bar... at least I think. How do I keep the nicer styling, and hide the title bar instantly (not programmatically once the activity starts, that shows the title bar briefly)?
The problem is that Theme.NoTitleBar comes from pre-Honeycomb era, so it shows a pre-Honeycomb dialog.
If your app is API 11 or up you can simply switch by the Holo version of it (I honestly don't remember the name).
Or to support both older and newer device you'll have to use this type of approach Different Theme for different Android SDK versions to apply Theme.NoTitleBar to old devices and its holo counterpart for newer devices.
happy coding.

Android actionbar loses style when viewed in recent apps

When using the recent apps button in Android the action bar of my app does not retain its style like other apps do. The action bar color returns to the default gray and the text to the default black. Does anyone know how to control this behavior in an Android project?
Thanks, any help would be greatly appreciated.

Categories

Resources