[android-beginners] Re: Button in Custom View

2009-05-04 Thread wmhtet
I think that I have some workaround to it using XML. It is to call Custom View in XML with all the required button. First you need to create your View Constructor with AttributeSet, declare the XML with the tag and call the Custom XML in it with the desire button layout. The rest is a business a

[android-beginners] Re: Button in Custom View

2009-04-09 Thread ayush
hi, the LayoutInflater Class is used to obtain the View (i.e. buttons, textfields etc) from a layout specified in an XML document. in your case, the XML file contains Button elements. to use these button elements in your program, you have to first use the LayoutInflater class, which will take

[android-beginners] Re: Button in Custom View

2009-04-07 Thread xspotlivin
I don't really understand that whole LayoutInflator part you were talking about. What is the point of doing that? Also, if possible, can you elaborate some more on how you solved the problem. I really need to be able to move buttons around. Is there a way to destroy all the buttons and put new on

[android-beginners] Re: Button in Custom View

2009-04-06 Thread ayush
hi, i faced a similar problem when trying to add a button to a custom view (a game screen). i solved my problem using JAVA code instead of defining buttons in XML. i'm still a beginner at android so i'm not sure if this is correct - the error in ur code is probably here: Button checkbox =