Android Question Vertical sliding panels

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Hello

Its possible to slide the panels in vertical direction? I see the movement in horizontal, but I don´t find nothing in vertical
Thanks

Regards
 

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Thanks but I think that I am looking for different solutions. To move the panel in vertical direction when you touch the screen
 
Upvote 0

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Thanks, I've seen HorizontalScroolView.... but in all examples, the panels are created by code, how is possible to do movement if the panel is created by design?
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Yes, you just need to capture the gesture..

e.g.

B4X:
Sub Panels_Touch (Action As Int, X As Float, Y As Float)
Select ActionCaseActivity.ACTION_DOWN
 startX = X
 startY = Y
CaseActivity.ACTION_UP
If Abs(Y - startY) > 20%y Then
     If Y - startY > 30%y True Then
          ToastMessageShow ("down",True) Return
Else If startY - Y > 30%y = True Then
     ToastMessageShow ("up",True) Return
End If
End If
If X - startX > 30%x = True Then 
 ChangePanel(False)
Else If startX - X > 30%x = TrueThen
 ChangePanel(True)
End If
End Select
End Sub


From here : https://www.b4x.com/android/forum/t...ls-simple-way-to-create-sliding-layouts.8233/
 
Upvote 0

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Thanks again
Klaus, I have some apks with more quantity of controls in each form. Now, the customer has changed the resolution and he hasn´t the possibilty to see all the controls with the new resolution. If I don´t want to change all the apsks only I image to put all the controls in a panel and to slide.. I am seeing that I have to put again all the controls for the new resolution. A big and bored problem
 
Upvote 0

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
I am trying now scrollview
I've created a panel (pnlInicio), with the designer

I've written the following code

ScrollV.Initialize(1000dip)
ScrollV.panel.AddView(pnlInicio, 0, 0, pnlInicio.width, pnlInicio.Height)

But I have an error; that the specified child already has a parent, and I have to remove the childs parent first, and I don´t understand because the pnlInicio parent is Activity
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You need to explain more what exactly you have done!
What layouts do you have?
Is the ScrollView defined in a layout in the Designer or added in the code?
If added in the Designer you must not initialize it again in the code.
Define a layout in the Designer with a panel ,even bigger than the screen, with all the views on it.
Then load this layout onto the ScrollView with ScrollView.Panel.LoadLayout.

But, whithout seeing what exactly you have done it's very difficult to give a concrete advice.
The best way would be to upload the project you have.
So we could check it and give a concrete advice.

Did you look at ScrollView example with a Panel higher than the screen?
It does what I explained above.
 
Upvote 0

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Hello Klaus
I thought that I sent this post the last saturday..

My first designs were built for a resolution 1600x2560, and now I want to change 1536x2048, and logically I don´t have place in the new design for all the controls. (I attach an example, First figure, the first design, and second figure, the second design).

As you can see, if I use "anchor" and autoscale all, I have the posibility to adjust the width, but.. could I have the possibilty to adjust the heigth????

I am thinking that the best option is to design again all with the new resolution

Thanks

upload_2017-5-24_13-22-0-png.56020





upload_2017-5-24_13-28-18-png.56021
 
Upvote 0

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
I don´t get to solve it. When I change the resolution in the tablet I lose the keyboard and it´s impossible to check in it's working
 
Upvote 0
Top