Top "Android-layout" questions

A layout defines the visual structure for a user interface, such as the UI for an activity, fragment or app widget.

How to set layout_weight attribute dynamically from code?

How can I set the value for the attribute layout_weight for button in android dynamically from java code ?

android android-layout android-layout-weight
How to set space between listView Items in Android

I tried to use marginBottom on the listView to make space between listView Item, but still the items are attached …

android android-layout android-listview
Android: How to create a Dialog without a title?

I'm trying to generate a custom dialog in Android. I create my Dialog like this: dialog = new Dialog(this); dialog.…

android android-layout dialog
Android and setting alpha for (image) view alpha

Is there really no XML attribute counterpart to setAlpha(int)? If not, what alternatives are there?

android xml android-layout android-imageview alpha
ListView inside ScrollView is not scrolling on Android

I am having trouble with a scrolling ListView inside a ScrollView. I have an Activity which has some EditTexts in …

android listview android-layout scrollview
Add shadow to custom shape on Android

Is it possible to add a drop shadow to a custom shape in Android? After looking through the documentation, I …

android android-layout
Right Align button in horizontal LinearLayout

If you look at the attached image. I need my button to be right aligned but for some reason it's …

android android-layout
How to center the content inside a linear layout?

I'm trying to center an ImageView inside a LinearLayout horizontally and vertically, but I just can't do it. The main …

android android-layout android-linearlayout
Move layouts up when soft keyboard is shown?

I have a few elements in a RelativeView with the align bottom attribute set, when the soft keyboard comes up …

android user-interface android-layout android-keypad