Top "Android-view" questions

Questions regarding Views in Android.

Programmatically set border for TableRow array

I know it is the same question as here But it hasn't receive an answer yet, so I try it …

android android-view tablerow android-tablelayout
Different fling (swipe) velocity on different Android devices with same density

I'm writing my own image viewer that enables users to swipe left\right to see the next\previous image. I …

java android android-animation android-view android-gesture
Android View setPadding() vs setPaddingRelative()

Based on the Android document which doesn't give much explanation, what's the difference between setPadding() vs setPaddingRelative()?

android android-view padding
How to get all children (visible and invisible) from a ListView?

My problem is similar to ListView getChildAt returning null for visible children, but despite searching I cannot find a solution. …

android android-listview android-view children
When are views attached and detached?

This question is not about how to detect if a view is attached or detached. In general, when is a …

android android-view
Why we use ViewTreeObserver#addOnGlobalLayoutListener()

Why do we use ViewTreeObserver, please can anyone explain it? In below code creditsView is TextView object. By this whole …

java android android-layout android-view android-viewtreeobserver
Controlling view visibility from a resources

I have a layout that contains two ImageViews. I want one of them to be visible in portrait and the …

android android-imageview android-view android-resources
Effect of setting parent view visiblity on its children

This question arises from having to show/hide different views dynamicly. View's have 3 visibility settings - visible, invisible, and gone. …

android android-layout android-linearlayout android-view
How is it possible to know which View has clicked in a layout OnClickListener?

I have a layout which contains some views. I want to set some actions when a user clicks anywhere in …

android android-layout android-view android-event
XML attributes from merge layout to RelativeLayout via inflate

According to this CommonsWare example I managed to get my RelativeLayout subclass to be merged with my layout described in …

android android-layout user-interface android-view commonsware