Android - Create a tab bar - java

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.

Related

Adding an image via button in Android Studio

I want to make an app, and there would be an list view with items and its info. In the right bottom corner there would be a button, and there is my question: how to add an image and some informational text by clicking on that button?
You really need more basics ... maybe you should start with a few simple tutorials. Whatever, for your problem you need a RecyclerView.

How to add a button in the navigation bar in my android application?

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);

Android: Convert a normal menu to slider menu? (With minimal coding)

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.

android UI implementation Opinion

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

Android ActionBarSherlock

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

Categories