Android: Changing LinearLayout in a widget
<p>I have this really annoying problem:</p>

<p>In my widget, i would like to change the background by code. I noticed on the Google doc than I can easily change the background of an Imageview:</p>

<pre><code>remoteViews.setImageViewResource(R.id.my_iv, R.drawable.my_bg);
</code></pre>

<p>Ok, too easy, i want to change now the Linear layout.. What I read about the remoteview id that I can change a Bitmap, Int, Bool, String, etc... but not a drawable. So i guess i cannot use:</p>

<pre><code>remoteViews.setBitmap(R.id.my_ll,"setBackgroundDrawable",BitmapFactory.decodeResource(context.getResources(), R.drawablemy_bg));
</code></pre>

<p>I am totally disapointed and tried a last idea:</p>

<pre><code>views.setInt(R.id.my_ll,"setBackgroundResource",R.drawable.my_bg);
</code></pre>

<p>But The logcat told me: </p>

<blockquote>
  <p>android.widget.RemoteViews$ActionException:view:
  android.widget.LinearLayout can't use
  method with RemoteViews:
  setBackgroundResource(int)</p>
</blockquote>

<p>I am totally lost and I really don't know what to do...</p>

<p>I would really appreciate any help.</p>

<p>Thank a lot!</p>
