How to add a button dynamically in Android? -


Android में गतिशील रूप से एक बटन कैसे जोड़ें?

  बटन myButton = नया बटन (यह); MyButton.setText ("मुझे पुश करें"); LinearLayout ll = (LinearLayout) findViewById (R.id.buttonlayout); लेआउटपरम एलपी = नया लेआउटप्रर्म (लेआउट पैरामा.एमएटीएचपीएआरएनआरटी, लेआउटप्रैम। WRAP_CONTENT); Ll.addView (myButton, एलपी);  

उदाहरण के लिए एक नज़र डालें


Comments

Popular posts from this blog

iphone - How do I make a UIPickerView in a UIActionSheet -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -