B4J Question Obtaining height of a ListView row/line

Discussion in 'B4J Questions' started by Didier9, May 22, 2019.

  1. Didier9

    Didier9 Active Member Licensed User

    In B4A, we can get the height of an individual cell in a listview using SingleLineLayout.ItemHeight so it is possible to adjust the overall height of the control to match the content.
    These properties are not available (at least not directly) under B4J. Is there another way to do the same thing?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You should use xCustomListView in both B4A and B4J (and B4i). You will have full control and you will be able to share the code.

    It is possible to set the row height with a CSS file:
    Code:
    .list-cell {
        -fx-cell-size: 40px;
    }
     
    Didier9 likes this.
  3. Didier9

    Didier9 Active Member Licensed User

    Thank you, that sounds like the way to go...
     
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