Top "Android-view" questions

Questions regarding Views in Android.

Android windowSoftInputMode="adjustPan" scroll some more

Consider the following example for a view: <LinearLayout> <EditText /> <Button /> </LinearLayout> And …

android android-layout android-view android-xml
Detect touch event on a view when dragged over from other view

How do I detect the touch event if the user touches on view A and drags to bottom over the …

android android-view ontouchlistener
Getting position of View in onCreateViewHolder

I am using a RecyclerView with a single row layout with an ImageView and a TextView. I want to implement …

java android android-view android-recyclerview android-viewholder
OnTouch works, but OnClickListener doesn't?

I created a widget/control that I can reuse which I created by extending RelativeLayout. Then, in one of my …

android android-view onclicklistener ontouchlistener
How to draw a circle with radial gradient in a canvas?

I created a circle button that can change his color when I call a function. What I want is to …

android android-canvas android-view
How to Measure TextView Height Based on Device Width and Font Size?

I am looking for method in Android that will take a input (text, text_font_size, device_width) and based …

android android-layout android-canvas android-view textview
Android: how to disable controls during progress bar is active

I show my infinte progress bar in the action bar "as usual": requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); ... setProgressBarIndeterminateVisibility(true); ... setProgressBarIndeterminateVisibility(…

android android-layout android-view android-progressbar
How to disable BottomSheetDialogFragment dragging

How to disable BottomSheetDialogFragment dragging by finger? I saw similar questions, but they're all about BottomSheet not BottomSheetDialogFragment.

android android-layout android-view android-dialog bottom-sheet
Change Toolbar overflow icon color

I have an android.support.v7.widget Toolbar in my Android app. The background color of this is bright orange …

java android android-layout android-view android-toolbar
java.lang.IllegalArgumentException: pointerIndex out of range Exception - dispatchTouchEvent

I have this method in my custom view which extends FrameLayout: @Override public boolean dispatchTouchEvent(MotionEvent ev) { int currentItem = vp.…

android android-view