Closed Angelk90 closed 8 years ago
Hi @Angelk90
1) nope
2) isn't this default behavior or did I get you wrong?
3) ActionBar.elevation is what you're looking for: abx.elevation = 24;
Hi @manumaticx ,
I thank you for having responded.
1) Can I ask why? 2) You say that is not a default behavior by the standard Android? The link of the image is dell'actionbarextras use. It is located in README.md files in "Some apps using ActionBarExtras", the app in question is PiniOn so I was wondering how I could do it myself. 3) I have done as you say, but I see no difference.
1) Actionbar is not intended to be used like this as per Googles guideline
2) Ah, you mean the icon on the left side? This is a logo / icon. You can set this with actionBar.setIcon()
or actionBar.setLogo()
. Icons of optionsMenu are on the right side.
3) What Theme are you using? MaterialTheme (provided by AppCompat) comes with a default elevation shadow as seen in the image below. You can adjust this with the elevation
-property.
1) I didn't say it's impossible ;) but I don't want to implement it. If you have a pull request, feel free to send it.
2) As I say, easiest way to make this: use actionbar.icon
and actionBar.onHomeIconItemSelected
1) put a title.setGravity (Gravity.CENTER) in the right place, nope? ;) 2) It is not an icon or a logo, but a button with an associated event.
1) something like that. Maybe you can hack this into the actionbar with Hyperloop ;) 2) Yes, but it would end up in the same result, right?
1) Titanium as I do, I have to modify the library in java. 2) Would you do me an example.
/**
* Android callback for {Ti.UI.Window} open event
*/
function onOpen() {
var activity = $.index.getActivity();
if (activity) {
var actionBar = activity.getActionBar();
if (actionBar) {
abx.setDisplayShowHomeEnabled(true);
actionBar.setIcon('appicon.png');
abx.setDisplayShowTitleEnabled(false);
actionBar.onHomeIconItemSelected = function() {
// use this callback to handle clicks on the icon
};
}
};
return true;
}
1)For the first point?
If you have a solution for this feel free to fork this module an build on your own 👍 A pull request would be very welcome.
1) you can implement that the title and subtitle can be put at the center as happens to the image? 2) the ability to also put on the left of the menu buttons, as does for example the following app for GPS:https://lh3.googleusercontent.com/qv8jBA57QjCDX2e6fStvzDy7TocVXh_SX282izJBE0UOJXyxdt0kBzhJ68mockw-nQ=h900-rw 3) the possibility under the ActionBar to have the shadow effect, for example: http://i.stack.imgur.com/W6523.png