codenameone - Implementing a fixed size virtual UI card -
i trying implement virtual ui id card card on devices. need 4 rows total , 3 columns. have width twice size of height (2:1 ratio).
1) considered border layout. seems spans whole screen size. size of card width 5 times size of height. did not visually work. suspect gridlayout suffer similar issues.
2) used table layout (4 x 3). tried using padding / margin , seems & feel of card ui gets out of proportion on tablets while looking decent on phones since phones seem naturally have similar width card.
3)i tried specifying widthpercentage constraint on table ui. again approach sufferred similar issues. since on smaller phones have remove add small percentage margins on big tablets may need bigger margins. can challenging right / test.
i thinking of attempting take 1 of following approaches:
1) not sure if there way specify textfield width based on number of characters. example when card issue date grows on tablet can fit 10s of characters want fit couple moht(mm) , 4 chars year(yyyy). there way that?
2) can tell screen width in inches or mm ? can implement function attempt , scale padding / margins on different screen size.
i appreciate feedback.
see kitchen sink demo has default "cards" mode in start. uses grid layout special cases fit columns in sensible way tablets/desktops.
Comments
Post a Comment