Three screens with vertical sliding ability - java

How is the best way to make three vertical screens with sliding between them, like ViewPager.
I want to show user middle screen with ViewPager for horizontal pictures sliding, and two screens for settings (top and bottom).
I tried to use ViewPager in ViewPager, but it's a bad solution for me.
Then ViewFlipper but could not make sliding between screens like ViewPager.
My last chance now is ViewDragHelper but I'm not sure.
Maybe somebody knows real example?

Related

Swipe to Refresh But Swiping Up from Bottom Of Screen? in Jetpack Compose

I haven't found a question that was exactly what I was asking. The only one I found was from 6 years ago: Android Swipe Up to Refresh ListView
When I reach the bottom of a Column of Text lists, I want to be able to swipe up from the bottom of the screen to refresh and load more content of the list view. Bottom to Up.
I checked the SwipeRefresh library from Google Accompanist, that library only changes the alignment of the swipe, not the swipe direction.
I don't want to have to import someone's library, is there a way to do this without having to do that?

How to make a Bottom Navigation bar with ImageView instead of Menu Items?

How can I make a working bottom navigation bar with ImageViews in a LinearLayout(Horizontal) With fragments ? instead of menu items.
if already exist then please share the source code. Please help quickly :)
Or the Question could be this :
https://github.com/qhutch/BottomSheetLayout/issues/12#issue-576279364
Oh, I found my solution not exactly but this is what I want...
I add that Bottom Navigation View in a LinearLayout(horizontal) and I delete all default Styles from BottomNavigationView. So now this is not looking like a card view. After this, I add an ImageView in the LinearLayout with a weight of a ratio of 1:3 (for 4 icons ). Now I can use effects and designs on my LinearLayout. And it is looking like how I wish. 😌
[Note: For horizontally rotated screen LinearLayout, ImageView, BottomNavigationView 's width:match-parent]

Scrollable Views Interacting with other child views like Google street View

I intend achieving a layout similar to what is shown.
I have tried achieving similar behavior with Bottom sheet, percentFrameLayout, ScrollView and Coordinated layout on different occasions, but I've not being able to achieve something similar to the view that (possibly a fragment) that is scroll from the bottom of the screen and interact with other child views on the screen like the tab and the refresh button.
Any guideline and directions on how i can do this ?
You can use a RecyclerView for the cards and leave your toolbar and main content on a FrameLayout at the same level as the map. And of course a coordinator layout and proper behaviors on each element.
By doing this your recycler view will be able to interact with the toolbar and still be independent from the map.
In other words, you can reduce your problem to a single recyclerview scroll with a toolbar by making a space on the beginning of the vertical recyclerView.

Creating launcher animations in android

I am thinking about making a launcher for android, i dont know if i'll market it. But i'm thinking like my phone is in landscape mode, and i see 4 rows of buttons, and 4 buttons on each row. Kind of like a grid with buttons. And then, once i click a button, i want the buttons splitted in the middle and moved from each other, with an animation. And then a second screen comes in from the back. How can i do this? I thought of creating two layouts holding 4 buttons each, and once i click one, it should move the layouts from each other and the second blank screen would kind of fly in from the back, like if it was behind the buttons. How can i create these animations? Please help me and thanks so much!
You can add a middle row with width initially as 0dp, and then when opening an Activity you could animate its width, and for the second screen you can use a simple zoomIn animation with overridePendingTransition() after startActivity()

Android implementing tabbed layout that you can swipe across

I am trying to implement a layout that looks like a tabbed view, but is it possible to implement it in such a way that if the user swipes horizontally, then it will switch to a different tab? A good example of this is the Google+ app for Android. In the streams Activity, there are three tabs (or subsections): Nearby, All Circles, and Incoming. Notice how when you swipe in one horizontal direction, the screen scrolls to the corresponding subsection. Is there a way to implement this?
You can achieve that with fragments and viewpager. you can use the things through android-support-v4 library. android-support-v4 library including the example matches your need.

Categories