In this tutorial you will learn how to create a RadioButton, which allows user to choose one of several options. Putting multiple RadioButton elements in one container makes it impossible to choose more than one option, which means that when user toggles one button it automatically cancels the previous one. There is only two things that you will need to do to have a RadioButton element in your application: 1. Add RadioButton element to xml layout file and 2. Add onClick() event handler to your activity class.
Showing posts with label Button. Show all posts
Showing posts with label Button. Show all posts
Android Button Example
In this tutorial you will learn:
- How to add a button element to your application layout
- How to change button's color
- How to react to user pressing a button.
Labels:
Android,
Button,
Button Color,
tutorial
Android ImageButton Example
1. Design your button
To do this you can use any software that you are comfortable with, it can be Paint or Microsoft Word, or Photoshop and PagePlus for something more sophisticated:) You can also find some very nice ready to use buttons on the internet (for example http://www.iconarchive.com is a good place to take a look at), just make sure to check the licence:) I have created a very simple button, that looks like this:
Labels:
Android,
Button,
ImageButton,
tutorial
Subscribe to:
Posts (Atom)


