I am working on this POS project for android tablet. I've already created a nav drawer and when I click "Inventory" this page which is a fragment should show.
My question is
(1) how to create vertical tab widget that will show different layout. See picture below.
(2) how to divide the screen that will create vertical line as shown in the same picture.
Related
I have a ViewPager with two Fragments. The first Fragment is a simple RecyclerView. But the second Fragment contains a full screen Google Maps element.
Fragment 1:
Fragment 2:
The problem is that when you are viewing Fragment 2, it's very hard to go to Fragment 1 by swiping from the left side of the screen to the right because the map will start moving. You really have to touch from the very edge of the left side in order to go to Fragment 1.
How do I extend the swipeable area on the left side of the screen when in Fragment 2?
I've tried adding a left padding to the map which does work but the layout gets ugly since the map starts after the padding.
In google play, if you enter a screen that uses tabs, you can notice how you can scroll each tab but the panel that seen to contain the tabs also moves vertically to a certain extent. I can imagine that it accomplishes the movement of the tab panel with a TranslateAnimation and a layout animations. But what I can't understand is how it decouples the content of the tab from the tab panel.
To answer the decoupling of the tabs and content question; I have implemented this before using 2 sets of tabs. One is in the content as a list header, the other is layered on top of the list in a containing FrameLayout so it's 'floating'.
Using scroll callbacks you can change the visibility of the floating tabs to suit your needs. Once the list header tabs moves off the screen make the floating tabs visible, once they move fully back onto the screen hide the floating tabs.
Just ensure that every time you show/hide tabs that you copy the values for horizontal scroll position and selected tab from the currently visible tabs to the ones that are about to become visible. works a treat.
The best open-source project you can find for this Android-ObservableScrollView
I'm using sliding pane layout in my project. When it was in its closed state i tried to click on an empty space of my fragment's layout, but the click was performed on another fragment (which should be shown only when sliding pane layout is in open state), like it's on the top of the screen. It looks like empty RelativeLayout's space is transparent for clicking. Is there a bug or am I doing wrong something?
I have work on sliding menu. I have some problem of this sliding menu.
This is 3 frame layout. and i have Require slide center frame layout like this.
This is my second layout. how can i make this second layout?
Issue is: I have required second screen but in the second layout all frame are slide in right side. My requirement is only second frame move right side.
I am using same activity for multiple fragments. every fragment there is a searchview. Except home fragment in all other fragment we display listviews. In home fragment i have linear layouts to display some buttons and footer view. And when i type something in searchview in the home fragment it will display listview.i want to resize my screen when keyboard is up. So i have used below mentioned tag in manifest file for the actvity.
android:windowSoftInputMode="adjustResize"
It is wokring fine in all the fragments except home fragment. In home fragment when i tap on searchview(before typing.ie still displaying the buttons) the screen including the footer view is up. No issues with layout contains buttons. becuase it is scrollable. But topmost layout is not visible fully. Is it possible to stop it from pushing the footer layout to top in this fragment?