explain about view and xml properties weight, gravity, padding, how to set the text and change the text for a button?
weight: Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams. You can use this property to tell how much portion of remaining space has to be used by your view.
gravity: gravity of the content with in the view. i.e whether content should be aligned center, right, bottom, or left.
padding: . Padding can be used to offset the content of the view by a specific amount of pixels. For instance, a left padding of 2 will push the view's content by 2 pixels to the right of the left edge.
To set text for button b, you can call b.setText("button");
Back To Top