Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. How to resize layouts by swiping up and down

How to resize layouts by swiping up and down

Scheduled Pinned Locked Moved Android
questiontutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jasonalien
    wrote on last edited by
    #1

    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 :

    L D 2 Replies Last reply
    0
    • J jasonalien

      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 :

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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[^].

      J 1 Reply Last reply
      0
      • L Lost User

        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[^].

        J Offline
        J Offline
        jasonalien
        wrote on last edited by
        #3

        Thank you for your answer, but your example doesn't answer my problem.

        L 1 Reply Last reply
        0
        • J jasonalien

          Thank you for your answer, but your example doesn't answer my problem.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I'm sorry but you have not really given enough detail of what your problem is.

          J 1 Reply Last reply
          0
          • L Lost User

            I'm sorry but you have not really given enough detail of what your problem is.

            J Offline
            J Offline
            jasonalien
            wrote on last edited by
            #5

            I have shared the problem and the source code. Can you tell me what I'm missing? Thanks.

            1 Reply Last reply
            0
            • J jasonalien

              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 :

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups