Hey can we hide/show tab layout on button click which will be placed below the tab widget it self.
Eg :
When i try to hide - setVisible(View.GONE) the tabwidget whole screens goes black.
The most straightforward way to me would just use the android menu as the way to choose between different tabs instead of a real tab view. When the user clicks on a menu button, you load another activity and the menu gets hidden again.
The tabhost is meant to stay there throughout the entire app lifecycle. Using it like this would be wrong. A way to achieve this using the tab would be to set it completely invisible and then load the activity that normally is in the tab on the whole screen.
Related
I have to show a floating button that will be added in WindowManager so it remain on the top of all Activities. (I have done this part using https://github.com/marshallino16/FloatingView)
When that button is tapped I have to open screen and show detail view and navigate between other views. To achieve this thing I can do following things either adding
1 - PopUpWindow
2 - Dialog
But I cannot provide navigation using either of them. So my questions is.
What is the best way to add multiple views and providing navigation between them while keeping everything above the application that is running it.
How can we add Activity so that it won't pause user application?
You should open Activity and implement all navigation inside it.
Android may pause activities behind, so make your Activity only for part of the screen.
Inside Activity hide floating button and show it again on exit.
I am using ActionBar Sherlock with a number of fragments.
The app I am building is a basic RSS reader much like the one shown here (http://www.youtube.com/watch?v=R_qR2glTTAs), except that there are multiple tabs for several different RSS feeds. When a tab is clicked, I replace the active fragment with the appropriate new fragment.
I am trying to get ActionBar animated refresh button functionality much like it is depicted in the YouTube video above. Basically, when the user clicks the refresh button, I expect the refresh button to rotate until the refresh is complete. If the user switches tabs while the current tab is refreshing, I want to show a refresh button that is NOT rotating.
The problem is: after I click on the refresh button and the button starts rotating, if I switch to another tab, I simply get a non-rotating refresh button on top of the rotating refresh button! This happens despite my calling menu.clear() and recreating the menu each time a tab is clicked. Interestingly, rotating the device causes the extra rotating refresh buttons to disappear.
Nothing I've tried seems to be able to stop the refresh animation when I change tabs! Any ideas why? I can post more of my code here if necessary.
I think the problem could be that you are animating and / or creating the menu inside your fragements... if this is the case do the things you want to do with your menu in the FragmentActivity
By the way, the effect you experience while rotating the screen is caused by the android architecture. Android always recreates the view if you are switching from portrait to landscape mode or the other way around.
I am making an app that has a couple list view menus that lead to a file display. When the user opens a file (in a webview), I want to create a tab bar so that they can quickly refer back to this file even after going back through the menu and viewing a different file. I planned on creating a fragment activity that housed a horiz scroll view that housed buttons that referenced the file that they viewed. Then, when they move on to a different file, they can just hit the tab and return to the file referenced on the tab.
Couple things:
-the tab bar, once created, needs to persist across activities until closed by the user
-the tab bar needs to refresh itself every time the user opens a new file
-it would be really nice to have a little close button (like the red x in the corner in apple stuff) on the tab buttons, so that the user can close individual tabs.
Is this possible?
any suggestions, tips, etc ?
Is android's built in tabs a better way to go than horiz scroll view with buttons?
thanks in advance
I'm creating the 3 tabs dynamically based on example here http://developer.android.com/resources/tutorials/views/hello-tabwidget.html
the application works well except one issue.
when I launch app and then click the Back Button then the app closes.
I launched the app by clicking on the application icon.
now I can see 6 tabs. each time I repeat this process, it keeps on adding 3 tabs.
when ever I use Menu button instead of back Button then it doesn't add 3 tabs.
anything going wrong here, how can I fix it?
thanks
Are you creating the tabs at onResume() or onStart()? Try to create them at onCreate()
or delete the tabs by onPause with something like:
LinearLayout tabbar = (LinearLayout) findViewById(R.id.tabbar);
tabbar.removeAllViews();
Friend's
I need to get slider pop up window,when i click a tab control available at bottom.when i click the tab,i need to show the slider pop up from bottom to top animated to show the login button,after login i have to move my actual tab Activity.How can i get the view for slider pop up.
lets refer the screenshots,i attached here what i need exactly..
.
From these when user to choose login at the time second screen appears looks like it.
How can i get the view like this above.
Thanks in advance..
Get the sliding drawer view by id, cast it to a SlidingDrawer and then there is a function the SlidingDrawer object to pop it up. You might have some weird issues though with screen state if users do stuff like hit back or close the slider.
To do what you need in the screenshot, do a sliding drawer with an empty handle and slide that up from the bottom as needed. The sliding drawer is just another layout that can contain buttons, etc.
Here is an example: http://www.androidpeople.com/android-sliding-drawer-example-tutorial/