diff --git a/.idea/misc.xml b/.idea/misc.xml index e42be33..092bb7c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,6 +3,7 @@ diff --git a/app/build.gradle b/app/build.gradle index 07d9ced..afd6479 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,17 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' + id 'kotlin-android' id 'kotlin-android-extensions' } + android { compileSdk 32 defaultConfig { applicationId "com.example.enotes" - minSdk 26 + minSdk 25 targetSdk 32 versionCode 1 versionName "1.0" @@ -23,6 +25,9 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + buildFeatures { + viewBinding = true + } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -53,4 +58,11 @@ dependencies { implementation 'com.github.Miihir79:DrawingCanvas:1.1.2' implementation 'com.github.DonghanX:Draw:v1.0.3' + // dependencies for Api integration | Retrofit 2 + implementation 'com.squareup.retrofit2:retrofit:2.9.0' + implementation 'com.squareup.retrofit2:converter-gson:2.9.0' + implementation 'com.squareup.retrofit2:converter-scalars:2.9.0' + implementation 'com.squareup.picasso:picasso:2.71828' + implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2' + } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2e3e5ab..eb1dd8b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -9,6 +9,7 @@ + + + @@ -44,15 +49,14 @@ - - - + - - \ No newline at end of file diff --git a/app/src/main/java/com/example/enotes/BroadcastService.kt b/app/src/main/java/com/example/enotes/BroadcastService.kt index 831ec99..9ca5350 100644 --- a/app/src/main/java/com/example/enotes/BroadcastService.kt +++ b/app/src/main/java/com/example/enotes/BroadcastService.kt @@ -3,15 +3,16 @@ package com.example.enotes import android.R import android.app.NotificationChannel import android.app.NotificationManager +import android.app.PendingIntent import android.content.BroadcastReceiver import android.content.Context import android.content.Intent +import android.os.Build import android.util.Log import android.widget.Toast import androidx.core.app.NotificationCompat - -import android.os.Build import androidx.core.app.NotificationManagerCompat +import com.example.enotes.activities.NoteListActivity const val notificationID = 1 @@ -29,11 +30,21 @@ class BroadcastService : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { - var time= intent.getStringExtra("time") + val time= intent.getStringExtra("time") Toast.makeText(context, "Successful", Toast.LENGTH_SHORT).show() + val title= intent.getStringExtra("title") + createNotificationChannel(context) - notifyNotification(context,time) + val notificationIntent = Intent(context, NoteListActivity::class.java) + notificationIntent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP + + val pendingIntent = PendingIntent.getActivity( + context, 0, notificationIntent, + PendingIntent.FLAG_UPDATE_CURRENT + ) + + notifyNotification(context,time, title,pendingIntent) if (time != null) { @@ -54,12 +65,18 @@ class BroadcastService : BroadcastReceiver() { } } - private fun notifyNotification(context: Context, time: String?) { + private fun notifyNotification( + context: Context, + time: String?, + title: String?, + pendingIntent: PendingIntent + ) { with(NotificationManagerCompat.from(context)) { val build = NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID) .setContentTitle(time) - .setContentText("Alarm.") + .setContentText(title) .setSmallIcon(R.drawable.ic_lock_idle_alarm) + .setContentIntent(pendingIntent) .setPriority(NotificationCompat.PRIORITY_HIGH) notify(NOTIFICATION_ID, build.build()) diff --git a/app/src/main/java/com/example/enotes/Login.kt b/app/src/main/java/com/example/enotes/Login.kt deleted file mode 100644 index 747e851..0000000 --- a/app/src/main/java/com/example/enotes/Login.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.example.enotes - -import android.content.Intent -import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity -import kotlinx.android.synthetic.main.activity_login.* - -class Login : AppCompatActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_login) - -// val email = findViewById(R.id.email) -// val password = findViewById(R.id.password) -// val login_btn = findViewById - - - diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 554be75..34c4e3d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,37 +1,35 @@ - + android:layout_height="match_parent"> + android:background="@color/orange"> + + android:layout_margin="10dp" + android:src="@drawable/ic_baseline_dehaze_24"> @@ -39,22 +37,25 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" + android:layout_gravity="center" android:text="eNotes" android:textColor="@color/white" - android:textSize="20sp"> + android:textSize="16sp"> + + android:contentDescription="TODO" + android:src="@drawable/ic_add" /> + - @@ -80,7 +80,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" - app:menu="@menu/navigation_menu" - app:headerLayout="@layout/nav_header"/> + app:headerLayout="@layout/nav_header" + app:menu="@menu/navigation_menu" /> diff --git a/app/src/main/res/layout/activity_open_image.xml b/app/src/main/res/layout/activity_open_image.xml new file mode 100644 index 0000000..f763139 --- /dev/null +++ b/app/src/main/res/layout/activity_open_image.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_signup.xml b/app/src/main/res/layout/activity_signup.xml index e885b5b..60f84f1 100644 --- a/app/src/main/res/layout/activity_signup.xml +++ b/app/src/main/res/layout/activity_signup.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg2" - tools:context=".Signup"> + tools:context=".activities.SignupActivity"> @@ -53,6 +53,30 @@ > + + + + + + + + tools:context=".activities.AddNoteActivity"> - + android:layout_margin="10dp" + android:layout_marginStart="10dp" + android:layout_marginEnd="10dp" + android:layout_marginBottom="10dp" + android:elevation="10dp"> - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="45dp"> - - - - - + android:layout_marginBottom="5dp" + android:background="@android:color/transparent" + android:hint="Title" + android:padding="1dp" + android:lines="1" + android:textColor="@color/black" + android:textSize="15sp" + android:textStyle="bold"> - + - - - - - - + + - - - - @@ -175,39 +90,36 @@ android:layout_marginTop="5dp" android:layout_marginEnd="5dp" android:layout_marginBottom="5dp" - android:background="@null" - android:hint="content" - android:padding="10dp" + android:background="@android:color/transparent" + android:hint="description" + android:lines="4" + android:padding="1dp" android:textColor="@color/black" android:textSize="15sp"> - - - + android:layout_below="@id/text_context"> + + + + - + android:layout_height="1dp" + android:layout_marginTop="10dp" + android:layout_marginBottom="5dp" + android:background="@color/grey" - + > - + + + + + + + + + + + + android:layout_margin="7dp" + android:gravity="center"> + + - - + + + + + - - + android:orientation="vertical" + android:padding="5dp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -271,4 +376,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_view_notes.xml b/app/src/main/res/layout/activity_view_notes.xml index 0d8e524..db39799 100644 --- a/app/src/main/res/layout/activity_view_notes.xml +++ b/app/src/main/res/layout/activity_view_notes.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/grey" - tools:context=".Text_note"> + tools:context=".activities.AddNoteActivity"> @@ -64,8 +65,9 @@ android:layout_marginTop="5dp" android:layout_marginEnd="5dp" android:layout_marginBottom="5dp" + android:background="@null" android:focusableInTouchMode="false" - android:hint="content" + android:hint="description here" android:padding="1dp" android:textColor="@color/black" android:textColorHint="@color/black" @@ -82,8 +84,18 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/alertdialog_cocation.xml b/app/src/main/res/layout/alertdialog_cocation.xml index e5e1344..10e6953 100644 --- a/app/src/main/res/layout/alertdialog_cocation.xml +++ b/app/src/main/res/layout/alertdialog_cocation.xml @@ -1,26 +1,36 @@ - + + + android:hint="Search location here" + android:textSize="15sp"> @@ -29,9 +39,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dp" - android:textColor="@color/orange" - android:textSize="20sp" android:gravity="end" - android:text="Use Current Location" /> + android:text="Use Current Location" + android:textColor="@color/orange" + android:textSize="15sp" /> \ No newline at end of file diff --git a/app/src/main/res/layout/appbar_create_note.xml b/app/src/main/res/layout/appbar_create_note.xml index 8ee91e1..45b96cc 100644 --- a/app/src/main/res/layout/appbar_create_note.xml +++ b/app/src/main/res/layout/appbar_create_note.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity"> + tools:context=".activities.NoteListActivity"> diff --git a/app/src/main/res/layout/appbar_main.xml b/app/src/main/res/layout/appbar_main.xml index 4e80d9e..e6852ad 100644 --- a/app/src/main/res/layout/appbar_main.xml +++ b/app/src/main/res/layout/appbar_main.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity"> + tools:context=".activities.NoteListActivity"> - + + + + - + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_bookmark.xml b/app/src/main/res/layout/dialog_bookmark.xml index cbb590a..c88ba9c 100644 --- a/app/src/main/res/layout/dialog_bookmark.xml +++ b/app/src/main/res/layout/dialog_bookmark.xml @@ -1,52 +1,51 @@ - + android:background="@color/orange" + android:gravity="center" + android:padding="10dp" + android:text="Choose A Tag" + android:textColor="@color/white" + android:textSize="18sp"> + + android:background="@color/grey"> + + android:gravity="center|left" + android:orientation="horizontal"> + android:layout_width="25dp" + android:layout_height="25sp" + android:layout_margin="5dp" + android:src="@drawable/bookmark_blue"> - + @@ -54,30 +53,31 @@ + + android:gravity="center|left" + android:orientation="horizontal"> + + android:layout_width="25dp" + android:layout_height="25sp" + android:layout_margin="5dp" + android:src="@drawable/bookmark_grren"> - + @@ -85,31 +85,31 @@ + + android:gravity="center|left" + android:orientation="horizontal"> + android:layout_width="25dp" + android:layout_height="25sp" + android:layout_margin="5dp" + android:src="@drawable/bookmark_orage"> - + @@ -117,29 +117,31 @@ + + android:layout_marginBottom="10dp" + android:gravity="center|left" + android:orientation="horizontal"> + + android:layout_width="25dp" + android:layout_height="25sp" + android:layout_margin="5dp" + android:src="@drawable/bookmark_yellow"> - + @@ -147,29 +149,31 @@ + + android:layout_marginBottom="10dp" + android:gravity="center|left" + android:orientation="horizontal"> + + android:layout_width="25dp" + android:layout_height="25sp" + android:layout_margin="5dp" + android:src="@drawable/bookmark_red"> - + @@ -177,28 +181,30 @@ + + android:layout_marginBottom="10dp" + android:gravity="center|left" + android:orientation="horizontal"> + + android:layout_width="25dp" + android:layout_height="25sp" + android:layout_margin="5dp" + android:src="@drawable/bookmark_border_24"> - + @@ -207,11 +213,4 @@ - - - \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_draw.xml b/app/src/main/res/layout/dialog_draw.xml index 339ec67..2d7cbb6 100644 --- a/app/src/main/res/layout/dialog_draw.xml +++ b/app/src/main/res/layout/dialog_draw.xml @@ -4,10 +4,22 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + @@ -17,6 +29,7 @@ android:layout_width="50dp" android:layout_height="50dp" android:layout_alignParentEnd="true" + android:layout_marginTop="50dp" android:contentDescription="done" android:src="@drawable/done_24"> diff --git a/app/src/main/res/layout/dialog_fonts.xml b/app/src/main/res/layout/dialog_fonts.xml index 4892743..a7e74a3 100644 --- a/app/src/main/res/layout/dialog_fonts.xml +++ b/app/src/main/res/layout/dialog_fonts.xml @@ -1,14 +1,27 @@ - + android:layout_height="500dp"> + + + + + + + android:layout_below="@id/headerTv" + android:layout_margin="5dp"> + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> @@ -32,168 +49,227 @@ + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> @@ -201,126 +277,170 @@ + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> @@ -328,64 +448,81 @@ + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> + + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + android:layout_marginBottom="5dp"> + + android:textSize="16sp"> - - diff --git a/app/src/main/res/layout/dialog_size.xml b/app/src/main/res/layout/dialog_size.xml index 51b436f..6b8eae6 100644 --- a/app/src/main/res/layout/dialog_size.xml +++ b/app/src/main/res/layout/dialog_size.xml @@ -1,41 +1,52 @@ - - + android:orientation="vertical"> + android:background="@color/orange" + android:gravity="center" + android:padding="10dp" + android:text="Select Size" + android:textColor="@color/white" + android:textSize="18sp"> - + - + android:layout_margin="10dp" + android:orientation="vertical"> + + + + + + - \ No newline at end of file diff --git a/app/src/main/res/layout/file_attach.xml b/app/src/main/res/layout/file_attach.xml index 76282ce..8f94e1b 100644 --- a/app/src/main/res/layout/file_attach.xml +++ b/app/src/main/res/layout/file_attach.xml @@ -1,39 +1,27 @@ - + android:layout_height="100dp" + android:elevation="5dp"> + + - - - - - - - - + android:layout_height="match_parent" + android:src="@drawable/attach_file_24" + > + + + diff --git a/app/src/main/res/layout/itemview_show_notes.xml b/app/src/main/res/layout/itemview_show_notes.xml index becc9fe..7023ccb 100644 --- a/app/src/main/res/layout/itemview_show_notes.xml +++ b/app/src/main/res/layout/itemview_show_notes.xml @@ -48,11 +48,11 @@ android:id="@+id/note_tittle" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" + android:layout_marginLeft="12dp" android:layout_marginTop="5dp" android:layout_toRightOf="@id/tags" android:lines="1" - android:text="TitleTitleTitleTitleTitleTitleTitleTitleTitle" + android:text="Title" android:textColor="@color/black" android:textSize="15sp" app:layout_constraintEnd_toStartOf="@id/tags" @@ -67,10 +67,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/note_tittle" - android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" android:layout_marginTop="3dp" - android:layout_marginRight="8dp" - android:text="nttentcontentcontentcontentcontentcontent" + android:layout_marginEnd="8dp" + android:text="description" android:textSize="13sp" app:layout_constraintBottom_toTopOf="@id/note_date" app:layout_constraintEnd_toEndOf="parent" @@ -97,4 +97,4 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/nav_header.xml b/app/src/main/res/layout/nav_header.xml index 39e6986..1446bdb 100644 --- a/app/src/main/res/layout/nav_header.xml +++ b/app/src/main/res/layout/nav_header.xml @@ -11,7 +11,7 @@ android:textStyle="bold" android:text="eNotes" android:layout_gravity="center_vertical" - android:textSize="35sp" + android:textSize="20sp" android:textColor="@color/white" android:layout_marginStart="10dp"> diff --git a/app/src/main/res/menu/navigation_menu.xml b/app/src/main/res/menu/navigation_menu.xml index 0b41973..8351bba 100644 --- a/app/src/main/res/menu/navigation_menu.xml +++ b/app/src/main/res/menu/navigation_menu.xml @@ -1,19 +1,45 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + tools:showIn="navigation_view"> + android:title="All Notes" + /> + android:id="@+id/nav_travel" + android:title="Travel" + android:icon="@drawable/bookmark_blue" + + /> + + + + + + @@ -27,9 +53,6 @@ android:id="@+id/nav_account" android:title="My Account" /> -