Android Question How to create layout like in windows

junaidahmed

Well-Known Member
Licensed User
Longtime User
I am going to create tileview like window 8 as per below link sample. For this ,I have created four panel in my layout.Can you please help how to do this layout with image in four panel or share some example code ??.

For your reference,please check attached layout file...

 

Attachments

  • listpage.bal
    4.4 KB · Views: 79

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
you could use this example as a staring point

 
Upvote 0

junaidahmed

Well-Known Member
Licensed User
Longtime User
you could use this example as a staring point

Thanks for reply
Can you provide layout for dashboard ui (card with image)??
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
I had a look at your layout. You need to add an imageview to each panel.

You need to use .settopandBottom as well as setleftandright


B4X:
PnlScanIn.SetTopAndBottom(10%y,50%y)
PnlScanIn.SetLeftAndRight(10%x,50%x)
PnlScanOut.SetLeftAndRight(51%x,91%x)
PnlScanOut.SetTopAndBottom(10%y,50%y)
LblScanin.SetLeftAndRight(10%x,30%x)
LblScanout.SetLeftAndRight(10%x,30%x)
LblConfig.SetLeftAndRight(10%x,30%x)
LblExit.SetLeftAndRight(10%x,30%x)

PnlConfig.SetLeftAndRight(10%x,50%x)
PnlConfig.SetTopAndBottom(51%y,91%y)
PnlExit.SetLeftAndRight(51%x,91%x)
PnlExit.SetTopAndBottom(51%y,91%y)

It would probably be better to create a card customview and use that on your main screen.
 
Upvote 0

junaidahmed

Well-Known Member
Licensed User
Longtime User
I had a look at your layout. You need to add an imageview to each panel.

You need to use .settopandBottom as well as setleftandright


B4X:
PnlScanIn.SetTopAndBottom(10%y,50%y)
PnlScanIn.SetLeftAndRight(10%x,50%x)
PnlScanOut.SetLeftAndRight(51%x,91%x)
PnlScanOut.SetTopAndBottom(10%y,50%y)
LblScanin.SetLeftAndRight(10%x,30%x)
LblScanout.SetLeftAndRight(10%x,30%x)
LblConfig.SetLeftAndRight(10%x,30%x)
LblExit.SetLeftAndRight(10%x,30%x)

PnlConfig.SetLeftAndRight(10%x,50%x)
PnlConfig.SetTopAndBottom(51%y,91%y)
PnlExit.SetLeftAndRight(51%x,91%x)
PnlExit.SetTopAndBottom(51%y,91%y)

It would probably be better to create a card customview and use that on your main screen.
Can you provide example of card customview??
 
Last edited:
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Can you add animated text and animated image (with background color) like windows 8 tile

Sorry, no. I'm happy to help but I'm not going to write all your code for you.

Adding background color is just using the color method on the panel/text.

There are examples on the forum of how to do animation. Such as,
 
Upvote 0
Top