
Custom Checkboxes in Mobile Computing: Practical Class for IT & CS Students
"Explore the practical aspects of custom checkboxes in mobile computing for IT & CS students. Learn how to design layouts, code in XML and Java, handle checkbox properties, and create visually appealing user interfaces. Discover the value of string manipulation and improve your Android development skills."
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Practical Mobile computing Custom checkbox Fourth class IT&CS Mhanad ali
Design the layout Drag and drop two object from widget 1- two text view A- for click on checkbox B- for unchecked 2- Check box
Code of java1 package com.androidexample.customcheckbox; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.CheckBox; import android.widget.TextView; public class CustomCheckbox extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); CheckBox checkb = ( CheckBox ) findViewById( R.id.checkb ); checkb.setOnClickListener(this); }
Code of java2 @Override (TextView)findViewById(R.id.textview1); if (((CheckBox)v).isChecked()) { output.setText("checked"); } else { output.setText("unchecked"); } } } public void onClick(View v) { TextView output =