tag:blogger.com,1999:blog-8214401912480503366.post2058333147083936392..comments2023-08-10T13:35:15.093+02:00Comments on My life with Android :-): Custom viewsGabor Pallerhttp://www.blogger.com/profile/14307475522972458932noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8214401912480503366.post-5550014748937641492012-02-23T11:16:27.511+01:002012-02-23T11:16:27.511+01:00jl, it is not easy to find a use case that cannot ...jl, it is not easy to find a use case that cannot be satisfied with existing Android view descendant classes (buttons, lists, etc.). If you run into any such case, however, I cannot see how you can avoid subclassing a view class.Gabor Pallerhttps://www.blogger.com/profile/02390936870056951146noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-38398697956880565842012-02-22T22:18:24.922+01:002012-02-22T22:18:24.922+01:00Hello, thanks for the demonstration. I'm curio...Hello, thanks for the demonstration. I'm curious if I don't want to extend a View and create a programmatic class for the customized view, is there any other ways to do it?<br /><br />Thank you!jlnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-10243599574031478292011-09-01T15:53:47.306+02:002011-09-01T15:53:47.306+02:00Hi again, I just realized what it was: I missed th...Hi again, I just realized what it was: I missed the part about implementing all three constructors of View. Thanks for a great tutorial!Bakerhttps://www.blogger.com/profile/06127636505645137729noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-119312941260134502011-09-01T15:43:03.833+02:002011-09-01T15:43:03.833+02:00Hi, I have a similar solution but I extend a View....Hi, I have a similar solution but I extend a View. Very simple implementation. When I try to include it in my layout-file, I get an InflateException :/ Any ideas why? Appreciate any help! Mattias<br /><br />[com.myapp.test.MyView<br /> android:id="@+id/MyView"<br /> android:layout_width="fill_parent"<br /> android:layout_height="fill_parent"/]Bakerhttps://www.blogger.com/profile/06127636505645137729noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-84926351640978611052011-04-26T21:25:25.997+02:002011-04-26T21:25:25.997+02:00Kovacs, the example program uses a Handler created...Kovacs, the example program uses a Handler created in the application thread's context and invokes postDelayed() to execute tasks in the context of the application thread. There is no problem here, runOnUIThread() does the same internally.Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-79777413961694608532011-04-23T13:57:53.684+02:002011-04-23T13:57:53.684+02:00Hi!
I did not tried your method, but if you are ma...Hi!<br />I did not tried your method, but if you are manipulating your views from another thread, use context.runOnUIThread(new Runnable() {<br /> public void run() {<br /> manipulate here without a problem<br /> }<br />});<br /><br />regards,Kovacshttps://www.blogger.com/profile/12025674871746495851noreply@blogger.com