Android: Custom view based on layout: how?
Posted
by Peterdk
on Stack Overflow
See other posts from Stack Overflow
or by Peterdk
Published on 2010-04-02T18:53:36Z
Indexed on
2010/04/02
19:13 UTC
Read the original article
Hit count: 741
android
|custom-view
I am building a Android app and I am a bit struggling with custom Views.
I would like to have a reusable View that consist of a few standard layout elements. Let's say a relativelayout with some buttons in it.
How should I proceed. Should I create a custom view class that extends RelativeLayout and programmaticly add those buttons? I would think that's a bit overkill?
What's the way to do it properly in Android?
© Stack Overflow or respective owner