Android Gridlayout is not resizing and placing itself in the center of the screen -
I'm not sure why my grid layout is not visible in the center of the screen, besides, I want to change it again So that it can fit any screen on any device I use.
Here I am using XML to create my own UI:
& lt; GridLayout xmlns: android = "http://schemas.android.com/apk/res/Android: layout_width =" match_parent "Android: layout_height =" match_parent "android: layout_gravity =" center "Android: stretchMode =" columnWidth "Android: UseDefaultMargins = "true" android: columnCount = "4" & gt; Spinner Android: id = "@ + id / selectplayerDropdown" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: layout_columnSpan = "4 "/> & Gt; ImageView Android: id =" @ + id / imageView0 "Android: layout_row =" 1 "Android: layout_column =" 0 "Android: background =" # C0C0C0 "/> gt; & lt ; ImageView android: id = "@ + id / imageView1" Android: layout_row = "1" Android: layout_column = "1" Android: Page Profile: layout_width = "wrap_content" /> & gt; ImageView Android: Android: Android: Android: layout_row = "1" Android: layout_column = "2" Android: background = "#EEEEE" Android : Layout_width = "wrap-content" /> & Lt; ImageView android: id = "@ + id / imageView3" Android: layout_row = "1" Android: layout_column = "3" Android: background = "# FF 20000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: Android: Android: layout_row = "2" Android: layout_column = "0" Android: background = "# FF 20000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: Android: Android: Android: layout_row = "2" Android: layout_column = "1" Android: background = "# FF 20000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: Android: layout_row = "2" Android: layout_column = "2" android: background = "# FF0000" Android: layout_width = "wrap_content" /> & Lt; ImageView android: id = "@ + id / imageView7" Android: layout_row = "2" Android: layout_column = "3" android: background = "# FF0000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: Android: Android: Android: Android: layout_arrow = "3" Android: layout_column = "0" Android: background = "# FF 20000" Android: layout_width = "rap_sign" /> & Lt; ImageView android: id = "@ + id / imageView9" Android: layout_row = "3" Android: layout_column = "1" Android: background = "# FF 20000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: Android: Android: Android: Android: layout_row = "3" Android: layout_column = "2" Android: background = "# FF 20000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: AD = "@ + ID / Image View 11" Android: layout_row = "3" Android: layout_column = "3" Android: background = "# FF 20000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: Android: Android: Android: Android: layout_arrow = "4" Android: layout_column = "0" Android: background = "# FF 20000" Android: layout_width = "wrap-content" /> & Lt; ImageView Android: Android: Android: Android: Android: Android: Layout_Auro = "4" Android: Layout_ column = "1" android: background = "# FF0000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: id = "@ + id / imageView14" android: layout_row = "4" Android: layout_column = "2" Android: background = "# FF 20000" Android: layout_width = "wrap_content" /> & Lt; ImageView Android: Android: Android: Android: Android: layout_row = "4" Android: layout_column = "3" Android: background = "# FF 20000" Android: layout_width = "rap_sign" />
And this is what looks like:
Comments
Post a Comment