Let us keep aside the fact that I'm using a custom view. Consider a normal case, where I am using an existing Android view, for example AnalogClock class in my layout. Is there anyway I can call a public method of AnalogClock Class through the remote view? I need to dynamically update something in the AnalogClock and that needs to be reflected in the remote view. Any help would be really appreciated.
Thanks On Oct 1, 1:14 pm, android learner <android.lear...@gmail.com> wrote: > Thanks Mark. Yes it is my own view class (like a button). But it works > fine in RemoteView as long as I do not attempt to "set" > anything in my view class. But one of the parameters in this view > class is dynamic and I need to set it from the Remote View (like we do > a setText for a button). That is where I am stuck at. I have a public > method in my view class which takes a string parameter and I somehow > need to call that method through the remote view. > > Thanks > > On Oct 1, 1:02 pm, "Mark Murphy" <mmur...@commonsware.com> wrote: > > > > Can some one please help me understand the setString function in > > > RemoteViews? > > > public void setString (int viewId, String methodName, String value) > > > > Can I pass any method name to setString ? I have a custom view in my > > > xml layout file. I'm passing the view id of my custom view, name of a > > > method in my custom view class and a string parameter for the method. > > > It doesn't seem to be working. Is there is a limitation on the methods > > > that can be passed to setString? Or is there something fundamentally > > > wrong in what I'm doing? > > > You can't have a custom view in a layout managed by RemoteViews, assuming > > that by "custom view" you mean your own separate class. > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com > > Android App Developer Books:http://commonsware.com/books.html > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---