[android-developers] Re: How to change widget layout background or hide it dynamically?

2010-01-08 Thread Rahul Vij
Even I have the same problem. I tried to be smart and added an ImageView to fill my parent layout and tried to set the source of the Imageview using setImageViewResource (int viewId, int srcId)... but did not the desired results. as my background drawable was a NinePatch PNG and setting the source

[android-developers] Re: How to change widget layout background or hide it dynamically?

2009-12-21 Thread Ryan
I am having this same issue have you found a solution? My current workaround is to make a new XML layout file for each background that I want in the imageview. But I can't believe that there isn't a way to do this in code. Thanks, - Ryan On Dec 9, 2:58 pm, pcm2a wrote: > I have a simple layout:

Re: [android-developers] Re: How to change widget layout background or hide it dynamically?

2009-12-13 Thread nada fatma
*The Light Of Truth* ** * * * * *[align=left]What is life? Man's existence in this world and the creation of this entire universe are not mere accidents or products of a fortuitous nature. This universe, every sing

[android-developers] Re: How to change widget layout background or hide it dynamically?

2009-12-11 Thread Paul Turchenko
How about remoteView.setViewVisibility(R.id.your_linear_layout_id, View.Gone). On Dec 9, 10:58 pm, pcm2a wrote: > I have a simple layout: > http://schemas.android.com/apk/res/ > android" >                 android:background="@drawable/background" >         android:layout_height="fill_parent" >  

[android-developers] Re: How to change widget layout background or hide it dynamically?

2009-12-09 Thread pcm2a
I've tried two scenarios of this. 1. I used R.layout.mylayout remoteView.setBitmap(R.layout.main, "setBackgroundDrawable", ((BitmapDrawable) context.getResources().getDrawable (R.drawable.background)).getBitmap()); 12-09 19:55:06.972: WARN/AppWidgetHostView(626): updateAppWidget couldn't

[android-developers] Re: How to change widget layout background or hide it dynamically?

2009-12-09 Thread Paul Turchenko
how about setBitmap(R.layout.you_view_id, "setBackgroundDrawable", mYourBitmapDrawable)? On Dec 9, 10:58 pm, pcm2a wrote: > I have a simple layout: > http://schemas.android.com/apk/res/ > android" >                 android:background="@drawable/background" >         android:layout_height="fill_pa