Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Widget remote views are not inflating properly
    primarykey
    data
    text
    <p>I am developing a widget for a music application that plays a soundtrack. I am trying to create a simple widget layout having play/pause, next, and prev buttons. I am exposing my <code>widget_info.xml</code> here:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="800dip" android:initialLayout="@layout/widget_layout" android:minHeight="100dip" android:updatePeriodMillis="180000"/&gt; &lt;/appwidget-provider&gt; </code></pre> <p>I've tried changing the size of the widget. I've tried 250, 320, 400 and 800 was my last try but still the widget size is the same small default kind of size.</p> <p>Here goes the widget_layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="2dip" android:layout_marginRight="4dip" android:background="@drawable/widget_bg"&gt; &lt;LinearLayout android:id="@+id/player_controls_layout" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="10dip"&gt; &lt;ImageButton android:id="@+id/widget_prev" android:layout_height="wrap_content" android:layout_width="50dip" android:paddingLeft="15dip" android:src="@drawable/prev" android:layout_gravity="center_vertical|center" android:clickable="true" /&gt; &lt;ImageButton android:id="@+id/widget_play" android:layout_height="wrap_content" android:layout_width="wrap_content" android:src="@drawable/play" android:clickable="true" android:focusable="true" /&gt; &lt;ImageButton android:id="@+id/widget_next" android:layout_height="wrap_content" android:layout_width="50dip" android:paddingRight="15dip" android:src="@drawable/next" android:layout_gravity="center_vertical|center" android:clickable="true" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>Ok, so you know every thing about it, now when I inflate the layout, I can't see all three buttons. I can see only the prev and half of the play button, the next button is below to that play button! Now how do I make a proper widget layout? I've also tried to insert this xml in an activity where it is working well and showing desired layout.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload