I have a grid layout in the runtime (no gridview) This is my XML
& Lt; Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; GridLayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: ID = "@ + ID / Grid" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: RowCount = "4" Android: columnCount = "3" Android: verticalSpacing = "10dp" Android: horizontal = "10dp" & gt; & Lt; / GridLayout & gt; I add itmes on the runtime item is a square with image and text and everything works fine
" text "> Try it out for a beginner
selector_gridview_item_image_blue.xml
& lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Selector xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Item Android: Doubles = "@ Drauble / Gridview_item_im_order_blues_bluephone" Android: stat_press = "true" /> & Lt; Item Android: Dragon = "@ Drawable / Image_border" Android: state_focused = "true" /> & Lt; Item Android: droble = "@drawable / image_border" /> & Lt; / Selector & gt; gridview_item_image_border_blue_phone.xml
& lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Size xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Solid Android: Color = "@color / blue" /> & Lt; Stroke Android: width = "4dp" Android: color = "@ color / blue" /> & Lt; Padding android: bottom = "4dp" Android: left = "4dp" Android: right = "4dp" Android: top = "4dp" /> & Lt; / Size & gt;
No comments:
Post a Comment