0% found this document useful (0 votes)
136 views46 pages

Divyesh Patel - Practical-10 - MAD

1. The document describes enhancements to be made to a mobile application created in Practical-9, including copying the application to a new folder called Practical-10, adding a splash screen with animated logo, adding frame-by-frame animations to elements, and adding animated photos. 2. It provides details on the specific enhancements requested, such as adding an animated logo to the splash screen and animated images to the dashboard and notes activities. 3. The document is submitted by Divyesh Patel with their enrollment number for their Practical-10 assignment in mobile application development.

Uploaded by

DIVYESH PATEL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views46 pages

Divyesh Patel - Practical-10 - MAD

1. The document describes enhancements to be made to a mobile application created in Practical-9, including copying the application to a new folder called Practical-10, adding a splash screen with animated logo, adding frame-by-frame animations to elements, and adding animated photos. 2. It provides details on the specific enhancements requested, such as adding an animated logo to the splash screen and animated images to the dashboard and notes activities. 3. The document is submitted by Divyesh Patel with their enrollment number for their Practical-10 assignment in mobile application development.

Uploaded by

DIVYESH PATEL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

[ 2CEIT509 MOBILE APPLICATION DEVELOPMENT]

Practical: 10

AIM- Enhance an application which is already created in practical-9 by implementing


following
features:
1. Copy practical-9 into different folder with name of practical-10 & change name of
application also.
2. Add Splash Screen in which Ganpat University logo should be displayed.
3. This logo should be change by using frame by frame animation & twin animation as shown
in video. (you can find logo here)
4. In dashboard Activity, add frame by frame animation in card view as shown in video. There
are one heart shape animated image have been added in application.
5. In notes activity you can find frame by frame animated photos.
6. Refer following videos & images to build this practical.

Submitted By: Divyesh Patel


Enrollment number: 19012011111

Department of Computer
Engineering/Information Technology
Practical: 10

Practical-10

Enhance an application which is already created in practical-9 by


implementing following
features:
1. Copy practical-9 into different folder with name of practical-10 & change
name of application also.
2. Add Splash Screen in which Ganpat University logo should be displayed.
3. This logo should be change by using frame by frame animation & twin
animation as shown in video. (you can find logo here)
4. In dashboard Activity, add frame by frame animation in card view as
shown in video. There are one heart shape animated image have been added
in application.
5. In notes activity you can find frame by frame animated photos.
6. Refer following videos & images to build this practical.

AlarmBroadcastReceiver.kt
package com.example.a19012011111_prac10

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.media.MediaPlayer

class AlarmBroadcastReceiver : BroadcastReceiver() {

var mp: MediaPlayer? = null

override fun onReceive(context: Context, intent: Intent) {


// This method is called when the BroadcastReceiver is receiving an Intent
broadcast.

if(intent != null)
Divyesh Patel 19012011111
Practical: 10
{
mp = MediaPlayer.create(context, R.raw.alarm);
mp?.start()
}

}
}

List_BaseAdapter.kt
package com.example.a19012011013_prac10

import android.app.Dialog
import android.content.Context
import android.os.Build
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.*
import androidx.annotation.RequiresApi
import com.google.android.material.switchmaterial.SwitchMaterial
import com.google.android.material.textfield.TextInputEditText
import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList

class List_BaseAdapter (var context: Context, var noteList: ArrayList<Notes>) :


BaseAdapter() {
override fun getCount(): Int {
return noteList.size
}

override fun getItem(position: Int): Any {


return noteList[position]
}

override fun getItemId(position: Int): Long {


return position.toLong()
}

@RequiresApi(Build.VERSION_CODES.M)
override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {

val view = LayoutInflater.from(context).inflate(R.layout.list_item, parent,


false)

val noteTitle = view.findViewById<TextView>(R.id.note_title)


val noteSubTitle = view.findViewById<TextView>(R.id.note_sub_title)
val noteDescription = view.findViewById<TextView>(R.id.note_content)
val noteTimeStamp = view.findViewById<TextView>(R.id.note_time_stamp)
val timeFormat = SimpleDateFormat("MMM, dd yyyy hh:mm:ss a", Locale.ENGLISH)
val time = timeFormat.format(noteList[position].timeStamp)

noteTitle.text = noteList[position].title
noteSubTitle.text = noteList[position].subTitle
noteDescription.text = noteList[position].description

Divyesh Patel 19012011111


Practical: 10
noteTimeStamp.text = time

val ivEditNote = view.findViewById<Button>(R.id.edit_note)


val ivDeleteNote = view.findViewById<Button>(R.id.delete_note)

ivEditNote.setOnClickListener {
val dialog = Dialog(context)
dialog.setContentView(R.layout.add_notes_dialog)
val tvTitle = dialog.findViewById<TextView>(R.id.tv_dialog_title)
val timePicker = dialog.findViewById<TimePicker>(R.id.time_picker)
val reminderSwitch =
dialog.findViewById<SwitchMaterial>(R.id.switch_reminder)
val etNoteTitle =
dialog.findViewById<TextInputEditText>(R.id.et_note_title)
val etNoteSubTitle =
dialog.findViewById<TextInputEditText>(R.id.et_note_sub_title)
val etNoteDescription =
dialog.findViewById<TextInputEditText>(R.id.et_note_description)
val btnOk = dialog.findViewById<TextView>(R.id.btn_ok)

tvTitle.text = "Edit Note"


etNoteTitle.setText(noteList[position].title)
etNoteSubTitle.setText(noteList[position].subTitle)
etNoteDescription.setText(noteList[position].description)
reminderSwitch.isChecked = noteList[position].isReminder
timePicker.hour = noteList[position].modifiedTime.get(Calendar.HOUR_OF_DAY)
timePicker.minute = noteList[position].modifiedTime.get(Calendar.MINUTE)

val cal = Calendar.getInstance()


val year = cal.get(Calendar.YEAR)
val month = cal.get(Calendar.MONTH)
val date = cal.get(Calendar.DATE)

btnOk.setOnClickListener {
if (etNoteTitle.text.toString().isEmpty() or
etNoteSubTitle.text.toString()
.isEmpty() or etNoteDescription.text.toString().isEmpty()
) {
Toast.makeText(
context,
"Please enter all fields\nAll fields are required",
Toast.LENGTH_SHORT
).show()
}
else{
cal.set(year, month, date, timePicker.hour, timePicker.minute, 0)
noteList[position].title = etNoteTitle.text.toString().trim()
noteList[position].subTitle = etNoteSubTitle.text.toString().trim()
noteList[position].description =
etNoteDescription.text.toString().trim()
noteList[position].modifiedTime = cal
noteList[position].isReminder = reminderSwitch.isChecked
Notes.setReminder(context, noteList[position])
notifyDataSetChanged()
dialog.dismiss()
}
}
dialog.show()

Divyesh Patel 19012011111


Practical: 10
}
ivDeleteNote.setOnClickListener {
noteList[position].isReminder = false
Notes.setReminder(context, noteList[position])
noteList.removeAt(position)
notifyDataSetChanged()
}

return view
}
}

Login.kt

package com.example.a19012011111_prac10

class Login {
companion object{

var fullname=""
var phone=""
var email=""
var city=""
var password=""
var confirm_pass=""

}
}

MainActivity.kt
package com.example.a19012011111_prac10

import android.content.Intent
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.view.View
import android.view.WindowManager
import android.widget.Button
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.example.a19012011013_prac10.Login.Companion.email
import com.example.a19012011013_prac10.Login.Companion.password
import com.google.android.material.textfield.TextInputEditText

class MainActivity : AppCompatActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
supportActionBar?.hide()
setStatusBarTransparent()

val login_button = findViewById<Button>(R.id.loginbtn)


val signup_text = findViewById<TextView>(R.id.signuptxt)
Divyesh Patel 19012011111
Practical: 10
val email_login = findViewById<TextInputEditText>(R.id.Email_login)
val password_login = findViewById<TextInputEditText>(R.id.Pass_login)

signup_text.setOnClickListener {
Intent(this, MainActivity2s::class.java).apply {startActivity(this)
}
}
login_button.setOnClickListener {

var email_input = email_login.text.toString()


var password_input = password_login.text.toString()

if (email_input == email && password_input == password.toString()) {


Intent(this, MainActivity2d::class.java).apply {
startActivity(this)
}
} else {
Toast.makeText(applicationContext,"Enter valid email or
password",Toast.LENGTH_LONG).show()
}

}
}

private fun setStatusBarTransparent() {


if (Build.VERSION.SDK_INT in 19..20){
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true)
}
}
if (Build.VERSION.SDK_INT >= 19) {
window.decorView.systemUiVisibility= View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}

if (Build.VERSION.SDK_INT >= 21) {


setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false)
window.statusBarColor = Color.TRANSPARENT
}
}

private fun setWindowFlag(bits: Int, on: Boolean) {


val winParameters = window.attributes
if (on) {
winParameters.flags = winParameters.flags or bits
} else {
winParameters.flags = winParameters.flags and bits.inv()
}
window.attributes = winParameters
}

MainActivity2d.kt

Divyesh Patel 19012011111


Practical: 10
package com.example.a19012011111_prac10 z

import android.app.AlarmManager
import android.app.PendingIntent
import android.app.TimePickerDialog
import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.AnimationDrawable
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextClock
import android.widget.TextView
import android.widget.Toast
import com.example.a19012011111_prac10.Login.Companion.city
import com.example.a19012011111_prac10.Login.Companion.email
import com.example.a19012011111_prac10.Login.Companion.fullname
import com.example.a19012011111_prac10.Login.Companion.phone
import com.example.a19012011111_prac10.NotesActivity
import com.google.android.material.bottomnavigation.BottomNavigationView
import java.text.SimpleDateFormat
import java.util.*

class MainActivity2d : AppCompatActivity() {


lateinit var set_alarm:TextView
lateinit var guni: AnimationDrawable
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main_activity2d)
getSupportActionBar()?.hide()
setStatusBarTransparent()
set_alarm=findViewById(R.id.setalarm)

var bottomnavview =
findViewById<BottomNavigationView>(R.id.bottomNavigationView)
//bottomnavview.selectedItemId = R.id.bottomNavigationView
bottomnavview.selectedItemId=R.id.bottomNavigationView

bottomnavview.setOnItemSelectedListener {
when (it.itemId) {
R.id.notes -> {
Intent(this, NotesActivity::class.java).apply {
startActivity(this)
}
return@setOnItemSelectedListener true
}
else -> {
Intent(this, MainActivity2d::class.java).apply {
startActivity(this)
}

Divyesh Patel 19012011111


Practical: 10
return@setOnItemSelectedListener true

}
}
}

val imgview=findViewById<ImageView>(R.id.imagebyimage)
imgview.setBackgroundResource(R.drawable.image_animation)
guni = imgview.background as AnimationDrawable
guni.start()

val img1view=findViewById<ImageView>(R.id.vectorphoto)
img1view.setBackgroundResource(R.drawable.heart)
guni = img1view.background as AnimationDrawable
guni.start()

val fullname_dashboard=findViewById<TextView>(R.id.name_dashboard1)
val phone_dashboard=findViewById<TextView>(R.id.phone_dashboard1)
val city_dashboard=findViewById<TextView>(R.id.city_dashboard1)
val email_dashboard=findViewById<TextView>(R.id.email_dashboard1)
val email_dashboard_main=findViewById<TextView>(R.id.email_dashboard_main1)
val name_dashboard_main=findViewById<TextView>(R.id.name_dashboard_main1)

val tclock=findViewById<TextClock>(R.id.textclock)

tclock.format24Hour=null
tclock.format12Hour="hh:mm:ss a MMM,dd yyyy"

name_dashboard_main.setText(fullname)
email_dashboard_main.setText(email)
fullname_dashboard.setText(fullname)
phone_dashboard.setText(phone)
city_dashboard.setText(city)
email_dashboard.setText(email)

set_alarm.setOnClickListener {
showTimerDialog()
}

fun showTimerDialog()
{

Divyesh Patel 19012011111


Practical: 10
val cldr: Calendar = Calendar.getInstance()
val hour: Int = cldr.get(Calendar.HOUR_OF_DAY)
val minutes: Int = cldr.get(Calendar.MINUTE)
// time picker dialog
val picker = TimePickerDialog(
this,
{ tp, sHour, sMinute -> sendDialogDataToActivity(sHour, sMinute) },
hour,
minutes,
false
)
picker.show()
}

private fun sendDialogDataToActivity(hour: Int, minute: Int) {


val alarmCalendar = Calendar.getInstance()
val year: Int = alarmCalendar.get(Calendar.YEAR)
val month: Int = alarmCalendar.get(Calendar.MONTH)
val day: Int = alarmCalendar.get(Calendar.DATE)
alarmCalendar.set(year, month, day, hour, minute, 0)
set_alarm.text = SimpleDateFormat("hh:mm ss a").format(alarmCalendar.time)
setAlarm(alarmCalendar.timeInMillis, "Start")
Toast.makeText(
this,
"Time: hours:${hour}, minutes:${minute},
millis:${alarmCalendar.timeInMillis}",
Toast.LENGTH_SHORT
).show()
}

fun setAlarm(millisTime: Long, str: String)


{
val intent = Intent(this, AlarmBroadcastReceiver::class.java)
intent.putExtra("Service1", str)
val pendingIntent = PendingIntent.getBroadcast(applicationContext, 234324243,
intent, 0)
val alarmManager = getSystemService(ALARM_SERVICE) as AlarmManager
if(str == "Start") {
alarmManager.setExact(AlarmManager.RTC_WAKEUP, millisTime, pendingIntent)
}else if(str == "Stop")
{
alarmManager.cancel(pendingIntent)
}
}

private fun setStatusBarTransparent() {


if (Build.VERSION.SDK_INT in 19..20){
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true)
}
}
if (Build.VERSION.SDK_INT >= 19) {
window.decorView.systemUiVisibility= View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}

Divyesh Patel 19012011111


Practical: 10
if (Build.VERSION.SDK_INT >= 21) {
setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false)
window.statusBarColor = Color.TRANSPARENT
}
}

private fun setWindowFlag(bits: Int, on: Boolean){


val winParameters=window.attributes
if(on) {
winParameters.flags = winParameters.flags or bits
}else{
winParameters.flags=winParameters.flags and bits.inv()
}
window.attributes=winParameters
}
}

MainActivity2s.kt
package com.example.a19012011111_prac10

import android.content.Intent
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.view.View
import android.view.WindowManager
import android.widget.Button
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.example.a19012011111_prac10.Login.Companion.city
import com.example.a19012011111_prac10.Login.Companion.confirm_pass
import com.example.a19012011111_prac10.Login.Companion.email
import com.example.a19012011111_prac10.Login.Companion.fullname
import com.example.a19012011111_prac10.Login.Companion.password
import com.example.a19012011111_prac10.Login.Companion.phone
import com.google.android.material.textfield.TextInputEditText
import kotlin.math.sign

class MainActivity2s : AppCompatActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main_activity2s)
setStatusBarTransparent()
supportActionBar?.hide()

val signUp=findViewById<Button>(R.id.signupbtn)

val fullname_signup=findViewById<TextInputEditText>(R.id.Name_signup)
val phone_signup=findViewById<TextInputEditText>(R.id.Phone_signup)
val email_signup=findViewById<TextInputEditText>(R.id.Email_signup)
val city_signup=findViewById<TextInputEditText>(R.id.City_signup)
val password_signup=findViewById<TextInputEditText>(R.id.Passw_signup)
val confirm_pass_signup=findViewById<TextInputEditText>(R.id.CnPass_signup)

signUp.setOnClickListener {

Divyesh Patel 19012011111


Practical: 10

fullname = fullname_signup.text.toString()
phone = phone_signup.text.toString()
email = email_signup.text.toString()
city = city_signup.text.toString()
password = password_signup.text.toString()
confirm_pass = confirm_pass_signup.text.toString()

if (password == confirm_pass) {
Intent(this, MainActivity::class.java).apply {
startActivity(this)
}
} else {
Toast.makeText(applicationContext,"Password and Confirm Password
doesn't match",Toast.LENGTH_LONG).show()
}

}
}

private fun setStatusBarTransparent() {


if (Build.VERSION.SDK_INT in 19..20){
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true)
}
}
if (Build.VERSION.SDK_INT >= 19) {
window.decorView.systemUiVisibility= View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}

if (Build.VERSION.SDK_INT >= 21) {


setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false)
window.statusBarColor = Color.TRANSPARENT
}
}

private fun setWindowFlag(bits: Int, on: Boolean) {


val winParameters = window.attributes
if (on) {
winParameters.flags = winParameters.flags or bits
} else {
winParameters.flags = winParameters.flags and bits.inv()
}
window.attributes = winParameters
}

NoteInfoActivity.kt

package com.example.a19012011111_prac10

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
Divyesh Patel 19012011111
Practical: 10
import android.os.Bundle
import android.widget.TextView
import java.text.SimpleDateFormat
import java.util.*

class NoteInfoActivity : AppCompatActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.note_info)

val tvNoteTitle = findViewById<TextView>(R.id.tv_note_title)


val tvNoteSubTitle = findViewById<TextView>(R.id.tv_note_sub_title)
val tvNoteDescription = findViewById<TextView>(R.id.tv_note_description)

val tvNoteTimeStamp = findViewById<TextView>(R.id.tv_note_time_stamp)


val tvNoteReminderTime = findViewById<TextView>(R.id.tv_notes_reminder_time)

val index = intent.getIntExtra("index", 0)

tvNoteTitle.text = Notes.notesArray[index].title
tvNoteSubTitle.text = Notes.notesArray[index].subTitle
tvNoteDescription.text = Notes.notesArray[index].description
val timeFormat = SimpleDateFormat("MMM, dd yyyy hh:mm:ss a", Locale.ENGLISH)
tvNoteTimeStamp.text = timeFormat.format(Notes.notesArray[index].timeStamp)
val time =
"Reminder at " +
timeFormat.format(Notes.notesArray[index].modifiedTime.timeInMillis)
tvNoteReminderTime.text = time
}

override fun onBackPressed() {


Intent(this, NotesActivity::class.java).apply {
startActivity(this)
}
super.onBackPressed()
}
}

Notes.kt

package com.example.a19012011111_prac10

import android.app.AlarmManager
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import java.util.*
import kotlin.collections.ArrayList

class Notes(
var title: String, var subTitle: String, var description: String, var modifiedTime:
Calendar,
var isReminder: Boolean = false
) {
Divyesh Patel 19012011111
Practical: 10
var timeStamp: Long = System.currentTimeMillis()
var id = noteIdGeneration()

companion object {
var idNote = 0
fun noteIdGeneration(): Int {
idNote++
return idNote
}

var notesArray: List<Notes> = ArrayList()

fun setReminder(context: Context, notes: Notes) {

val index = notesArray.indexOf(notes)


val intent = Intent(context, NotificationReceiver::class.java)
intent.putExtra("index", index)

val pendingIntent = PendingIntent.getBroadcast(


context,
index,
intent,
PendingIntent.FLAG_UPDATE_CURRENT
)

val alarmManager =
context.getSystemService(AppCompatActivity.ALARM_SERVICE) as
AlarmManager

if (notes.isReminder) {
alarmManager.setExact(
AlarmManager.RTC_WAKEUP,
notes.modifiedTime.timeInMillis,
pendingIntent
)
} else
alarmManager.cancel(pendingIntent)
}
}
}

NotesAcitvity.kt

package com.example.a19012011111_prac10

import android.app.Dialog
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.AnimationDrawable
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View

Divyesh Patel 19012011111


Practical: 10
import android.view.WindowManager
import android.widget.*
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.google.android.material.switchmaterial.SwitchMaterial
import com.google.android.material.textfield.TextInputEditText
import java.util.*
import kotlin.collections.ArrayList

class NotesActivity : AppCompatActivity() {

lateinit var guni:AnimationDrawable


override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)
setContentView(R.layout.notes)
createNotificationChannel()
supportActionBar?.hide()
setStatusBarTransparent()

val nothing=findViewById<ImageView>(R.id.imagebyimagenotes)
nothing.setBackgroundResource(R.drawable.image_animation)
guni = nothing.background as AnimationDrawable
guni.start()

val listItems = Notes.notesArray as ArrayList<Notes>

val adapter = List_BaseAdapter(this, listItems)


val lvNotes = findViewById<ListView>(R.id.listview)
lvNotes.adapter = adapter

val fabAddNote = findViewById<FloatingActionButton>(R.id.add_notes)


fabAddNote.setOnClickListener {
val dialog = Dialog(this)
dialog.setContentView(R.layout.add_notes_dialog)
val timePicker = dialog.findViewById<TimePicker>(R.id.time_picker)
val reminderSwitch =
dialog.findViewById<SwitchMaterial>(R.id.switch_reminder)
val noteTitle = dialog.findViewById<TextInputEditText>(R.id.et_note_title)
val noteSubTitle =
dialog.findViewById<TextInputEditText>(R.id.et_note_sub_title)
val noteDescription =
dialog.findViewById<TextInputEditText>(R.id.et_note_description)
val btnOk = dialog.findViewById<TextView>(R.id.btn_ok)

val cal = Calendar.getInstance()


val year = cal.get(Calendar.YEAR)
val month = cal.get(Calendar.MONTH)
val date = cal.get(Calendar.DATE)

btnOk.setOnClickListener {
if (noteTitle.text.toString().isEmpty() or noteSubTitle.text.toString()
.isEmpty() or noteDescription.text.toString().isEmpty()
) {
Toast.makeText(
this,
"Please enter all fields\nAll fields are required",

Divyesh Patel 19012011111


Practical: 10
Toast.LENGTH_SHORT
).show()
} else {
cal.set(year, month, date, timePicker. hour, timePicker.minute, 0)
val note = Notes(
noteTitle.text.toString().trim(),
noteSubTitle.text.toString().trim(),
noteDescription.text.toString().trim(),
cal,
reminderSwitch.isChecked
)
listItems.add(note)
Notes.setReminder(this, note)
adapter.notifyDataSetChanged()
dialog.dismiss()
}
}
dialog.show()
}

var bottomnavview =
findViewById<BottomNavigationView>(R.id.bottomNavigationView)
bottomnavview.setOnItemSelectedListener {
when (it.itemId) {
R.id.notes -> {
Intent(this, NotesActivity::class.java).apply {
startActivity(this)
}
return@setOnItemSelectedListener true
}
else -> {
Intent(this, MainActivity2d::class.java).apply {
startActivity(this)
}
return@setOnItemSelectedListener true

}
}
}
}

private fun createNotificationChannel() {


val notificationManager =
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {


val description = "Channel for sending notes notification"
val importance = NotificationManager.IMPORTANCE_HIGH
val channel = NotificationChannel(channelId, channelName, importance)
channel.description = description
channel.vibrationPattern = longArrayOf(0, 1000, 500, 1000)
channel.enableVibration(true)
notificationManager.createNotificationChannel(channel)
}
}
private fun setStatusBarTransparent() {
if (Build.VERSION.SDK_INT in 19..20){

Divyesh Patel 19012011111


Practical: 10
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true)
}
}
if (Build.VERSION.SDK_INT >= 19) {
window.decorView.systemUiVisibility= View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}

if (Build.VERSION.SDK_INT >= 21) {


setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false)
window.statusBarColor = Color.TRANSPARENT
}
}

private fun setWindowFlag(bits: Int, on: Boolean){


val winParameters=window.attributes
if(on) {
winParameters.flags = winParameters.flags or bits
}else{
winParameters.flags=winParameters.flags and bits.inv()
}
window.attributes=winParameters
}
}

const val channelId = "notesChannel"


const val channelName = "Notes Channel"

NotificationReceiver.kt

package com.example.a19012011111_prac10

import android.app.PendingIntent
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat

class NotificationReceiver : BroadcastReceiver() {


override fun onReceive(context: Context?, intent: Intent?) {

val index = intent?.getIntExtra("index", 0)


val intentOpenActivity = Intent(context, NoteInfoActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
putExtra("index", index)
}

val contentIntent = PendingIntent.getActivity(


context,
index!!,
intentOpenActivity,
PendingIntent.FLAG_UPDATE_CURRENT

Divyesh Patel 19012011111


Practical: 10
)

val builder = NotificationCompat.Builder(context!!, channelId)


.setSmallIcon(R.drawable.ic_launcher_foreground)
.setContentTitle(Notes.notesArray[index].title)
.setContentText(Notes.notesArray[index].description)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setCategory(NotificationCompat.CATEGORY_REMINDER)
.setContentIntent(contentIntent)
.setAutoCancel(true)
.setOnlyAlertOnce(true)

with(NotificationManagerCompat.from(context)) {
notify(index, builder.build())
}
}
}

Splash.kt

package com.example.19012011111_prac10

import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.AnimationDrawable
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Handler
import android.view.View
import android.view.WindowManager
import android.view.animation.Animation
import android.widget.ImageView
import android.widget.TextView

class splash : AppCompatActivity(), Animation.AnimationListener {

lateinit var guni:AnimationDrawable

override fun onCreate(savedInstanceState: Bundle?) {


super.onCreate(savedInstanceState)
setContentView(R.layout.activity_splash)
setStatusBarTransparent()
supportActionBar?.hide()

val imgview=findViewById<ImageView>(R.id.image)
imgview.setBackgroundResource(R.drawable.animation)
guni = imgview.background as AnimationDrawable
guni.start()

Handler().postDelayed({
val intent = Intent(this, MainActivity::class.java)
startActivity(intent)
finish()
}, 4000)
Divyesh Patel 19012011111
Practical: 10

override fun onAnimationStart(animation: Animation?) {


}

override fun onAnimationEnd(animation: Animation?) {

override fun onAnimationRepeat(animation: Animation?) {


TODO("Not yet implemented")
}

private fun setStatusBarTransparent() {


if (Build.VERSION.SDK_INT in 19..20){
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true)
}
}
if (Build.VERSION.SDK_INT >= 19) {
window.decorView.systemUiVisibility= View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}

if (Build.VERSION.SDK_INT >= 21) {


setWindowFlag(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false)
window.statusBarColor = Color.TRANSPARENT
}
}

private fun setWindowFlag(bits: Int, on: Boolean){


val winParameters=window.attributes
if(on) {
winParameters.flags = winParameters.flags or bits
}else{
winParameters.flags=winParameters.flags and bits.inv()
}
window.attributes=winParameters
}

Activity_main.xml

<?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
Divyesh Patel 19012011111
Practical: 10

<View
android:id="@+id/view2"
android:layout_width="179dp"
android:layout_height="472dp"
android:layout_marginTop="110dp"
android:background="@drawable/gradial"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/textView"
android:layout_width="125dp"
android:layout_height="57dp"
android:text="GUNI"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="#20559B"
android:textSize="48sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.035" />

<androidx.cardview.widget.CardView
android:id="@+id/cardView2"
android:layout_width="317dp"
android:layout_height="306dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="104dp"
android:layout_marginRight="10dp"
app:cardCornerRadius="25dp"
app:cardElevation="0.8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView">

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="17dp"
android:layout_marginRight="20dp"
android:hint="Email"

app:boxBackgroundColor="@color/white">

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:id="@+id/Email_login"
android:layout_height="match_parent"
android:inputType="textEmailAddress"
android:drawableRight="@drawable/ic_baseline_email_24" />

</com.google.android.material.textfield.TextInputLayout>

Divyesh Patel 19012011111


Practical: 10

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textpass"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="83dp"
android:layout_marginRight="20dp"
android:hint="Password"
app:boxBackgroundColor="@color/white"

>

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:id="@+id/Pass_login"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:drawableRight="@drawable/ic_baseline_vpn_key_24" />

</com.google.android.material.textfield.TextInputLayout>

<TextView
android:id="@+id/textView6"
android:layout_width="136dp"
android:layout_height="21dp"
android:layout_marginLeft="170dp"
android:layout_marginTop="160dp"
android:text="Forgot Password?"

android:textSize="16dp" />

<View
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginTop="218dp"
android:background="@drawable/ic_wave"
app:layout_constraintBottom_toBottomOf="parent"></View>

</androidx.cardview.widget.CardView>

<TextView
android:id="@+id/textView2"
android:layout_width="91dp"
android:layout_height="39dp"
android:layout_marginStart="52dp"
android:layout_marginTop="144dp"
android:text="Login"
android:textColor="@color/white"
android:textSize="25dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/textView3"
android:layout_width="91dp"
android:layout_height="39dp"
android:layout_marginTop="144dp"

Divyesh Patel 19012011111


Practical: 10
android:layout_marginEnd="48dp"
android:text="Sign Up"
android:textColor="#888888"
android:textSize="25dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/textView2"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:text="Don't have an account ?"
android:textSize="17dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.272"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/signuptxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="58dp"
android:layout_marginBottom="32dp"
android:text="SIGN UP"
android:textColor="#DF58A0"
android:textSize="19dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/textView7" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/loginbtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="392dp"
android:background="@drawable/buttongradial"
android:text="Login"
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />

</androidx.constraintlayout.widget.ConstraintLayout>

Activity_main_activity2d.xml

<?xml version="1.0" encoding="utf-8"?>

<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Divyesh Patel 19012011111
Practical: 10
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity2d">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="240dp"
android:background="@drawable/gradial3"
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.0">

<RatingBar
android:id="@+id/ratingid"
style="@style/Widget.AppCompat.RatingBar.Indicator"
android:layout_width="181dp"
android:layout_height="60dp"
android:isIndicator="false"
android:numStars="5"
android:paddingTop="15dp"
android:progressTint="#FAFAFA"
android:scrollbarSize="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView"
app:layout_constraintHorizontal_bias="0.37"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/email_dashboard_main1"
app:layout_constraintVertical_bias="0.19999999" />

<TextView
android:id="@+id/name_dashboard_main1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Divyesh Patel"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.18" />

<TextView
android:id="@+id/email_dashboard_main1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="[email protected]"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.143"

Divyesh Patel 19012011111


Practical: 10
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/name_dashboard_main1"
app:layout_constraintVertical_bias="0.117" />

<ImageView
android:id="@+id/imageView"
android:layout_width="105dp"
android:layout_height="102dp"
app:circularflow_angles="20dp"
app:circularflow_radiusInDP="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.862"
app:layout_constraintStart_toEndOf="@+id/email_dashboard_main1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.26"
app:srcCompat="@drawable/av" />

<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Logout"
android:textColor="#FF0000"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.876"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:layout_constraintVertical_bias="0.354" />

</androidx.constraintlayout.widget.ConstraintLayout>

<!-- <com.google.android.material.card.MaterialCardView-->
<!-- android:layout_width="340dp"-->
<!-- android:layout_height="150dp"-->
<!-- android:layout_marginTop="30dp"-->
<!-- android:translationZ="20dp"-->
<!-- app:cardCornerRadius="20dp"-->
<!-- app:cardElevation="30dp"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/materialCardView2"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/materialCardView2">-->

<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:text="Alarm"></TextView>-->

<!-- </com.google.android.material.card.MaterialCardView>-->

Divyesh Patel 19012011111


Practical: 10
<ImageView
android:id="@+id/imageView5"
android:layout_width="407dp"
android:layout_height="96dp"
android:layout_marginBottom="50dp"
android:src="@drawable/ic_wave"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintVertical_bias="1.0" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="540dp"
android:layout_marginTop="-110dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/constraintLayout"
app:layout_constraintVertical_bias="1.0">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.google.android.material.card.MaterialCardView
android:id="@+id/materialCardView2"
android:layout_width="340dp"
android:layout_height="260dp"
android:translationZ="20dp"
app:cardCornerRadius="15dp"
app:cardElevation="30dp"
android:layout_gravity="center">

<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:paddingTop="5dp"
android:paddingBottom="15dp"
android:text="Personal Information"
android:textColor="#000000"
android:textSize="21sp"
android:textStyle="bold" />

<ImageView
android:id="@+id/imageView4"
android:layout_width="27dp"
android:layout_height="27dp"
android:layout_marginLeft="300dp"
android:layout_marginTop="5dp"
android:paddingTop="5dp"
android:src="@drawable/ic_baseline_person_24" />

<TextView

Divyesh Patel 19012011111


Practical: 10
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="55dp"
android:text="Full Name"
android:textSize="15dp" />

<TextView
android:id="@+id/name_dashboard1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="75dp"
android:text="Divyesh Maheshbhai Patel"
android:textColor="@color/black"
android:textSize="16dp" />

<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="110dp"
android:text="Phone Number"
android:textSize="15dp" />

<TextView
android:id="@+id/phone_dashboard1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="135dp"
android:text="+91 1234567890"
android:textColor="@color/black"
android:textSize="16dp" />

<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="170dp"
android:text="Email Id"
android:textSize="15dp" />

<TextView
android:id="@+id/email_dashboard1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="195dp"
android:text="[email protected]"
android:textColor="@color/black"
android:textSize="16dp" />

<TextView
android:id="@+id/textView16"

Divyesh Patel 19012011111


Practical: 10
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="190dp"
android:layout_marginTop="110dp"
android:text="City"
android:textSize="15dp" />

<TextView
android:id="@+id/city_dashboard1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="190dp"
android:layout_marginTop="135dp"
android:text="Mahemdavad"
android:textColor="@color/black"
android:textSize="16dp" />
</com.google.android.material.card.MaterialCardView>

//card photo

<com.google.android.material.card.MaterialCardView
android:id="@+id/materialCardViewphoto"
android:layout_width="340dp"
android:layout_height="240dp"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:translationZ="20dp"
app:cardCornerRadius="15dp"
app:cardElevation="30dp">

<View
android:id="@+id/divider5"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="50dp"
android:background="?android:attr/listDivider" />

<ImageView
android:id="@+id/imagebyimage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"/>

<TextView
android:id="@+id/textViewphoto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:paddingTop="5dp"
android:paddingBottom="15dp"
android:text="Photos"
android:textColor="#000000"
android:textSize="25sp"
android:textStyle="bold" />

<ImageView
android:id="@+id/vectorphoto"

Divyesh Patel 19012011111


Practical: 10
android:layout_width="27dp"
android:layout_height="27dp"
android:layout_marginLeft="300dp"
android:layout_marginTop="5dp"
android:paddingTop="5dp" />

</com.google.android.material.card.MaterialCardView>

<com.google.android.material.card.MaterialCardView
android:layout_width="340dp"
android:layout_height="wrap_content"
app:cardElevation="30dp"
android:background="@color/white"
android:translationZ="20dp"
android:layout_marginTop="20dp"
app:cardCornerRadius="15dp"
android:layout_gravity="center_horizontal">

<TextView
android:id="@+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:paddingTop="5dp"
android:paddingBottom="15dp"
android:text="Set Alarm time"
android:textColor="#000000"
android:textSize="21sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="300dp"
android:layout_marginTop="10dp"
android:paddingTop="5dp"
android:src="@drawable/ic_baseline_alarm_add_24" />

<TextView
android:id="@+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="65dp"
android:paddingTop="5dp"
android:paddingBottom="15dp"
android:text="Current Date Time:"
android:textColor="#676767"
android:textSize="20sp" />
<TextClock
android:id="@+id/textclock"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="90dp"
android:paddingTop="5dp"

Divyesh Patel 19012011111


Practical: 10
android:paddingBottom="15dp"
android:textColor="#676767"
android:textSize="16sp" />

<TextView
android:id="@+id/textView23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="120dp"
android:paddingTop="5dp"
android:paddingBottom="15dp"
android:text="Alarm:"
android:textColor="#676767"
android:textSize="20sp" />

<TextView
android:id="@+id/setalarm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="145dp"
android:clickable="true"
android:focusable="true"
android:paddingTop="5dp"
android:paddingBottom="20dp"
android:text="Set Alarm"
android:textColor="#676767"
android:textSize="16sp" />

<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="50dp"
android:background="?android:attr/listDivider" />

<TextView
android:id="@+id/tvShowTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="140dp"
android:layout_marginLeft="120dp"
android:text="TextView" />

</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/card3"
android:layout_width="340dp"
android:layout_height="150dp"
android:layout_marginTop="30dp"
android:layout_gravity="center"
android:translationZ="20dp"
app:cardCornerRadius="20dp"
app:cardElevation="30dp"
app:layout_constraintBottom_toTopOf="@+id/imageView5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

Divyesh Patel 19012011111


Practical: 10
app:layout_constraintTop_toBottomOf="@+id/materialCardView2">

<TextView
android:id="@+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:text="Description"
android:textColor="@color/black"
android:textSize="20dp" />

<ImageView
android:id="@+id/imageView6"
android:layout_width="30dp"
android:layout_height="28dp"
android:layout_marginLeft="300dp"
android:layout_marginTop="5dp"
android:src="@drawable/ic_baseline_description_24" />

<TextView
android:id="@+id/textView19"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="50dp"
android:layout_marginRight="15dp"
android:text="The iconfont folder contains pre-generated font files
that can be included in a project. This is especially convenient for the web;
however,it is generally better to link to the web font hosted on Google Fonts," />

</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</ScrollView>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="406dp"
android:layout_height="55dp"
android:background="@color/white"
app:itemIconTint="@color/black"
app:itemTextColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.4"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/bottomnav" />

</androidx.constraintlayout.widget.ConstraintLayout>

Activity_main_activity2s.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Divyesh Patel 19012011111
Practical: 10
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<View
android:layout_width="235dp"
android:layout_height="589dp"
android:layout_marginTop="100dp"
android:background="@drawable/gradle2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView">

</View>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/signupbtn"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginTop="556dp"
android:background="@drawable/buttongradial"
android:text="SignUP"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView">

</androidx.appcompat.widget.AppCompatButton>

<TextView
android:id="@+id/textView"
android:layout_width="125dp"
android:layout_height="57dp"
android:layout_marginBottom="35dp"
android:text="GUNI"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="#20559B"
android:textSize="48sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/textView3"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.041" />

<TextView
android:id="@+id/textView2"
android:layout_width="101dp"
android:layout_height="45dp"
android:layout_marginStart="16dp"
android:layout_marginTop="128dp"
android:textColor="#888888"
android:text="Login"
android:textSize="35dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Divyesh Patel 19012011111


Practical: 10
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="124dp"
android:layout_marginEnd="20dp"
android:text="Sign Up"
android:textColor="#888888"
android:textSize="35dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.cardview.widget.CardView
android:id="@+id/cardView"
android:layout_width="340dp"
android:layout_height="453dp"
android:layout_marginTop="180dp"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
app:cardElevation="0.8dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="25dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/Name_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="20dp"
android:layout_marginRight="30dp"
android:backgroundTint="#FFFFFF"
android:drawableRight="@drawable/ic_baseline_person_24"
android:hint="User Full Name" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/Phone_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="80dp"
android:layout_marginRight="30dp"
android:backgroundTint="#FFFFFF"
android:drawableRight="@drawable/ic_baseline_phone_iphone_24"
android:hint="Phone Number" />

Divyesh Patel 19012011111


Practical: 10
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/City_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="140dp"
android:layout_marginRight="30dp"
android:backgroundTint="#FFFFFF"
android:drawableRight="@drawable/ic_baseline_person_24"
android:hint="City" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/Email_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="200dp"
android:layout_marginRight="30dp"
android:backgroundTint="#FFFFFF"
android:drawableRight="@drawable/ic_baseline_email_24"
android:hint="Email" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/Passw_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="260dp"
android:layout_marginRight="30dp"
android:backgroundTint="#FFFFFF"
android:drawableRight="@drawable/ic_baseline_vpn_key_24"
android:hint="Password" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/CnPass_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"

Divyesh Patel 19012011111


Practical: 10
android:layout_marginLeft="30dp"
android:layout_marginTop="320dp"
android:layout_marginRight="30dp"
android:backgroundTint="#FFFFFF"
android:drawableRight="@drawable/ic_baseline_vpn_key_24"
android:hint="Confirm Password" />
</com.google.android.material.textfield.TextInputLayout>
<View
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginTop="363dp"
android:background="@drawable/ic_wave"
app:layout_constraintBottom_toBottomOf="parent">

</View>

</androidx.cardview.widget.CardView>

</androidx.constraintlayout.widget.ConstraintLayout>

Activity_notes.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".NotesActivity">

<ImageView
android:id="@+id/waveform"
android:layout_width="551dp"
android:layout_height="165dp"
android:layout_marginLeft="-20dp"
android:layout_marginRight="-2dp"
android:layout_marginTop="-20dp"
android:src="@drawable/ic_wave"
android:scaleY="-1"
app:layout_constraintEnd_toEndOf="parent"
android:translationZ="-10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
</ImageView>

<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="120dp"

Divyesh Patel 19012011111


Practical: 10
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toTopOf="@id/bottomNavigationView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/waveform"
app:layout_constraintVertical_bias="0.737"
tools:listitem="@layout/list_item">

</ListView>

<ImageView
android:id="@+id/waveform1"
android:layout_width="551dp"
android:layout_height="165dp"
android:layout_marginLeft="-20dp"
android:layout_marginTop="-80dp"
android:layout_marginRight="-2dp"
android:paddingTop="18dp"
android:elevation="-10dp"
android:src="@drawable/ic_wave"
app:layout_constraintBottom_toTopOf="@id/bottomNavigationView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/listview"
app:layout_constraintVertical_bias="1.0">
</ImageView>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/add_notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_add_24"
app:layout_constraintBottom_toTopOf="@id/bottomNavigationView"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="22dp"

android:layout_marginBottom="50dp"

/>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/bottomnav"
android:translationZ="30dp"/>

</androidx.constraintlayout.widget.ConstraintLayout>

Activity_splash.xml

Divyesh Patel 19012011111


Practical: 10
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/gradial3"
tools:context=".splash">

<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="150dp"
tools:layout_editor_absoluteX="105dp"
tools:layout_editor_absoluteY="195dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

Add_notes_dialog.xml

<?xml version="1.0" encoding="utf-8"?>


<ScrollView 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/root_layout"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:paddingBottom="20dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:id="@+id/tv_dialog_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:text="Add Note"
android:textColor="@color/black"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/title"
style="@style/Widget.Design.TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Note Title"
app:layout_constraintTop_toBottomOf="@id/tv_dialog_title">

Divyesh Patel 19012011111


Practical: 10

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_note_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_news_24"
android:drawableTint="#FF4081"
android:inputType="text"
android:maxLines="1" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/sub_title"
style="@style/Widget.Design.TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Note Sub Title"
app:layout_constraintTop_toBottomOf="@id/title">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_note_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_news_24"
android:drawableTint="#FF4081"
android:inputType="text"
android:maxLines="1" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/description"
style="@style/Widget.Design.TextInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Note Description"
app:layout_constraintTop_toBottomOf="@id/sub_title">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_note_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_news_24"
android:drawableTint="#FF4081"
android:gravity="top|start"
android:lines="8"
android:maxLines="10"
android:minLines="6"
android:scrollbars="vertical" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/switch_reminder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Set Reminder"

Divyesh Patel 19012011111


Practical: 10
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/description" />

<TimePicker
android:id="@+id/time_picker"
android:layout_width="match_parent"
android:background="#DFF2D8"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/switch_reminder" />

<TextView
android:id="@+id/btn_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:clickable="true"
android:focusable="true"
android:text="OK"
android:textColor="#FF4081"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/time_picker" />

</androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>

List_item.xml

<?xml version="1.0" encoding="utf-8"?>


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">

<com.google.android.material.card.MaterialCardView
android:id="@+id/list_cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/black"
app:cardCornerRadius="20dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="20dp"
android:paddingTop="20dp"
android:paddingLeft="20dp"

android:orientation="vertical">
<TextView
android:id="@+id/note_title"
android:layout_width="match_parent"
Divyesh Patel 19012011111
Practical: 10
android:layout_height="wrap_content"
android:text="UVPCE NOTE 1"
android:textColor="@color/white"
android:textSize="26sp"/>

<TextView
android:id="@+id/note_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Ganpat University "
android:textColor="@color/white"
android:textSize="17sp"/>

<TextView
android:id="@+id/note_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:text="UVPCE college is under Ganpat University &amp; excellent
college"
android:textColor="@color/white"
android:textSize="18sp"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="30dp">

<TextView
android:id="@+id/note_time_stamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sep, 25 2020 09:45:23 am"
android:textColor="@color/white" />

<Button
android:id="@+id/edit_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:backgroundTint="@android:color/transparent"
android:drawableRight="@drawable/ic_baseline_edit_24"
/>
<Button
android:id="@+id/delete_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/transparent"
android:drawableRight="@drawable/ic_baseline_delete_24"
/>

</LinearLayout>

</LinearLayout>

</com.google.android.material.card.MaterialCardView>

Divyesh Patel 19012011111


Practical: 10

</LinearLayout>

Note_info.xml

<?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".NoteInfoActivity">

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="20dp"
app:layout_constraintTop_toTopOf="parent"
app:cardCornerRadius="20dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="20dp"
android:background="#323332">

<TextView
android:id="@+id/tv_note_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:text="Title"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="22sp"
app:layout_constraintStart_toStartOf="parent"/>

<TextView
android:id="@+id/tv_note_sub_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sub title"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_marginTop="5dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_note_title"/>

<TextView
android:id="@+id/tv_note_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_note_sub_title"

Divyesh Patel 19012011111


Practical: 10
android:textColor="@color/white"
android:textSize="20sp"
android:layout_marginTop="15dp"
android:text="This is description\nof note"/>

<TextView
android:id="@+id/tv_note_time_stamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tv_note_description"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="15dp"
android:textColor="@color/white"
android:textSize="16sp"
android:text="Oct, 16 2021 06:31:00 pm"/>

<TextView
android:id="@+id/tv_notes_reminder_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tv_note_time_stamp"
app:layout_constraintStart_toStartOf="parent"
android:textColor="@color/white"
android:textSize="16sp"
android:text="Reminder at Oct, 16 2021 16:35:00 pm"/>

</androidx.constraintlayout.widget.ConstraintLayout>

</com.google.android.material.card.MaterialCardView>

</androidx.constraintlayout.widget.ConstraintLayout>

Notes.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".NotesActivity">

<ImageView
android:id="@+id/waveform"
android:layout_width="551dp"
android:layout_height="165dp"
android:layout_marginLeft="-20dp"
android:layout_marginRight="-2dp"
android:paddingTop="18dp"
android:src="@drawable/ic_wave"
android:scaleY="-1"
app:layout_constraintEnd_toEndOf="parent"
android:translationZ="-10dp"
app:layout_constraintStart_toStartOf="parent"
Divyesh Patel 19012011111
Practical: 10
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
</ImageView>

<ImageView
android:id="@+id/imagebyimagenotes"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_marginTop="104dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/waveform"/>

<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="350dp"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toTopOf="@id/bottomNavigationView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/waveform"
app:layout_constraintVertical_bias="0.737"
tools:listitem="@layout/list_item">

</ListView>

<ImageView
android:id="@+id/waveform1"
android:layout_width="551dp"
android:layout_height="165dp"
android:layout_marginLeft="-20dp"
android:layout_marginTop="-80dp"
android:layout_marginRight="-2dp"
android:paddingTop="18dp"
android:elevation="-10dp"
android:src="@drawable/ic_wave"
app:layout_constraintBottom_toTopOf="@id/bottomNavigationView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/listview"
app:layout_constraintVertical_bias="1.0">
</ImageView>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/add_notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_add_24"
app:layout_constraintBottom_toTopOf="@id/bottomNavigationView"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="22dp"

android:layout_marginBottom="50dp"

Divyesh Patel 19012011111


Practical: 10
/>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/bottomnav"
android:translationZ="30dp"/>

</androidx.constraintlayout.widget.ConstraintLayout>

AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.a19012011111_prac10">

<uses-permission android:name="android.permission.INTERNET" />


<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.19012011111_prac10">
<activity
android:name=".splash"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>

<receiver
android:name=".AlarmBroadcastReceiver"
android:enabled="true"
android:exported="true" />
<receiver
android:name=".NotificationReceiver"
android:enabled="true" />

<activity
android:name=".NoteInfoActivity"
android:exported="true" />
<activity
android:name=".NotesActivity"
android:exported="true" />
<activity

Divyesh Patel 19012011111


Practical: 10
android:name=".MainActivity2d"
android:exported="true"
android:noHistory="true" />
<activity
android:name=".MainActivity2s"
android:exported="true" />
<activity
android:name=".MainActivity"
android:exported="true"

android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>
</application>

</manifest>

Output:

Divyesh Patel 19012011111


Practical: 10

Divyesh Patel 19012011111


Practical: 10

Divyesh Patel 19012011111


Practical: 10

Divyesh Patel 19012011111

You might also like