Hi Piren,

My apologies.  I had read the docs exactly understood that apply does not 
add.  But that was my question as to how to add and I could not understand 
from your reply that resultant view needs to be added back into viewgroup.  
I have exactly what you suggested and it works fine now.  

Thanks a lot.

Regards,

Miten.

On Monday, 20 May 2013 16:26:05 UTC+5:30, Piren wrote:
>
> No they cannot be directly added, they need to be inflated and the 
> resulting view (not the removeview) should be added...which is what i asked 
> you.
>
> FFS, before you direct someone to read the docs, how about you read them 
> yourself, since obviously you haven't.
>
> http://developer.android.com/reference/android/widget/RemoteViews.html#apply(android.content.Context,
>  
> android.view.ViewGroup)
>
> Apply only inflates and applies the actions to the view, it does not add 
> it to the parent. 
>
>
> On Monday, May 20, 2013 12:32:23 PM UTC+3, miten wrote:
>>
>> Hi Piren,
>>
>> I am new to Android and what I understand is RemoteViews cannot be 
>> added.  They are applied/attached to viewgroups.  So I have created 
>> LinearLayout as viewgroup in my activity to which I tried the apply call.  
>> For more information I would refer to RemoteViews docs on android site.  I 
>> am myself newbie in this.
>>
>> Regards,
>>
>> Miten.
>>
>> On Sunday, 19 May 2013 21:15:03 UTC+5:30, Piren wrote:
>>>
>>> You mentioned apply, invalidate and forcelayout... you never mentioned 
>>> you actually added the view to the activity content... you did do that, 
>>> right? 
>>>
>>> On Sunday, May 19, 2013 5:54:16 PM UTC+3, miten wrote:
>>>
>>>> Hi,
>>>>
>>>> I have activity with linearlayout as viewgroup.  I have service which 
>>>> using aidl interface provides remoteviews with pending intents.  The 
>>>> activity as client binds to service and received the remoteviews.   Now I 
>>>> do not know what to do show that I can have the remoteviews show up in 
>>>> linearlayout.
>>>>
>>>> I have tried remoteviews.apply(activity, viewgroup) call and also tried 
>>>> invalidate, forceLayout on the viewgroup but the activity does not show 
>>>> the 
>>>> remoteviews.
>>>>
>>>> can one point me to example or snippet that explain how to resolve this 
>>>> issue ?
>>>>
>>>> Regards,
>>>>
>>>> Miten.
>>>>
>>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to