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.

Android - Center TextView Horizontally in LinearLayout

I have the following basic layout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" …

android android-layout android-linearlayout layout-gravity
Write a file in external storage in Android

I want to create a file in external storage sdCard and write to it.I have searched through internet and …

android android-layout android-emulator
RecyclerView expand/collapse items

I want to expand/collapse the items of my recyclerView in order to show more info. I want to achieve …

android android-layout android-recyclerview expand
How to center icon and text in a android button with width set to "fill parent"

I want to have an Android Button with icon+text centered inside it. I'm using the drawableLeft attribute to set …

android android-layout user-interface button alignment
How to add (vertical) divider to a horizontal LinearLayout?

I'm trying to add a divider to a horizontal linear layout but am getting nowhere. The divider just doesn't show. …

android android-layout android-linearlayout divider
How to detect the swipe left or Right in Android?

I have an EditText view in android. On this I want to detect swipe left or right. I am able …

android android-layout android-edittext
Border in shape xml

I am trying to make a drawable to use for a button. I would like it to have this coloring, …

android android-layout border shapes stroke
How can I change default dialog button text color in android 5

I have many alert dialogs in my app. It is a default layout but I am adding positive and negative …

android android-layout android-5.0-lollipop android-alertdialog textcolor
How to dismiss the dialog with click on outside of the dialog?

I have implemented a custom dialog for my application. I want to implement that when the user clicks outside the …

android android-layout android-emulator dialog android-dialog
In android how to set navigation drawer header image and name programmatically in class file?

In android studio 1.4.1, I have created new Navigation Drawer Project which is default.My issue is in this project there …

android android-layout android-fragments androiddesignsupport android-navigationview