You are on page 1of 11

INTRODUCTION

Android is an open source software package that was developed primarily to


improve the mobile user experience and has now become the best-selling operating system
for mobile devices. Android is now a part of Google and the Open Handset Alliance, and the
current version of the Android operating system is Oreo (version 8.0), which was released in
August 2017.Android Studio is the official integrated development environment (IDE).
for Google's Android operating system, built on JetBrains' IntelliJ IDEA software and
designed specifically for Android development. It is available for download on Windows,
macOS and Linux based operating systems or as a subscription-based service in 2020. It is a
replacement for the Eclipse Android Development Tools (E-ADT) as the primary IDE for
native Android application development. Android Studio was announced on May 16, 2013,
at the Google I/O conference. It was in early access preview stage starting from version 0.1
in May 2013, then entered beta stage starting from version 0.8 which was released in June
2014. The first stable build was released in December 2014, starting from version 1.0

The Calendar Provider is a repository for a user's calendar events. The Calendar
Provider API allows you to perform query, insert, update, and delete operations on
calendars, events, attendees, reminders, and so on. The Calendar Provider API can be used
by applications and sync adapters. The rules vary depending on what type of program is
making the calls. This document focuses primarily on using the Calendar Provider API as an
application. It is read or write calendar data, an application's manifest must include the
proper permissions, described in User Permissions. To make performing common
operations easier, the Calendar Provider offers a set of intents, as described in Calendar
Intents. These intents take users to the Calendar application to insert, view, and edit events.
The user interacts with the Calendar application and then returns to the original application.
Thus your application doesn't need to request permissions, nor does it need to provide a
user interface to view or create events.
COURSE OUTCOMES :

a) Interprete features of Android operating system.


b) Configure Android environment and development tools.
c) Develop rich user Interfaces by using layouts and controls.
d) Use User Interface components for android application development.
e) Create Android application using s.
f) Publish Android applications.
LITERATURE REVIEWS :

https://www.w3schools.in/android-tutorial/intro/#

In this website we learned all about introduction of mobile application


development. and how to develop a various types of application. Also learned about
how develop program in android studio.

https://developer.android.com/guide/topics/providers/calendar-provider

In this Website we learn about introduction of calendar application.


And their methods with examples in detail. And we have studied about events
attributes, classes and methods of application. In this link we learned about how a
develop a calendar application in android studio.
METHODOLOGY :

CalendarView:

This class is a calendar widget for displaying and selecting dates. The range of
dates supported by this calendar is configurable. It also provides the selection of the
current date and displaying the date.

• Interface:
CalendarView.OnDateChangeListener
The callback used to indicate the user changes the date.
• Syntax:
<CalendarView>
//code
</CalenderView>
• Attributes of CalendarView:
1. android:dateTextAppearance :-The text appearance for the day numbers in
the calendar grid.
2. android:firstDayOfWeek :-Defines first day of the calendar.
3.android:alpha :-Sets alpha to the view.
4. android:background :-Sets drawable to the background.
5. android:backgroundTint :-Sets tint to apply to the background.
6. android:clickable :-Specifies whether the view is clickable or not.
7. android:elevation :-Sets elevation of the view.
8. android:focusable :-Specifies whether this view can take focus or not.
9. android:id :-Specifies id of the view.
10. android:visibility :-Specifies the visibility(VISIBLE, INVISIBLE, GONE) of the
view.

TextView:
TextView displays text to the user and optionally allows them to edit it
programmatically. TextView Size of Plain, Large, Medium, and Small Text.
TextView is a complete text editor, however basic class is configured to not allow
editing but we can edit it. It is based on the layout size, style, and color etc.
• Interface
TextView.OnEditorActionListener

Interface definition for a callback to be invoked when an action is


performed on the editor.

• Class

TextView.SavedState

• Syntax:

<TextView>

//code

</TextView>

• Attributes of TextView :
1. id: id is an attribute used to uniquely identify a text view. Below is the
example code in which we set the id of a text view.
2. gravity: The gravity attribute is an optional attribute which is used to
control the alignment of the text.
3. text: text attribute is used to set the text in a text view.
4. textColor: textColor attribute is used to set the text color of a text view.
5. textSize: textSize attribute is used to set the size of text of a text view.
6. textStyle: textStyle attribute is used to set the text style of a text view.
7. background: background attribute is used to set the background of a text
view.
8. padding: padding attribute is used to set the padding from left, right, top
or bottom.
9.alpha: It has a value between 0(entirely transparent) and 1
(completely Opaque)
10.auto: link Controls the links such as urls and email address are
automatically found and converted to clickable links.

• TextView code in JAVA:

TextView textView = (TextView) findViewById(R.id.textView);


textView.setText("CALENDER"); //set text for text view
SOURCE CODE :

XML CODE:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background2"
tools:context=".MainActivity"
tools:ignore="DuplicateIds">

<CalendarView

android:id="@+id/Cv"
android:layout_width="393dp"
android:layout_height="352dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.498" />

<TextView

android:id="@+id/Tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/Cv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.636"
tools:ignore="UnknownId" />

</android.support.constraint.ConstraintLayout>
JAVA CODE:

package com.example.calender;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.CalendarView;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

CalendarView Cv;
TextView Tv;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Cv= findViewById(R.id.Cv);
Tv= findViewById(R.id.Tv);

Cv.setOnDateChangeListener((calendarView, i, i1, i2) -> {


String Date = i2+"/"+(i1+1)+"/"+i;
Tv.setText(Date);

});
}

}
OUTPUT :
FUTURE SCOPE :

Calendars are useful tools for keeping track of upcoming meetings, deadlines, and
milestones. They can help you visualize your schedule and remind you of important events,
such as holidays and vacation time.

It’s no wonder that people often have a variety of calendar tools to choose from,
including everything from a paper calendar on their office wall to a calendar management
tool. The project will be useful for all peoples.

The problem is that people too often manage multiple calendars at once. When
these calendars aren’t integrated with your work and synchronized with each other, this can
lead to mass confusion, headaches, and missed deadlines.
CONCLUSION :

In this project we have studied about How to create Calendar in android studio. In this
project develop we have to use <CalendarView> tag for creating calendar and then we
create <TextView > tag for display current date. The Calendar Provider is a repository for a
user's calendar events. We use calendar in our everyday life. This calendar helps us known
as dates of any month or year.
REFERENCE :

https://www.w3schools.in/android-tutorial/intro/#

https://developer.android.com/guide/topics/providers/calendar-provider

https://developer.android.com/reference/android/widget/Button

You might also like