How to Set/Change the Height of a Button
1. Create a new Android project, if you don't already have one.
2. Add a button.
3. Open the main.xml file and add the below highlighted line to set the height to 100 pixels.
<Button
......
android:height="100px"
/>
4. Compile and run!
Related Articles
Popular Posts
- Perform an Action after Enter keypress on EditText
- android:ellipsize - Add an ellipsis(...) in a TextView
- How to Register an Activity that Responds to NFC tags for URI's that point to a URL
- android:alpha - Set the Opacity/Transparency of Text in TextView/EditText
- android:drawablePadding - Add Padding to a Drawable in a TextView, in XML
- MenuInflater - How to Inflate a Menu
- Create a Drawable Object Variable
- How to Import a Library
- android:textColorHighlight - Set the Color of Highlighted Text in an EditText
- Add a Bitmap Drawable to your Project