Android Question xCustomListView - Invalid layout size

Discussion in 'Android Questions' started by Tadeu Botelho, Nov 9, 2019 at 11:21 PM.

  1. Tadeu Botelho

    Tadeu Botelho Member Licensed User

    Hello friends
    I have a problem trying to read the full height of the full screen views. Because I want to open the layout within an xCustomListView.
    Could someone help me with this?
    The code is attached.
    Code:
    Sub Activity_Create(FirstTime As Boolean)
     
        
    If FirstTime=True Then
     
        
    Activity.LoadLayout("layout_configuracoes_clv")
            
    Dim fraContainer As Panel
            fraContainer.Initialize(
    "")
          
            
    'It should work by returning the full size for framing on the screen. But always returns less.
            fraContainer.SetLayout(00, CLV.AsView.Width, CLV.AsView.Height)
        
            
    'Tests done to manually stretch the height (This should be done automatically for some property I didn't find)
            'fraContainer.SetLayout(0, 0, CLV.AsView.Width, 130%y)                    'Android 4.4.4
            'fraContainer.SetLayout(0, 0, CLV.AsView.Width, CLV.AsView.Height) '120%y 'Android 9
            'fraContainer.SetLayout(0, 0, CLV.AsView.Width, CLV.AsView.Height + 15%y) 'Outros
        
            fraContainer.LoadLayout(
    "layout_configuracoes")
            CLV.Add(fraContainer,
    1)
        
        
    End If
     
    End Sub
     

    Attached Files:

    Last edited: Nov 9, 2019 at 11:28 PM
  2. Erel

    Erel Administrator Staff Member Licensed User

    1.
    This is a bug. Watch the activities life cycle video tutorial: https://www.b4x.com/android/forum/threads/android-process-and-activities-life-cycle.6487/#content

    2. Please use File - Export as zip when uploading projects.

    3. The height of the configuration layout should be set to 710dip. It has no relation with CLV height.
    Code:
    fraContainer.SetLayout(00, CLV.AsView.Width, 710dip)
    3b. Remove the call to AutoScaleAll from the configuration layout to prevent it from modifying the layout height.

    4. Check B4XPreferencesDialog:
    [​IMG]

    https://www.b4x.com/android/forum/t...esdialog-cross-platform-forms.103842/#content
     
    Last edited: Nov 11, 2019 at 7:11 AM
    Tadeu Botelho and LucaMs like this.
  3. Tadeu Botelho

    Tadeu Botelho Member Licensed User

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