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
Related
I have an Android app that provides navigation through online folders (like Google Drive). I have implemented the folder navigation with fragments. The main activity has a toolbar and the remaining space is used for fragments. One fragment represents one folder. Subfolders and files are displayed using a RecyclerView and when a new folder is opened, the old fragment gets hidden and a new fragment for the opened folder is added.
Now i want to add animations to my application, specifically, for opening and closing of folders. When a folder in the list is clicked i want the background view of the clicked item to expand to become the background of the new fragment. When back is pressed, the opposite should happen.
Here is a video i found of something similar to what i want to achieve: https://youtu.be/xvy7KUe492g
However in the video the clicked view expands over the toolbar, whereas i want the toolbar to remain visible.
Could you help me out by writing an example, or pointing me to the right direction?
This link is pretty clear and has many examples
http://developer.android.com/training/material/animations.html#Reveal
I need help finding an approach to build a certain kind of menu for an app.
Let's say I have a menu activity and 2 other activities. My menu activity consists of 2 options.
I want to drag the "buttons" (not sure if button is the correct name in this case) sideways and while dragging, the other activity's screen starts appearing from the side.
The thing is, depending on which button I'm dragging, different screens should appear, and I couldn't find anything similar to read about.
Does anybody recommend some topic to read that could help?
How can I manage the activities in this case?
I am an android newbie and I am trying to create an Android App with three Activities: a Homescreen, a listview and a detailview.
I integrated J. Feinstein's Sliding Menu in my Homescreen and filled it with a ListView to display my different categories (Restaurants, Bars, Culture, whatever). When I click one of my List Items, the new Activity gets created and Pops up. However, I want the Activity to replace the old one while the SlidingMenu stays on top and then gently slides away. I saw this behaviour in the Example App but I cant quite find the bit of code that holds the answer to my question. Hope anyone can help :)
The sample app uses fragment transactions instead of starting new activities to change the content. As far as I know, that is the only way to do the two actions – close sliding menu and change content – simultaneously.
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.
Is it possible to make WebView (or any view that can parse / display html) a "floating" window on top of the main layout?
Basically I have a list of links displayed in a listView. When the user select one of the link, i'd like to load and display the results in a floating panel (sorta like a context menu, but takes almost the entire screen and scrollable) with, say a close button on the top right corner. So when the user is done viewing the content, he/she can simply click the close button to return to the previous list page.
Is this possible? or I should start a new activity that loads a separate layout for the content, with some tracking mechanism to go back the list page.
Thanks much.
What I did for the help section of my application was to create a new Activity which just contains a WebView with the Theme.Dialog set in the AndroidManifest.xml:
<activity android:name=".HelpActivity" android:theme="#android:style/Theme.Dialog"/>
This way the WebView is launched as a 'floating dialog' on top of the current screen.
Not sure if this is exactly what you want, but it's a very simple and efficient way to accomplish what I needed to do.