add tooltip for android action bar - android

i have a action bar, for the system default action "button", when i use s-pen hovered on it. it will give a "More options" tooltip and the s-pen icon change to solid circle.
how can i add the same behavior to other button on actionbar?
i tried add the hover action, but i need to implement the popup window to show the tooltip and the s-pen icon do not change from hollow circle to solid circle.
dose there exist some api to implement this feature?
see the picture.

Related

No action bar or navigation bar in design view of activity_main.xml

I'm starting out on android and I can't see the top bar nor the bottom buttons that should be viewable if I go to the design tab. As you can see in one of the pictures, I used a WithActionBar theme and still no action bar.
I found the answer, you need to select the eye icon under the blue squares, and select "Show Layout Decorations"
Click the ยป beside the 28 and select a theme which has an ActionBar.
Maybe get a bigger screen, for not having to search tacked away buttons.

How to change shape of bottom-appbar and floating action button

How can I change the shape of the android material design bottom app bar and the corresponding floating action button?
I want the floating action button to be insetted into the app bar. This is possible using the material bottom app bar. But I want the floating action button to be a rectangle instead of beeing a circle. Material design shows an example of this on their website but just as an image without explanation how to do this.
EDIT: I want to change shape not just color

Action bar icon showing solid gray square in android

This type of square is showing
You need to design a specific icon for the Action Bar, with solid color and transparency. You can create your notifications icons with this. https://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.space.trim=1&source.space.pad=0&name=ic_stat_example

center align icons in titanium action bar for android

Is there any possible way to center align the action item icons that are shown in action bar of titanium app for android. I have searched a lot of places for this solution but had no luck. I want the action bar to look like the below image. Also tell me the way to not show app title in the action bar.
This is not a Titanium issue.
As you can read in Google's documentation, you won't be able to center anything in the ActionBar. Default (and expected) behaviour is to align action icons on the right (or left if reversed).
I don't recommend it, as it goes against Google's guidelines, but you will be able to center icons if you create a fake ActionBar:
- Remove native ActionBar from any window in your app
- Create a Titanium View that mimics the ActionBar
- Add icons and bind click events.
That's it, you are done.

How to make home button hug the left side of the action bar

I'm using ActionBarSherlock and have set an icon using android:logo in my theme. I'd like for the icon to be flush with the left side of the screen, but it always has 6px of spacing (measured using the hierarchy viewer). I've highlighted in red the part of the icon that I can't get rid of. If I set DISPLAY_HOME_AS_UP for the action bar, then the up affordance is shown as in the second image with no additional spacing.
I assume the spacing is there to keep the icon in the same place regardless of whether the up arrow present. I'm never going to show the up arrow, so I rather have the icon flush on the left.
You can set customView like this:
actionBar.setCustomView(R.layout.customActionBarLayout)
and create your own layout just as you like it

Categories

Resources