This is a picture of my phone (Android 2.1 with HKC Sense):
The bit that's got a red border around it is in the Clock app and the Media player on my phone. What is it called? Is it a standard Android interface control?
I've been trying to figure out how to get something like this for the past while and I'm not seeing anything immediately obvious.
I've seen a lot of people referring to the ActionBar or Split ActionBar, but that seems to be something that is anchored to the top. I need this to be at the bottom without any component on the top.
*please excuse
It's an actual pic of the phone, rather than a screenshot - the screenshot app I downloaded wouldn't work.
The fact that the pic was taken with an iPhone, and that the apple logo is clearly reflected in the pic.
You can use Split ActionBar
android:uiOptions="splitActionBarWhenNarrow"
And that will force the action bar items to be hosted on the bottom of the screen for narrow devices, mostly phones. When this flag is set, no components are hosted on the top of the ActionBar, unless you use tab navigation.
See example Image
Keep in mind though, that should you be displaying the layout on a non-narrow device, like a tablet, then the items will be attached to the top ActionBar.
Some other things to consider
Creating a custom view, which you can set to the bottom of the layout. The View would be a scrollable ListView per say, and you can add as many icons as you'd like to it. Here's an example. That would not be a standard nav pattern though.
Related
Is it possible to add a button to the toolbar of android firefox, and also the top of the pop up menu as shown in this screenshot below:
edit:
just found a screenshot of an addon that had some other addons installed that added a button up there, pleease see addon screenshots:
https://addons.mozilla.org/en-US/android/addon/quitnow/
here is the screenshot:
(source: mozilla.net)
see that nightly globe and whatever that is to the left of it, im trying to do same :) top row in this second picture is toolbar button icons that would show in the top toolbar when there is enough screen space im interested in learning how to add to 1st and second row
The documentation for Developing for Firefox Mobile marks all UI APIs as Not supported. Mozilla uses the native UI of Android to build Firefox for Android. Therefore everything related to XUL might not work at all.
Now there is an Extensions for Firefox for Android API and the only thing related to what you'd like to achieve can be found with PageActions.jsm, which can be used like:
Pageactions.add({
icon: "drawable://alert_app",
title: "My page action",
clickCallback: function() { win.alert("Clicked!"); }
});
These are added to the toolbar, but displayed inside of the adressbar not beside it. In the screenshot you posted, the little book icon is a pageaction. But there's a limitation as well:
NOTE: A maximum of two page action items will be shown to users at a time. If users have three page actions showing, an overflow menu will appear to handle the extra ones. Your action has NO control over whether its shown in the urlbar or overflow. Don't depend on your page action always showing in the main urlbar.
The buttons you find at the top of the menu can't be changed neither. The star at the left is for the bookmarks and the graph on the right is the button for sharing the web page. The space inbetween is used to display the last two applications you shared the web page with.
So basically, what you'd like to do is not possible at all and the addons I know trying to achieve something similar use page actions.
I am working on an Android application and have to code up the following design for one of the screens:
(Ignore the yellow stuff, I have just masked the Logo and the App-specific information for now)
My question is: How do I design this particular type of screen? The top pane is akin to an ActionBar in Android. However, when any button on the top pane is hit, this custom "popup" having a rectangular form with a small arrow on top pointing towards the button is display and does not interrupt the current/main activity.
I have looked around, but still dont understand how to accomplish this.
Any thoughts? Thanks!
You can use the native Action Bar along with the icons.
The only problem is if you want to show them all at once.
Some icons may be hidden depending on the size of the phone.
As for the custom pop-up, the toast feature is available to do that.
It is quite easy to adjust the position of toasts and customise toasts :
Customisation of toasts: http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView
Changing postion of toasts: How to change position of Toast in Android?
So I have a really simple app (picture below). I am using tabs and the scrolling (via swipe or by clicking the tabs) but I was wondering if I could possible change the size of the tabs somewhat dynamically.
For instance, "Home" doesn't need to be as big as "Most Recent", and there is a 4th tab that you cannot see on the screen that would ideally be seen if the tabs were smaller.
How could I go about this? I Googled around but I could not find anything relevant that seemed to work.
You can use title strips instead of tabs to solve this problem pretty easily:
http://developer.android.com/training/implementing-navigation/lateral.html#PagerTitleStrip
I have implemented a split actionbar as per android documentation, by adding the following line inside the Application tag of my AndroidManifest.xml: android:uiOptions="splitActionBarWhenNarrow". This has worked, the buttons that appear on the bottom action bar appear in a different fashion to various examples I have seen across the internet and I do not know why.
I have seen many examples on the internet appear like this:
However, the buttons on my bottom action bar appears like this:
How can I space them out so they have the same layout as the first example?
If it renders like this, it's because your screen is larger than the examples you've seen. On your device, I guess the buttons would be too large if they filled all the space.
If you try with 5 buttons, they may suddenly fill all the space available. It really depends on the screen width.
Anyway, developers have almost no control over the layout of the split action bar. That's why several popular apps don't use the split action bar at all but use a custom layout instead (since this bar isn't really hard to reproduce).
I want to display the Action Bar Vertically in my App.
I have found few examples for the Horizontal One, but not any for the Vertical One.
Can anyone please give me any example for the Vertical Action Bar.
Thanks,
David Brown
There's nothing in the Android UI design guide about a vertical ActionBar. But you might be able to coerce a similar effect by locking the display orientation, and then applying a rotation to the View in the content area. You also might be able to get somewhere by downloading the source code for ActionBarSherlock and implementing your own version of the ActionBar. But I don't recommend either of these solutions. If you're really that intent on putting actions on the side of your screen, I suggest either a small vertical LinearLayout, or implement one of the side navigation solutions as discussed in Android Facebook style slide.