How to resize layouts by swiping up and down
-
Hello all, I have two layouts, one is below the other one. When user swipes down, I want upper layout to be bigger, and lower layout to be smaller and vice versa for when user swipes up. How can I achieve that? Here is my layout :
-
Hello all, I have two layouts, one is below the other one. When user swipes down, I want upper layout to be bigger, and lower layout to be smaller and vice versa for when user swipes up. How can I achieve that? Here is my layout :
-
You will need to add a handler for the swip actions and adjust the sizes of the two layouts. See Creating Swipe Views with Tabs | Android Developers[^].
Thank you for your answer, but your example doesn't answer my problem.
-
Thank you for your answer, but your example doesn't answer my problem.
-
I have shared the problem and the source code. Can you tell me what I'm missing? Thanks.
-
Hello all, I have two layouts, one is below the other one. When user swipes down, I want upper layout to be bigger, and lower layout to be smaller and vice versa for when user swipes up. How can I achieve that? Here is my layout :
What do you need help with, responding to the swipe gesture, or resizing the layout?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles