Top "Android-view" questions

Questions regarding Views in Android.

How to create a custom View's layout programmatically?

In an Activity, you can create a LinearLayout programmatically in the following way: public void onCreate(Bundle savedInstanceState) { super.onCreate(…

android android-layout android-linearlayout android-view android-custom-view
Using Android AutoCompleteTextView with ArrayAdapter<Objects> instead of ArrayAdapter<Strings>

I wanted to use AutoCompleteTextView in my android application.I know how to use it with simple array of Strings, …

android autocomplete android-view android-adapter
Using clipRect - explanation

public class POCII extends Activity { myView mv = new myView(this); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(…

android android-canvas android-view
Changing CardView shadow color

This question was asked on SO many times, but still I didn't find a good solution for this problem. Why …

android android-view android-cardview shadow android-elevation
ConstraintLayout views in top left corner

Every time I create views like Button and TextView in ConstraintLayout, they all get stuck at the top corner instead …

android android-layout android-view android-constraintlayout view-hierarchy
What is an Android DecorView?

http://developer.android.com/reference/android/view/Window.html#getDecorView(): Retrieve the top-level window decor view (containing the standard window …

android window android-view
Is there a way to get current activity's layout and views via adb?

For environment reasons I can only use adb commands. Is there a way to get the current layout attributes like …

android adb android-view android-uiautomator
Android View inflateException

I'm trying to create a custom view - finger paint, and I'm having trouble with this error and I don't …

android android-canvas android-view android-custom-view android-inflate
What does top, left, right and bottom mean in Android Rect object

I have an Android project where I should make Apples fall. The apples are painted in a Rect. So I …

android android-canvas android-view android-shape
setVisibility(GONE) view becomes invisible but still occupies space

I've got a view that is effectively is a button. Here is its XML layout (add_new.xml) <?xml …

android android-listview android-view