Android Question [SOLVED] [B4A] Pfdialog Scrollable at Android...

Discussion in 'Android Questions' started by Magma, May 6, 2019.

  1. Magma

    Magma Well-Known Member Licensed User

    Hi there...

    I am trying to have pfdialog scrollable in a panel... but can't...

    Code:
    Sub Globals
       
    'These global variables will be redeclared each time the activity is created.
       'These variables can only be accessed from this module.
       Private mypanel As Panel
       
    Private newform As Panel 'newform is a panel that have parent the mypanel...!
    End Sub

    '...
    'and somewhere in my code:
               mypanel.Visible=True
               
    Dim yheight As Int
               yheight=
    600
               Data.Initialize
               pfdialog.Initialize(newform, 
    "blah blah...",  100%x, yheight)  'tried with dip the same, tried with 100%y the same.... what is the right value here ?
               pfdialog.LoadFromJson(File.ReadString(File.DirAssets, "signin.json"))
               pfdialog.SetEventsListener(Me, 
    "pfdialog")
               
    Wait For (pfdialog.ShowDialog(Data, "Login""CANCEL")) Complete (Result As Int)
               
    If Result = xui.DialogResponse_Positive Then

               
    End If
               mypanel.Visible=
    False
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can set the dialog height to whichever height you like. It should of course include 'dip' units or percentage.

    Start with 300dip. The dialog will be scrollable if the content is taller than the height.
     
  3. Magma

    Magma Well-Known Member Licensed User

    Can you see the layout - to check it - because when i use it in portrait it's ok (because don;t need to scroll) ... but in landscape... having problems...
     

    Attached Files:

    • 1.bal
      File size:
      5.4 KB
      Views:
      12
  4. Magma

    Magma Well-Known Member Licensed User

    I don't use the xnewform that is scollview... put it to test...something..
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    We cannot do anything with the layout file.
    Make sure not to set the dialog to be taller than 90%y. This is probably the problem.
     
  6. Magma

    Magma Well-Known Member Licensed User

    For my layout worked that: 85%y-110dip

    Thanks... The guide with 90%y helped...
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice