Category "android-layout"

centrally align icons in gridview

I want the icons to be centrally placed on the screen with proper alignment. What are the parameters I need to set? I have tried android:gravity and android:lay

RelativeLayout is taking fullscreen for wrap_content

Why does FOOBARZ get layed out all the way at the bottom when no elements are layout_height="fill_parent" in other words, all elements are wrap_content for heig

Android image scale type to fit width and scaleY = scaleX

I have a layout with a background image. The image width should be the same as the screen width (match_parent). But it's ugly, the OS don't stretch the picture

what is ems and why the editfield size is same (width)?

I just started android development, so I have two question in my mind First, why the size of edit field does not change its width. Secondly, what is the meani

Set android shape color programmatically

I am editing to make the question simpler, hoping that helps towards an accurate answer. Say I have the following oval shape: <?xml version="1.0" encoding=

How to customize a Spinner in Android

I want to add a custom height to the dropdown of a Spinner, say 30dp, and I want to hide the dividers of the dropdown list of Spinner. So far I tried to implem