I am using action bar sherlock and have three tabs showing absolutely fine. The problem I am having is that I can't seem to get the title showing at all, it literally shows three tabs at the top. When using the native action bar on the same project, it showed the title on one line, then the tabs underneith (split action bar). This time, only tabs. I do have the required elements in the manifest such as:
uiOptions="splitActionBarWhenNarrow"
I am using the theme #style/Theme.Sherlock.Light
Related
In my application (only for my application), I want to add a button to the navigation system bar
How I can do that in my code?
You cannot do anything there. Not to mention some devices will not show this bar at all if they got hardware buttons.
You can't.
Maybe try to add a fragment that will be exactly above it.
Some phones don't even have that buttons on screen.
firstly check mobile or tab has soft buttons if has then make full screen by programaticaly after that create custum button bar like tab bar at bottom and put buttons as you like thats better if u dont have any other idea
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Been trying everything to show the menu item search (searchWidget) in the actionbar. I have a navigationdrawer, which doesn't hide the actionbar items at any time. But still the search item is always at the overflow, even when having a large screen device.
I have tried using always in the showAsAction in the menu item, and even putting the menu item as visible in the onPrepareOptionsMenu method, and calling it when the drawer opens and closes to see if something changed, and still nothing.
I won't post code now, just wondering if someone had the same problem. If necessary I will post code of course.
If you are using regular action bar menu items (API 13+) then you simply need to say -
android:showAsAction="always"
for that menu item in the menu resource.
However, if you are using the compat library - appcompat-v7 for action bar and menu items (API 7+) then you need your app's name as the namespace as -
yourapp:showAsAction="always"
and add the following to menu tag at the top with the android namespace as -
xmlns:yourapp="http://schemas.android.com/apk/res-auto"
I have an app with a normal menu i.e. the common old menu that shows up at the bottom of the screen when the menu button is pressed. But it is a problem in some phones where there is no hard menu button.
I want to switch to slider menu with a menu icon on top. Is there an easy way to do this (I mean a way where code change would be minimum) retaining the existing functionality? Or will i have to go about coding the slider menu from scratch?
Any example code of a similar situation would really help.
I have an app with a normal menu i.e. the common old menu that shows up at the bottom of the screen when the menu button is pressed
Normally, that "menu" will appear as the overflow on devices with an action bar that either:
do not have a MENU button, or
run Android 4.4+
But it is a problem in some phones where there is no hard menu button.
Make sure that your app has an action bar.
I want to switch to slider menu with a menu icon on top
The options menu/action-bar-with-overflow is unrelated to the "slider menu". They serve different roles. Please read the design guidelines for a navigation drawer (a.k.a., "slider menu").
Is there an easy way to do this (I mean a way where code change would be minimum) retaining the existing functionality?
No, because they are not related.
I i've a layout with 4 tabs at bottom a menu bar at the top and the all content it's to display in the center of the screen, and the tabs and menu bar is visible in all screens. In some screens I want to have some buttons to open another page (different of the tabs content) but in the center of the screen as the others.
I tried to implement that with tabhost (4 tabs), one activity per tab, but then I was in random tab and i've per example a button to show me another activity i want it to show in the center of the ecran without losing the menu bar and tab bar.
So, the best way to do this is with tabHost and a activity per tab like I did and try to find a solution for this, or just implement this using fragments?
Thanks
Instead of using the activity for each tab, use fragment for each tabhost.
Please refer the below link
http://developer.android.com/training/implementing-navigation/lateral.html
I am developing the Tab bar having two tabs in an activity. Problem here is unable to create the tab using the two images(for a single tab that is one left image and other is right image)in a tab bar. While clicking on the specific tab, only one image is focusing and the other is in a non responsive state. Is there any problem in android for creating the tabs using two images for a single tab? Please suggest me the answer with a sample code.