Here is source code of the Program to add Action to Home Icon using set the parentActivityName in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.set_parent_name; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.content.IntentFilter; import android.view.Menu; … Read more
Here is source code of the Program to Draw on a Canvas in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.draw_canvas; import android.app.Activity; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.os.Bundle; import … Read more
Here is source code of the Program to Demonstrate Creating an Options Menu in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.options_menu; import android.os.Bundle; import android.app.Activity; import android.view.Menu; public class MainActivity extends Activity { … Read more
Here is source code of the Program to Demonstrate Checkable Menu Items in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.usingcheckablemenuitems; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; public class MainActivity extends Activity { … Read more
Here is source code of the Program to Demonstrate Time Picker Dialog in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.timepickerdialog; import java.util.Calendar; import android.annotation.SuppressLint; import android.app.Activity; import android.app.Dialog; import android.app.DialogFragment; import android.app.TimePickerDialog; import android.os.Bundle; … Read more
Here is source code of the Program to Demonstrate Character Picker Dialog in Android using Java. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.characterpickerdialog; import android.app.Activity; import android.os.Bundle; import android.text.method.CharacterPickerDialog; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import … Read more
Here is source code of the Program to Demonstrate Date Picker Dialog in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.datepickerdialog; import android.app.Activity; import android.app.DatePickerDialog; import android.app.DatePickerDialog.OnDateSetListener; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.widget.Button; import … Read more
Here is source code of the Program to Demonstrate Adding Shortcuts to Items in a Menu in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.addingshortcutsitemsmenu; import android.os.Bundle; import android.app.Activity; import android.view.Menu; public class MainActivity extends … Read more
Here is source code of the Program to Demonstrate Adding Menu Items Based on an Intent in Android using Java. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.addingmenuitemsbasedintent; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; … Read more
Here is source code of the Program to Create Simple Menu in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below. Main Activity package com.example.createmenu; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; public class MainActivity extends Activity … Read more
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms.
Stay connected with him at LinkedIn.