In Android, DatePicker is a widget used to select a date. It allows to select date by day, month and year in your custom UI (user interface). If we need to show this view as a dialog then we have to use a DatePickerDialog class. For selecting time Android also provides timepicker to select time.
In #Android, #ImageButton is used to display a normal #button with a #custom #image in a button. In simple words we can say, #ImageButton is a button with an image that can be pressed or clicked by the users. By default it looks like a normal #button with the standard #button background that changes the color during different #button states.
In this example we created dynamic view’s (ImageView and Button) programmatically in Java class. For creating views programmatically firstly we define the Relative Layout in our xml file and then add the code in java class to create ImageView and a Button one after another. Finally we perform onClick event listener on Button so whenever a user click on Button a message “ Button Clicked” is displayed on screen by using a Toast.
In #Android, #CheckBox is a type of two state #button either unchecked or checked in #Android. Or you can say it is a type of #on/off switch that can be toggled by the users. You should use #checkbox when presenting a group of selectable options to users that are not mutually exclusive. #CompoundButton is the parent class of #CheckBox #class.
In #Android, #ExpandableListView is a View that shows items in a vertically #scrolling two level list. Different from the #listview by allowing two level groups which can individually be expanded to show its children. Each group can be expanded or collapsed individually to show or hide its children items.
n Android, Switch is a two-state toggle switch widget that can select between two options. It is used to display checked and unchecked state of a button providing slider control to user. Switch is a subclass of CompoundButton. It is basically an off/on button which indicate the current state of Switch. It is commonly used in selecting on/off in Sound, Bluetooth, WiFi etc.
In Android, Button represents a push button. A Push buttons can be clicked, or pressed by the user to perform an action. There are different types of buttons used in android such as CompoundButton, ToggleButton, RadioButton.