开发者

Set the XML file for Layout design according IPhone screen widgets

开发者 https://www.devze.com 2023-03-10 18:30 出处:网络
I want this type of layout how i can do开发者_如何学运维 this all the titles should be clickable

I want this type of layout how i can do开发者_如何学运维 this

Set the XML file for Layout design according IPhone screen widgets

all the titles should be clickable

please help me

I used Button and TextView but it seems very dull


Inflate a LinearLayout with a TextView and an image (the right arrow). That LinearLayout must have clickable="true" and onClick="methodYouLike"

To identify what is being clicked you can add a tag to each, with an id, like android:tag="1", android:tag="2" ...

On the Activity onClick receives a View, só you can get that view, an obtain the tag, and do what you need.


If you are not content with the standard UI you can always write your own custom widgets. See here for some more information.


Aso if you need not only 4 items but many, you can use ListView
You can provide a layout resource id and it will be atomatically inflated into each row. Datasource could be as DB so array and so on.

0

精彩评论

暂无评论...
验证码 换一张
取 消