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.

get parent's view from a layout

I have a FragmentActivity with this layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.…

android android-layout view parent-child
RecyclerView: Inconsistency detected. Invalid item position

Our QA has detected a bug: when rotating the Android device (Droid Turbo), the following RecyclerView-related crash happened: java.lang.…

android android-layout android-recyclerview screen-rotation
How to get screen width and height

I tried to use following code to get screen width and height in android app development: Display display = getWindowManager().getDefaultDisplay(); …

android android-layout android-emulator android-activity android-widget
What is the difference between background, backgroundTint, backgroundTintMode attributes in android layout xml?

While working with the android layout xml I came across backgroundTint attribute . I don't understand what is for. Also what …

android android-layout
Remove scroll bar track from ScrollView in Android

My Android app has a main WebView (HTML loaded from a local resource) which I want to use the entire …

android android-layout scrollview android-scrollbar
What is the purpose of Android's <merge> tag in XML layouts?

I've read Romain Guy's post on the <merge /> tag, but I still don't understand how it's useful. Is …

android android-layout include code-reuse
Android layout replacing a view with another view on run time

I have a xml-layout file main with two textviews A/B and a view C. I have two other xml-layout …

android xml android-layout view
Page scroll when soft keyboard popped up

I have a <ScrollView> layout: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.…

android android-layout android-intent android-scrollview android-keypad
Android Linear Layout - How to Keep Element At Bottom Of View?

I have a TextView which I want to pin at the bottom of a landscape activity that is using LinearLayout …

android android-layout android-linearlayout
Android checkbox style

I am new to android and I'm trying to set a style to all check boxes in my application. My …

android android-layout checkbox styles themes