Top "Android-widget" questions

Either relates to Home Screen widgets, or to general UI elements used on an Android Application screen.

How to control the width and height of the default Alert Dialog in Android?

AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Title"); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface …

android android-widget
How to make a smaller RatingBar?

I've added a RatingBar in a layout: <RatingBar android:id="@+id/ratingbar" android:layout_width="wrap_content" android:layout_…

android android-widget android-styles
Android How to adjust layout in Full Screen Mode when softkeyboard is visible

I have researched a lot to adjust the layout when softkeyboard is active and I have successfully implemented it but …

android android-layout android-widget android-softkeyboard
Android Image View Pinch Zooming

I am using code sample from Making Sense of Multitouch for zooming image view. On ScaleListener I added ScaleGestureDetector.getFocusX() …

android android-layout android-intent android-widget
How to force ViewPager to re-instantiate its items

I am using ViewPager to allow user to swipe between its views. Is there a way how to force this …

android android-widget android-viewpager
Handling click events on a drawable within an EditText

I have added an image right of the text in an EditText widget, using the following XML: <EditText android:…

android android-studio android-edittext android-widget compound-drawables
Assign width to half available screen width declaratively

Is it possible to assign a widget width to half the available screen width, and do it using declarative xml?

android android-widget
Changing position of the Dialog on screen android

I made a simple AlertDialog in my Activity: View view = layoutInflater.inflate(R.layout.my_dialog, null); AlertDialog infoDialog = new …

android android-layout android-intent android-emulator android-widget
How to retrieve the dimensions of a view?

I have a view made up of TableLayout, TableRow and TextView. I want it to look like a grid. I …

android layout android-widget lifecycle measure
Determine when a ViewPager changes pages

I have three pages (Fragments) inside a ViewPager, however I only want to display a menu item for two of …

android android-widget android-viewpager