Sakshi Hon
Sakshi Hon
PROJECT REPORT
ON
“Calendar”
1
SANJIVANI K. B. P. POLYTECHNIC, KOPARGAON
CERTIFICATE
“Calendar”
Submitted By-
Miss. Hon Sakshi Santosh (33)
Is a Bonafide work carried out Mr. Bhavesh Vijay Bhatkudav under the supervision of Prof.
V.G.Lachake and it is submitted towards the partialfulfillment of the requirement of
MSBTE, Mumbai for the award of Diploma in Computer Technology
2
Problem Statement:
Develop a mobile calendar application using Android Studio that allows users to view
and select dates from a calendar view. Upon selecting a date, display a toast message
showing the selected date in the format "Day/Month/Year." Additionally, ensure that the
application's UI is intuitive and responsive, providing a seamless experience for users
interacting with the calendar view.
Hardware Requirements
RAM- 16 GB
Processor – Intel Core i5 or higher
Disk space – Minimum 4GB
Software Requirements
Operating system – Windows 10
Android Studio
3
CODE:
activity_main.xml
<CalendarView
android:id="@+id/calendarView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
MainActivity.java:
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.CalendarView;
import android.widget.Toast;
CalendarView calendarView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
calendarView = findViewById(R.id.calendarView);
4
calendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener()
{
@Override
public void onSelectedDayChange(CalendarView view, int year, int month, int
dayOfMonth) {
String date = dayOfMonth + "/" + (month + 1) + "/" + year;
Toast.makeText(MainActivity.this, "Selected Date: " + date,
Toast.LENGTH_SHORT).show();
}
});
}
}
5
Output:
6
Conclusion:
Reference
www.google.com
www.javtpoint.com