Posts

Showing posts with the label Android Tutorial.

Analog and Digital clock in Android with Example

Image
In Android, Simple and computerized tickers are utilized to indicate time in android application .  The AnalogClock is a two-gave clock, one is hour marker and the another is minute pointer. The DigitalClock is resemble your typical computerized which show hours, watch available, minutes and seconds in advanced configuration. Both AnalogClock and DigitalClock Can't alter the time, in the event that you need to change the time, utilize "TimePicker." Example, We should get begin by making a project in Eclipse IDE . Make another venture in Shroud by exploring to File⇒ New Android ⇒ Application Project  and fill required points of interest. (I kept my fundamental movement name as MainActivity.java) Make a format petition for MainActivtiy.java under res ⇒ layout folder. I named the format record as activity_main.xml. In this design i had taken one Simple and one Computerized Clock. <RelativeLayout xmlns:androclass=”http://schemas.android.com/apk/res...

Android Spinner Example Code with Output

Image
Android Spinner  is like the combox box of AWT or Swing. It can be used to display the multiple options to the user in which only one item can be selected by the user.Android spinner is like the drop down menu with multiple values from which the end user can select only one value. Android spinner is associated with AdapterView. So you need to use one of the adapter classes with spinner. String.Xml < RelativeLayout   xmlns:androclass = "http://schemas.android.com/apk/res/android"         xmlns:tools = "http://schemas.android.com/tools"         android:layout_width = "match_parent"         android:layout_height = "match_parent"         tools:context = ".MainActivity"   >            < Spinner             android:id = "@+id/spinner1"           ...