Friday, December 09, 2011
Digital Clock in Android :
# We have to create a Digital Clock :
// Source Code of digital.xml :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<DigitalClock
android:id="@+id/clockdigital"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#0000FF"
android:textSize="60dp"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
Output :
# We have to create a Digital Clock :
// Source Code of digital.xml :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<DigitalClock
android:id="@+id/clockdigital"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#0000FF"
android:textSize="60dp"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
Output :

Author: Mohammad
Mohammad is the founder of STC Network which offers Web Services and Online Business Solutions to clients around the globe. Read More →
Related Posts:
Subscribe to:
Post Comments (Atom)
0 comments: