Write an android app to get the current location using GPS.
[Link]
<uses-permission
android:name="[Link].ACCESS_FINE_LOCATION" />
<uses-permission
android:name="[Link].ACCESS_COARSE_LOCATION"/>
<uses-permission
android:name="[Link].ACCESS_BACKGROUND_LOCATION"/>
<uses-permission android:name="[Link]"/>
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<Button
android:id="@+id/button_location"
style="@style/[Link]"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get Location"
android:textStyle="bold"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"/>
<TextView
android:id="@+id/textview_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/button_location"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"/>
</RelativeLayout>
Page | 1
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
Button buttonLocation;
TextView textViewLocation;
LocationManager locationManager;
LocationListener locationListener;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
buttonLocation = findViewById([Link].button_location);
textViewLocation = findViewById([Link].textview_location);
locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
locationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
[Link]("Latitude: " +
[Link]() + "\nLongitude: " + [Link]());
}
@Override
public void onStatusChanged(String provider, int status,
Bundle extras) {}
@Override
public void onProviderEnabled(String provider) {}
@Override
public void onProviderDisabled(String provider) {
[Link]([Link], "Please enable
GPS", Toast.LENGTH_SHORT).show();
}
};
[Link](v -> {
Page | 2
if
([Link]([Link],
[Link].ACCESS_FINE_LOCATION) !=
PackageManager.PERMISSION_GRANTED) {
[Link]([Link],
new String[]{[Link].ACCESS_FINE_LOCATION}, 1);
} else {
[Link](LocationManager.GPS_PROVIDER,
0, 0, locationListener);
}
});
}
}
Page | 3
Write an android program to display stationary items in the Main Activity with the
check box
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:id="@+id/textViewItems"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:text="Stationary Items:"
android:textSize="18sp" />
<CheckBox
android:id="@+id/checkBoxPen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pen (Rs.10)"
android:layout_below="@id/textViewItems"
android:layout_marginTop="10dp"
android:layout_marginStart="20dp"/>
<CheckBox
android:id="@+id/checkBoxPencil"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pencil (Rs.5)"
android:layout_below="@id/checkBoxPen"
android:layout_marginTop="10dp"
android:layout_marginStart="20dp"/>
<CheckBox
android:id="@+id/checkBoxNotebook"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Notebook (Rs.50)"
android:layout_below="@id/checkBoxPencil"
android:layout_marginTop="10dp"
android:layout_marginStart="20dp"/>
<ToggleButton
android:id="@+id/toggleButtonVAT"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="VAT-Off"
android:textOn="VAT-On"
android:layout_below="@id/checkBoxNotebook"
Page | 4
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"/>
<RadioGroup
android:id="@+id/radioGroupMembership"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/toggleButtonVAT"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp">
<RadioButton
android:id="@+id/radioButtonMember"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Member (2% Discount) "
android:checked="true"/>
<RadioButton
android:id="@+id/radioButtonNonMember"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Non-member (No Discount)"/>
</RadioGroup>
<Button
android:id="@+id/btnGenerateBill"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Generate Bill"
android:layout_below="@id/radioGroupMembership"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"/>
<TextView
android:id="@+id/textViewBill"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textSize="18sp"
android:layout_below="@id/btnGenerateBill"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"/>
</RelativeLayout>
Page | 5
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
CheckBox checkBoxPen, checkBoxPencil, checkBoxNotebook;
ToggleButton toggleButtonVAT;
RadioGroup radioGroupMembership;
RadioButton radioButtonMember, radioButtonNonMember;
Button btnGenerateBill;
TextView textViewBill;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
checkBoxPen = findViewById([Link]);
checkBoxPencil = findViewById([Link]);
checkBoxNotebook = findViewById([Link]);
toggleButtonVAT = findViewById([Link]);
radioGroupMembership =
findViewById([Link]);
radioButtonMember = findViewById([Link]);
radioButtonNonMember =
findViewById([Link]);
btnGenerateBill = findViewById([Link]);
textViewBill = findViewById([Link]);
[Link](new
[Link]() {
@Override
public void onClick(View v) {
double totalAmount = 0;
if ([Link]()) {
totalAmount += 10; // Price of pen
}
if ([Link]()) {
totalAmount += 5; // Price of pencil
}
if ([Link]()) {
totalAmount += 50; // Price of notebook
}
Page | 6
if ([Link]()) {
totalAmount *= 1.15; // Adding 15% VAT
}
if ([Link]()) {
totalAmount *= 0.98; // 2% discount for members
}
[Link]([Link]([Link](), "Total Bill:
₹%.2f", totalAmount));
}
});
}
}
Page | 7
Create a SQLite database that contains EMPLOYEE table. The
EMPLOYEE table contains the [Link], Name and Basic Salary
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
private SQLiteDatabase db;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
// Create or open the database
db = openOrCreateDatabase("EmployeeDB", MODE_PRIVATE,
null);
// Create EMPLOYEE table if not exists
[Link]("CREATE TABLE IF NOT EXISTS EMPLOYEE (EmpNo
INTEGER PRIMARY KEY, Name TEXT, BasicSalary REAL)");
// Initialize UI components
EditText editTextEmpNo =
findViewById([Link]);
EditText editTextName =
findViewById([Link]);
EditText editTextSalary =
findViewById([Link]);
TextView textViewResult =
findViewById([Link]);
Button buttonAdd = findViewById([Link]);
Button buttonDelete = findViewById([Link]);
Button buttonView = findViewById([Link]);
Button buttonCalculate =
findViewById([Link]);
Page | 8
// Button listeners
[Link](view -> {
// Add new record to the database
addEmployee([Link]().toString(),
[Link]().toString(),
[Link]().toString());
});
[Link](view -> {
// Delete record from the database
deleteEmployee([Link]().toString());
});
[Link](view -> {
// View record details from the database
viewEmployee([Link]().toString(),
textViewResult);
});
[Link](view -> {
// Calculate gross salary
calculateGrossSalary([Link]().toString(),
textViewResult);
});
}
// Database operations
private void addEmployee(String empNo, String name, String
salary) {
// Execute INSERT query
[Link]("INSERT INTO EMPLOYEE VALUES (" + empNo + ",
'" + name + "', " + salary + ")");
showToast("Record added successfully!");
}
private void deleteEmployee(String empNo) {
// Execute DELETE query
[Link]("DELETE FROM EMPLOYEE WHERE EmpNo = " +
empNo);
showToast("Record deleted successfully!");
}
private void viewEmployee(String empNo, TextView
resultTextView) {
// Execute SELECT query
Cursor cursor = [Link]("SELECT * FROM EMPLOYEE
WHERE EmpNo = " + empNo, null);
if ([Link]()) {
// Display record details
Page | 9
[Link]("Emp. No: " +
[Link](0) +
"\nName: " + [Link](1) +
"\nBasic Salary: $" +
[Link](2));
} else {
// Display a message if no record found
showToast("Record not found!");
[Link]("");
}
[Link]();
}
private void calculateGrossSalary(String empNo, TextView
resultTextView) {
// Execute SELECT query to get basic salary
Cursor cursor = [Link]("SELECT BasicSalary FROM
EMPLOYEE WHERE EmpNo = " + empNo, null);
if ([Link]()) {
// Calculate gross salary (for example, add 20%)
double basicSalary = [Link](0);
double grossSalary = basicSalary + (basicSalary *
0.2);
[Link]("Gross Salary: $" +
grossSalary);
} else {
// Display a message if no record found
showToast("Record not found!");
[Link]("");
}
[Link]();
}
private void showToast(String message) {
[Link](this, message,
Toast.LENGTH_SHORT).show();
}
@Override
protected void onDestroy() {
[Link]();
// Close the database when the activity is destroyed
if (db != null && [Link]()) {
[Link]();
}
}
}
Page | 10
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
tools:context=".MainActivity">
<!-- Employee Number Input -->
<EditText
android:id="@+id/editTextEmpNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Employee Number"/>
<!-- Name Input -->
<EditText
android:id="@+id/editTextName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Name"/>
<!-- Basic Salary Input -->
<EditText
android:id="@+id/editTextSalary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="Basic Salary"/>
<!-- Buttons for Database Operations -->
<Button
android:id="@+id/buttonAdd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Add"/>
<Button
android:id="@+id/buttonDelete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Delete"/>
<Button
android:id="@+id/buttonView"
android:layout_width="match_parent"
Page | 11
android:layout_height="wrap_content"
android:text="View"/>
<Button
android:id="@+id/buttonCalculate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Calculate Gross Salary"/>
<!-- Display Area -->
<TextView
android:id="@+id/textViewResult"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textColor="#000000"
android:textSize="18sp"/>
</LinearLayout>
Page | 12
Write an Android app to give Notification Course Registration form for
multiple student registration using Fragments
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class ConfirmationFragment extends Fragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle
savedInstanceState) {
return
[Link]([Link].fragment_confirmation, container,
false);
}
}
[Link]
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity implements
[Link] {
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
getSupportFragmentManager().beginTransaction()
.add([Link], new
RegistrationFragment())
.commit();
}
@Override
public void onSubmit() {
getSupportFragmentManager().beginTransaction()
.replace([Link], new
ConfirmationFragment())
.addToBackStack(null)
.commit();
}
}
Page | 13
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class RegistrationFragment extends Fragment {
private OnSubmitListener mListener;
public interface OnSubmitListener {
void onSubmit();
}
@Override
public void onAttach(@NonNull Context context) {
[Link](context);
try {
mListener = (OnSubmitListener) context;
} catch (ClassCastException e) {
throw new ClassCastException([Link]() +
" must implement OnSubmitListener");
}
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle
savedInstanceState) {
View view =
[Link]([Link].fragment_registration, container,
false);
Button submitButton =
[Link]([Link].submit_button);
[Link](new
[Link]() {
@Override
public void onClick(View v) {
[Link]();
}
});
return view;
}
}
Page | 14
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="[Link]
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
fragment_confirmation.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Registration Successful!"
android:textSize="20sp" />
</RelativeLayout>
fragment_registration.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:id="@+id/textViewname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="Name:"
android:textSize="18sp" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/textViewname"
android:layout_marginBottom="16dp"
android:hint="Enter your name" />
Page | 15
<TextView
android:id="@+id/textViewDep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/editText1"
android:layout_marginBottom="8dp"
android:text="Department"
android:textSize="18sp" />
<EditText
android:id="@+id/editTextdep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/textViewDep"
android:layout_marginBottom="16dp"
android:hint="Enter your department name" />
<TextView
android:id="@+id/textViewCourse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/editTextdep"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:text="Select Course"
android:textSize="18sp" />
<CheckBox
android:id="@+id/check_btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textViewCourse"
android:text="Python" />
<CheckBox
android:id="@+id/check_btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/check_btn1"
android:text="Java" />
<CheckBox
android:id="@+id/check_btn3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/check_btn2"
android:text="Kotlin" />
<Button
android:id="@+id/submit_button"
android:layout_width="wrap_content"
Page | 16
android:layout_height="wrap_content"
android:layout_below="@id/check_btn3"
android:layout_centerInParent="true"
android:layout_marginTop="24dp"
android:baselineAligned="false"
android:text="Register" />
</RelativeLayout>
Page | 17
Write an Android app to pass information in bundles and reply the result
back to the same page
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
EditText editText;
Button sendButton;
TextView resultTextView;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
editText = findViewById([Link].edit_text);
sendButton = findViewById([Link].send_button);
resultTextView = findViewById([Link].result_text_view);
[Link](new
[Link]() {
@Override
public void onClick(View v) {
String inputText =
[Link]().toString();
Intent intent = new Intent([Link],
[Link]);
[Link]("inputText", inputText);
startActivityForResult(intent, 1);
}
});
}
@Override
protected void onActivityResult(int requestCode, int
resultCode, Intent data) {
[Link](requestCode, resultCode, data);
if (requestCode == 1) {
if (resultCode == RESULT_OK) {
String result = [Link]("result");
[Link]("Result: " + result);
}
}
}
}
Page | 18
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity2 extends AppCompatActivity {
EditText editText;
Button replyButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main2);
editText = findViewById([Link].edit_text);
replyButton = findViewById([Link].reply_button);
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
String inputText = [Link]("inputText");
[Link](inputText);
}
[Link](new
[Link]() {
@Override
public void onClick(View v) {
String resultText =
[Link]().toString();
Intent intent = new Intent();
[Link]("result", resultText);
setResult(RESULT_OK, intent);
finish();
}
});
}
}
Page | 19
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter text" />
<Button
android:id="@+id/send_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/edit_text"
android:text="Send" />
<TextView
android:id="@+id/result_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/send_button"
android:layout_marginTop="20dp"
android:text="" />
</RelativeLayout>
Page | 20
activity_main2.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity2">
<EditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter reply" />
<Button
android:id="@+id/reply_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/edit_text"
android:text="Reply" />
</RelativeLayout>
Page | 21
Illustrate the DatePickerDialog application
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!--on below line we are creating a text view-->
<TextView
android:id="@+id/idTVSelectedDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/idBtnPickDate"
android:layout_centerInParent="true"
android:layout_margin="20dp"
android:gravity="center"
android:padding="10dp"
android:text="Date"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold" />
<!--on below line we are creating
a button for date picker-->
<Button
android:id="@+id/idBtnPickDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="20dp"
android:text="Set Date"
android:textAllCaps="false" />
</RelativeLayout>
Page | 22
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
private Button pickDateBtn;
private TextView selectedDateTV;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
pickDateBtn = findViewById([Link]);
selectedDateTV = findViewById([Link]);
[Link](new
[Link]() {
@Override
public void onClick(View v) {
final Calendar c = [Link]();
int year = [Link]([Link]);
int month = [Link]([Link]);
int day = [Link](Calendar.DAY_OF_MONTH);
DatePickerDialog datePickerDialog = new
DatePickerDialog([Link],
new
[Link]() {
@Override
public void onDateSet(DatePicker
view, int year, int monthOfYear, int dayOfMonth) {
[Link](dayOfMonth + "-" + (monthOfYear + 1) +
"-" + year);
}
}, year, month, day);
[Link]();
}
}); }
}
Page | 23
Illustrate the TimePickerDialog application
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:id="@+id/idTVSelectedTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/idBtnPickTime"
android:layout_centerInParent="true"
android:layout_margin="20dp"
android:gravity="center"
android:padding="10dp"
android:text="Time Picker"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold" />
<Button
android:id="@+id/idBtnPickTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="20dp"
android:text="Save"
android:textAllCaps="false" />
</RelativeLayout>
[Link]
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends AppCompatActivity {
private Button pickTimeBtn;
Page | 24
private TextView selectedTimeTV;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_main);
// on below line we are initializing our variables.
pickTimeBtn = findViewById([Link]);
selectedTimeTV = findViewById([Link]);
// on below line we are adding click listener for our
pick date button
[Link](new
[Link]() {
@Override
public void onClick(View v) {
// on below line we are getting the instance
of our calendar.
final Calendar c = [Link]();
// on below line we are getting our hour,
minute.
int hour = [Link](Calendar.HOUR_OF_DAY);
int minute = [Link]([Link]);
// on below line we are initializing our Time
Picker Dialog
TimePickerDialog timePickerDialog = new
TimePickerDialog([Link],
new
[Link]() {
@Override
public void onTimeSet(TimePicker
view, int hourOfDay,
int minute)
{
// on below line we are
setting selected time in our text view.
[Link](hourOfDay + ":" + minute);
}
}, hour, minute, false);
// at last we are calling show to display our
time picker dialog.
[Link]();
}
});
}
}
Page | 25