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.

Percentage width in a RelativeLayout

I am working on a form layout for a Login Activity in my Android App. The image below is how …

android android-layout android-relativelayout
Standard Android Button with a different color

I'd like to change the color of a standard Android button slightly in order to better match a client's branding. …

android android-layout
How do I get the currently displayed fragment?

I am playing with fragments in Android. I know I can change a fragment by using the following code: FragmentManager …

android android-layout android-intent android-fragments
How to inflate one view with a layout

I have a layout defined in XML. It contains also: <RelativeLayout android:id="@+id/item" android:layout_width="fill_…

android android-layout layout-inflater android-inflate
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 …

android android-layout android-spinner
Closing Application with Exit button

I'm a beginner in android, I'm practicing a Project that have a 2 labels and 1 exit button. But when I run …

android android-layout layout exit
Android toolbar center title and custom font

I'm trying to figure out the right way to use a custom font for the toolbar title, and center it …

android android-layout android-toolbar android-theme android-styles
How do I change the android actionbar title and icon

I'm trying to do some things on the ActionBar in Android. I've already added new items in the right side …

android android-layout android-actionbar
Android: how to draw a border to a LinearLayout

I have three files. The XML, the draw function and the main Activity. I have some LinearLayout in my XML …

android android-layout draw
What does android:layout_weight mean?

I don't understand how to use this attribute. Can anyone tell me more about it?

android android-layout android-widget