-1

I can create dynamic buttons similar first picture now .I used Tablerow by create buttons similar first picture . I get database value then I set button's text values . So Button's text values is dynamic. Because button's text values is same time long, same time short so Button's width is dynamic. Because of this, I can not use Gridview.

Finally I want to create dynamic buttons similar second picture design. How can I do?

enter image description here

enter image description here

Kerim Baki
  • 1
  • 1
  • 4
  • 1
    check this link it will help you http://stackoverflow.com/questions/2124046/how-do-i-specify-different-layouts-for-portrait-and-landscape-orientations – Ahmed Bamarouf Mar 30 '15 at 18:00

1 Answers1

0

In Android you can define a layout for different screen orientations, like

MyProject/
res/
    layout/
        activity.xml
    layout-land/
        activity.xml

And the system will take care of displaying the correct view based on the screen orientation

Eric
  • 488
  • 4
  • 16