diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5427fcb56c9c03ca007dfd5e68084d1472590c1b Binary files /dev/null and b/.DS_Store differ diff --git a/NoteApplication/.gitignore b/NoteApplication/.gitignore index cf2fd5b8032502660a805e0ffcd7b9c83d9dfce1..aa724b77071afcbd9bb398053e05adaf7ac9405a 100644 --- a/NoteApplication/.gitignore +++ b/NoteApplication/.gitignore @@ -7,8 +7,6 @@ /.idea/workspace.xml /.idea/navEditor.xml /.idea/assetWizardSettings.xml -/.idea/misc.xml -/.idea/vcs.xml .DS_Store /build /captures diff --git a/NoteApplication/.idea/compiler.xml b/NoteApplication/.idea/compiler.xml index 659bf43190d1afbfe1907e2e5e2bd75ad761dfb3..fb7f4a8a465d42b4a0390d464b83b99e8465bba7 100644 --- a/NoteApplication/.idea/compiler.xml +++ b/NoteApplication/.idea/compiler.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="CompilerConfiguration"> - <bytecodeTargetLevel target="16" /> + <bytecodeTargetLevel target="11" /> </component> </project> \ No newline at end of file diff --git a/NoteApplication/app/build.gradle b/NoteApplication/app/build.gradle index 5cf6c35e95d55da681106355a038f0e5e4d07bca..a03cbe53b45aff31250784f4b4cdfb14d357be2b 100644 --- a/NoteApplication/app/build.gradle +++ b/NoteApplication/app/build.gradle @@ -4,12 +4,12 @@ plugins { } android { - compileSdk 30 + compileSdk 32 defaultConfig { applicationId "com.noteapplication.cs398" - minSdk 21 - targetSdk 30 + minSdk 24 + targetSdk 32 versionCode 1 versionName "1.0" @@ -29,9 +29,6 @@ android { kotlinOptions { jvmTarget = '1.8' } - buildFeatures { - viewBinding true - } } dependencies { @@ -40,10 +37,6 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1' - implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5' - implementation 'androidx.navigation:navigation-ui-ktx:2.3.5' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' diff --git a/NoteApplication/app/src/main/AndroidManifest.xml b/NoteApplication/app/src/main/AndroidManifest.xml index 5779aa1ee212e468a236116f2d7ad69526ee7370..3b30dec7ef75da84ad2df68792bdf48d6526cd83 100644 --- a/NoteApplication/app/src/main/AndroidManifest.xml +++ b/NoteApplication/app/src/main/AndroidManifest.xml @@ -11,9 +11,7 @@ android:theme="@style/Theme.NoteApplication"> <activity android:name=".MainActivity" - android:exported="true" - android:label="@string/app_name" - android:theme="@style/Theme.NoteApplication.NoActionBar"> + android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN"/> diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/MainActivity.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/MainActivity.kt index ec41fd952bf7e7cbf69c8e2fb3f058a31e8d8119..83e58217bf06bf0f35ae31e1a6c990fd63d091ec 100644 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/MainActivity.kt +++ b/NoteApplication/app/src/main/java/com/noteapplication/cs398/MainActivity.kt @@ -1,57 +1,11 @@ package com.noteapplication.cs398 -import android.os.Bundle -import android.view.Menu -import com.google.android.material.snackbar.Snackbar -import com.google.android.material.navigation.NavigationView -import androidx.navigation.findNavController -import androidx.navigation.ui.AppBarConfiguration -import androidx.navigation.ui.navigateUp -import androidx.navigation.ui.setupActionBarWithNavController -import androidx.navigation.ui.setupWithNavController -import androidx.drawerlayout.widget.DrawerLayout import androidx.appcompat.app.AppCompatActivity -import com.noteapplication.cs398.databinding.ActivityMainBinding +import android.os.Bundle class MainActivity : AppCompatActivity() { - - private lateinit var appBarConfiguration: AppBarConfiguration - private lateinit var binding: ActivityMainBinding - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - - binding = ActivityMainBinding.inflate(layoutInflater) - setContentView(binding.root) - - setSupportActionBar(binding.appBarMain.toolbar) - - binding.appBarMain.fab.setOnClickListener { view -> - Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) - .setAction("Action", null).show() - } - val drawerLayout: DrawerLayout = binding.drawerLayout - val navView: NavigationView = binding.navView - val navController = findNavController(R.id.nav_host_fragment_content_main) - // Passing each menu ID as a set of Ids because each - // menu should be considered as top level destinations. - appBarConfiguration = AppBarConfiguration( - setOf( - R.id.nav_home, R.id.nav_gallery, R.id.nav_slideshow - ), drawerLayout - ) - setupActionBarWithNavController(navController, appBarConfiguration) - navView.setupWithNavController(navController) - } - - override fun onCreateOptionsMenu(menu: Menu): Boolean { - // Inflate the menu; this adds items to the action bar if it is present. - menuInflater.inflate(R.menu.main, menu) - return true - } - - override fun onSupportNavigateUp(): Boolean { - val navController = findNavController(R.id.nav_host_fragment_content_main) - return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp() + setContentView(R.layout.activity_main) } } \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/model/ClassModel.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/model/ClassModel.kt deleted file mode 100644 index 7d770cc2f3d5f14ed7d3b67e66d5045293bfd74f..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/model/ClassModel.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.noteapplication.cs398.model - -// what do we need for classes? -class ClassModel(val title:String){ - - -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/model/NoteModel.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/model/NoteModel.kt deleted file mode 100644 index 6e1f72d0c8234c528890351f7ca2289eb0362651..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/model/NoteModel.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.noteapplication.cs398.model - -import java.sql.Date - -class NoteModel(val title: String, val body: String){ -// val createAt: Date = Date(); - var editedAt: Date? = null; - -} -///comment something or some code changes diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/NewNote/NewNote.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/NewNote/NewNote.kt deleted file mode 100644 index 06672884560389a8c2803e9ea99ef0241d9049c6..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/NewNote/NewNote.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.noteapplication.cs398.ui.NewNote - -import com.noteapplication.cs398.model.NoteModel - - -class NewNote { - val note = NoteModel() - - -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/gallery/GalleryFragment.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/gallery/GalleryFragment.kt deleted file mode 100644 index 0ac66d4afda8ec19ffa095379b6b99c0f0891344..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/gallery/GalleryFragment.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.noteapplication.cs398.ui.gallery - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.TextView -import androidx.fragment.app.Fragment -import androidx.lifecycle.Observer -import androidx.lifecycle.ViewModelProvider -import com.noteapplication.cs398.R -import com.noteapplication.cs398.databinding.FragmentGalleryBinding - -class GalleryFragment : Fragment() { - - private lateinit var galleryViewModel: GalleryViewModel - private var _binding: FragmentGalleryBinding? = null - - // This property is only valid between onCreateView and - // onDestroyView. - private val binding get() = _binding!! - - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? - ): View? { - galleryViewModel = - ViewModelProvider(this).get(GalleryViewModel::class.java) - - _binding = FragmentGalleryBinding.inflate(inflater, container, false) - val root: View = binding.root - - val textView: TextView = binding.textGallery - galleryViewModel.text.observe(viewLifecycleOwner, Observer { - textView.text = it - }) - return root - } - - override fun onDestroyView() { - super.onDestroyView() - _binding = null - } -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/gallery/GalleryViewModel.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/gallery/GalleryViewModel.kt deleted file mode 100644 index ccb4530e1d8ef2adb4dde3c2185bf83e43708142..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/gallery/GalleryViewModel.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.noteapplication.cs398.ui.gallery - -import androidx.lifecycle.LiveData -import androidx.lifecycle.MutableLiveData -import androidx.lifecycle.ViewModel - -class GalleryViewModel : ViewModel() { - - private val _text = MutableLiveData<String>().apply { - value = "This is gallery Fragment" - } - val text: LiveData<String> = _text -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/home/HomeFragment.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/home/HomeFragment.kt deleted file mode 100644 index dc9d129f7fc1eeb8ba4fa4d09fd9d01c1fc51c25..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/home/HomeFragment.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.noteapplication.cs398.ui.home - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.TextView -import androidx.fragment.app.Fragment -import androidx.lifecycle.Observer -import androidx.lifecycle.ViewModelProvider -import com.noteapplication.cs398.R -import com.noteapplication.cs398.databinding.FragmentHomeBinding - -class HomeFragment : Fragment() { - - private lateinit var homeViewModel: HomeViewModel - private var _binding: FragmentHomeBinding? = null - - // This property is only valid between onCreateView and - // onDestroyView. - private val binding get() = _binding!! - - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? - ): View? { - homeViewModel = - ViewModelProvider(this).get(HomeViewModel::class.java) - - _binding = FragmentHomeBinding.inflate(inflater, container, false) - val root: View = binding.root - - val textView: TextView = binding.textHome - homeViewModel.text.observe(viewLifecycleOwner, Observer { - textView.text = it - }) - return root - } - - override fun onDestroyView() { - super.onDestroyView() - _binding = null - } -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/home/HomeViewModel.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/home/HomeViewModel.kt deleted file mode 100644 index 7494838c92ad16d40b45f63c2d90fa9f6d088e4a..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/home/HomeViewModel.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.noteapplication.cs398.ui.home - -import androidx.lifecycle.LiveData -import androidx.lifecycle.MutableLiveData -import androidx.lifecycle.ViewModel - -class HomeViewModel : ViewModel() { - - private val _text = MutableLiveData<String>().apply { - value = "This is home Fragment" - } - val text: LiveData<String> = _text -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/slideshow/SlideshowFragment.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/slideshow/SlideshowFragment.kt deleted file mode 100644 index f415142672da6a0d32df2fdb797a8f50fe460d65..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/slideshow/SlideshowFragment.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.noteapplication.cs398.ui.slideshow - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.TextView -import androidx.fragment.app.Fragment -import androidx.lifecycle.Observer -import androidx.lifecycle.ViewModelProvider -import com.noteapplication.cs398.R -import com.noteapplication.cs398.databinding.FragmentSlideshowBinding - -class SlideshowFragment : Fragment() { - - private lateinit var slideshowViewModel: SlideshowViewModel - private var _binding: FragmentSlideshowBinding? = null - - // This property is only valid between onCreateView and - // onDestroyView. - private val binding get() = _binding!! - - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? - ): View? { - slideshowViewModel = - ViewModelProvider(this).get(SlideshowViewModel::class.java) - - _binding = FragmentSlideshowBinding.inflate(inflater, container, false) - val root: View = binding.root - - val textView: TextView = binding.textSlideshow - slideshowViewModel.text.observe(viewLifecycleOwner, Observer { - textView.text = it - }) - return root - } - - override fun onDestroyView() { - super.onDestroyView() - _binding = null - } -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/slideshow/SlideshowViewModel.kt b/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/slideshow/SlideshowViewModel.kt deleted file mode 100644 index cf1ac3b0271538c0823b387868f237581aa565ef..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/java/com/noteapplication/cs398/ui/slideshow/SlideshowViewModel.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.noteapplication.cs398.ui.slideshow - -import androidx.lifecycle.LiveData -import androidx.lifecycle.MutableLiveData -import androidx.lifecycle.ViewModel - -class SlideshowViewModel : ViewModel() { - - private val _text = MutableLiveData<String>().apply { - value = "This is slideshow Fragment" - } - val text: LiveData<String> = _text -} \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/drawable/ic_menu_camera.xml b/NoteApplication/app/src/main/res/drawable/ic_menu_camera.xml deleted file mode 100644 index 41688d5c0c90df0868114bd516ae1a056c1af818..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/drawable/ic_menu_camera.xml +++ /dev/null @@ -1,12 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24.0" - android:viewportHeight="24.0"> - <path - android:fillColor="#FF000000" - android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/> - <path - android:fillColor="#FF000000" - android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/> -</vector> diff --git a/NoteApplication/app/src/main/res/drawable/ic_menu_gallery.xml b/NoteApplication/app/src/main/res/drawable/ic_menu_gallery.xml deleted file mode 100644 index ff8ce529f11a829175ae6d6ec7edea12b9ecc6f6..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/drawable/ic_menu_gallery.xml +++ /dev/null @@ -1,9 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24.0" - android:viewportHeight="24.0"> - <path - android:fillColor="#FF000000" - android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z"/> -</vector> diff --git a/NoteApplication/app/src/main/res/drawable/ic_menu_slideshow.xml b/NoteApplication/app/src/main/res/drawable/ic_menu_slideshow.xml deleted file mode 100644 index ae51e494a9ab95ba261ac6c04d3456fd4dc34bf7..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/drawable/ic_menu_slideshow.xml +++ /dev/null @@ -1,9 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24.0" - android:viewportHeight="24.0"> - <path - android:fillColor="#FF000000" - android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z"/> -</vector> diff --git a/NoteApplication/app/src/main/res/drawable/side_nav_bar.xml b/NoteApplication/app/src/main/res/drawable/side_nav_bar.xml deleted file mode 100644 index a33798b60a8693abef4b4c26fd4d0a9e7233c15b..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/drawable/side_nav_bar.xml +++ /dev/null @@ -1,9 +0,0 @@ -<shape xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="rectangle"> - <gradient - android:angle="135" - android:centerColor="#009688" - android:endColor="#00695C" - android:startColor="#4DB6AC" - android:type="linear"/> -</shape> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/layout/activity_main.xml b/NoteApplication/app/src/main/res/layout/activity_main.xml index 6882bb572009dec3808ccac2fc0e667379851763..0e1833d447fd6b0bc9a68e1bc865f0ddeee26e62 100644 --- a/NoteApplication/app/src/main/res/layout/activity_main.xml +++ b/NoteApplication/app/src/main/res/layout/activity_main.xml @@ -1,26 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.drawerlayout.widget.DrawerLayout +<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:id="@+id/drawer_layout" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:fitsSystemWindows="true" - tools:openDrawer="start"> - - <include - android:id="@+id/app_bar_main" - layout="@layout/app_bar_main" - android:layout_width="match_parent" - android:layout_height="match_parent"/> - - <com.google.android.material.navigation.NavigationView - android:id="@+id/nav_view" + tools:context=".MainActivity"> + <TextView android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_gravity="start" - android:fitsSystemWindows="true" - app:headerLayout="@layout/nav_header_main" - app:menu="@menu/activity_main_drawer"/> -</androidx.drawerlayout.widget.DrawerLayout> \ No newline at end of file + android:layout_height="wrap_content" + android:text="Hello World!" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent"/> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/layout/app_bar_main.xml b/NoteApplication/app/src/main/res/layout/app_bar_main.xml deleted file mode 100644 index f3dd14fca59d7ca9e23ddf98a03e4a21f5778792..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/layout/app_bar_main.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<androidx.coordinatorlayout.widget.CoordinatorLayout - 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"> - - <com.google.android.material.appbar.AppBarLayout - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:theme="@style/Theme.NoteApplication.AppBarOverlay"> - - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar" - android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:popupTheme="@style/Theme.NoteApplication.PopupOverlay"/> - - </com.google.android.material.appbar.AppBarLayout> - - <include layout="@layout/content_main"/> - - <com.google.android.material.floatingactionbutton.FloatingActionButton - android:id="@+id/fab" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="bottom|end" - android:layout_marginEnd="@dimen/fab_margin" - android:layout_marginBottom="16dp" - app:srcCompat="@android:drawable/ic_dialog_email"/> - -</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/layout/content_main.xml b/NoteApplication/app/src/main/res/layout/content_main.xml deleted file mode 100644 index a3a498eb4c047513101afa5ee1b8710576ff5105..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/layout/content_main.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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" - app:layout_behavior="@string/appbar_scrolling_view_behavior" - tools:showIn="@layout/app_bar_main"> - - <fragment - android:id="@+id/nav_host_fragment_content_main" - android:name="androidx.navigation.fragment.NavHostFragment" - android:layout_width="match_parent" - android:layout_height="match_parent" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:defaultNavHost="true" - app:navGraph="@navigation/mobile_navigation" - /> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/layout/fragment_gallery.xml b/NoteApplication/app/src/main/res/layout/fragment_gallery.xml deleted file mode 100644 index 82d5b10d5f1a1a284d363ec7fa906ef2d15efaad..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/layout/fragment_gallery.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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=".ui.gallery.GalleryFragment"> - - <TextView - android:id="@+id/text_gallery" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="8dp" - android:textAlignment="center" - android:textSize="20sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent"/> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/layout/fragment_home.xml b/NoteApplication/app/src/main/res/layout/fragment_home.xml deleted file mode 100644 index d91141c5d4760d102f412f4be34970a219a8376b..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/layout/fragment_home.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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=".ui.home.HomeFragment"> - - <TextView - android:id="@+id/text_home" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="8dp" - android:textAlignment="center" - android:textSize="20sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent"/> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/layout/fragment_slideshow.xml b/NoteApplication/app/src/main/res/layout/fragment_slideshow.xml deleted file mode 100644 index 3c45c3ec687a27ecde2f447fbdc100c5d796fc73..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/layout/fragment_slideshow.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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=".ui.slideshow.SlideshowFragment"> - - <TextView - android:id="@+id/text_slideshow" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="8dp" - android:textAlignment="center" - android:textSize="20sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent"/> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/layout/nav_header_main.xml b/NoteApplication/app/src/main/res/layout/nav_header_main.xml deleted file mode 100644 index 6209db86e82664559ccdc774159972e261df5218..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/layout/nav_header_main.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?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:layout_width="match_parent" - android:layout_height="@dimen/nav_header_height" - android:background="@drawable/side_nav_bar" - android:paddingBottom="@dimen/activity_vertical_margin" - android:paddingLeft="@dimen/activity_horizontal_margin" - android:paddingRight="@dimen/activity_horizontal_margin" - android:paddingTop="@dimen/activity_vertical_margin" - android:theme="@style/ThemeOverlay.AppCompat.Dark" - android:orientation="vertical" - android:gravity="bottom"> - - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingTop="@dimen/nav_header_vertical_spacing" - app:srcCompat="@mipmap/ic_launcher_round" - android:contentDescription="@string/nav_header_desc" - android:id="@+id/imageView"/> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="@dimen/nav_header_vertical_spacing" - android:text="@string/nav_header_title" - android:textAppearance="@style/TextAppearance.AppCompat.Body1"/> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/nav_header_subtitle" - android:id="@+id/textView"/> -</LinearLayout> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/menu/activity_main_drawer.xml b/NoteApplication/app/src/main/res/menu/activity_main_drawer.xml deleted file mode 100644 index a407182614cf13680c7a4b7564a2c73639a1d38d..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/menu/activity_main_drawer.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<menu xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - tools:showIn="navigation_view"> - - <group android:checkableBehavior="single"> - <item - android:id="@+id/nav_home" - android:icon="@drawable/ic_menu_camera" - android:title="@string/menu_home"/> - <item - android:id="@+id/nav_gallery" - android:icon="@drawable/ic_menu_gallery" - android:title="@string/menu_gallery"/> - <item - android:id="@+id/nav_slideshow" - android:icon="@drawable/ic_menu_slideshow" - android:title="@string/menu_slideshow"/> - </group> -</menu> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/menu/main.xml b/NoteApplication/app/src/main/res/menu/main.xml deleted file mode 100644 index 192740c15b559ab0f168029bebc62ac8a3ada376..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/menu/main.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<menu xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto"> - <item android:id="@+id/action_settings" - android:title="@string/action_settings" - android:orderInCategory="100" - app:showAsAction="never"/> -</menu> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/navigation/mobile_navigation.xml b/NoteApplication/app/src/main/res/navigation/mobile_navigation.xml deleted file mode 100644 index e209f52928e2938e2199455b32fd910e424f4c89..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/navigation/mobile_navigation.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<navigation 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/mobile_navigation" - app:startDestination="@+id/nav_home"> - - <fragment - android:id="@+id/nav_home" - android:name="com.noteapplication.cs398.ui.home.HomeFragment" - android:label="@string/menu_home" - tools:layout="@layout/fragment_home"/> - - <fragment - android:id="@+id/nav_gallery" - android:name="com.noteapplication.cs398.ui.gallery.GalleryFragment" - android:label="@string/menu_gallery" - tools:layout="@layout/fragment_gallery"/> - - <fragment - android:id="@+id/nav_slideshow" - android:name="com.noteapplication.cs398.ui.slideshow.SlideshowFragment" - android:label="@string/menu_slideshow" - tools:layout="@layout/fragment_slideshow"/> -</navigation> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/values-land/dimens.xml b/NoteApplication/app/src/main/res/values-land/dimens.xml deleted file mode 100644 index 22d7f004329e4ff0529a55f37011a5ade468a19b..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/values-land/dimens.xml +++ /dev/null @@ -1,3 +0,0 @@ -<resources> - <dimen name="fab_margin">48dp</dimen> -</resources> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/values-w1240dp/dimens.xml b/NoteApplication/app/src/main/res/values-w1240dp/dimens.xml deleted file mode 100644 index d73f4a359b5bbcb8fc1b5508036cee64621c0fc3..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/values-w1240dp/dimens.xml +++ /dev/null @@ -1,3 +0,0 @@ -<resources> - <dimen name="fab_margin">200dp</dimen> -</resources> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/values-w600dp/dimens.xml b/NoteApplication/app/src/main/res/values-w600dp/dimens.xml deleted file mode 100644 index 22d7f004329e4ff0529a55f37011a5ade468a19b..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/values-w600dp/dimens.xml +++ /dev/null @@ -1,3 +0,0 @@ -<resources> - <dimen name="fab_margin">48dp</dimen> -</resources> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/values/dimens.xml b/NoteApplication/app/src/main/res/values/dimens.xml deleted file mode 100644 index 4ab4520ffa990a8cd9759d59f22dce30cf158528..0000000000000000000000000000000000000000 --- a/NoteApplication/app/src/main/res/values/dimens.xml +++ /dev/null @@ -1,8 +0,0 @@ -<resources> - <!-- Default screen margins, per the Android Design guidelines. --> - <dimen name="activity_horizontal_margin">16dp</dimen> - <dimen name="activity_vertical_margin">16dp</dimen> - <dimen name="nav_header_vertical_spacing">8dp</dimen> - <dimen name="nav_header_height">176dp</dimen> - <dimen name="fab_margin">16dp</dimen> -</resources> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/values/strings.xml b/NoteApplication/app/src/main/res/values/strings.xml index 4e91b1b2efd0d803a46cd154ca23ecef93e9b72f..552bc47290e46ebed2f2af0d94a35d61d17e97fe 100644 --- a/NoteApplication/app/src/main/res/values/strings.xml +++ b/NoteApplication/app/src/main/res/values/strings.xml @@ -1,13 +1,3 @@ <resources> - <string name="app_name">NoteApplication</string> - <string name="navigation_drawer_open">Open navigation drawer</string> - <string name="navigation_drawer_close">Close navigation drawer</string> - <string name="nav_header_title">Android Studio</string> - <string name="nav_header_subtitle">android.studio@android.com</string> - <string name="nav_header_desc">Navigation header</string> - <string name="action_settings">Settings</string> - - <string name="menu_home">Home</string> - <string name="menu_gallery">Gallery</string> - <string name="menu_slideshow">Slideshow</string> + <string name="app_name">noteApplication</string> </resources> \ No newline at end of file diff --git a/NoteApplication/app/src/main/res/values/themes.xml b/NoteApplication/app/src/main/res/values/themes.xml index 0ead123d3ba59ec944704aed634fa00b6799ab2c..3cd00c5338d2096878f5e4088e21b32f8c02ebbb 100644 --- a/NoteApplication/app/src/main/res/values/themes.xml +++ b/NoteApplication/app/src/main/res/values/themes.xml @@ -13,10 +13,4 @@ <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> <!-- Customize your theme here. --> </style> - <style name="Theme.NoteApplication.NoActionBar"> - <item name="windowActionBar">false</item> - <item name="windowNoTitle">true</item> - </style> - <style name="Theme.NoteApplication.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/> - <style name="Theme.NoteApplication.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/> </resources> \ No newline at end of file diff --git a/NoteApplication/gradle/wrapper/gradle-wrapper.properties b/NoteApplication/gradle/wrapper/gradle-wrapper.properties index f4d8ad4b0d2cb440fe52a9c5229e86fe6af25f65..af22f5d8bbfa69fdb0cc3aaf81e9bfb0c1b2f751 100644 --- a/NoteApplication/gradle/wrapper/gradle-wrapper.properties +++ b/NoteApplication/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -#Wed Feb 02 10:48:42 EST 2022 +#Wed Feb 09 16:41:30 EST 2022 distributionBase=GRADLE_USER_HOME distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionPath=wrapper/dists diff --git a/NoteApplication/gradlew b/NoteApplication/gradlew old mode 100644 new mode 100755 diff --git a/NoteApplication/gradlew.bat b/NoteApplication/gradlew.bat index 107acd32c4e687021ef32db511e8a206129b88ec..ac1b06f93825db68fb0c0b5150917f340eaa5d02 100644 --- a/NoteApplication/gradlew.bat +++ b/NoteApplication/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/NoteApplication/settings.gradle b/NoteApplication/settings.gradle index f70633c774c06bf64946497d6acc91d64f2ac2af..75e8baad9b252107bd11c5c34bf1a796b16514ca 100644 --- a/NoteApplication/settings.gradle +++ b/NoteApplication/settings.gradle @@ -6,5 +6,5 @@ dependencyResolutionManagement { jcenter() // Warning: this repository is going to shut down soon } } -rootProject.name = "NoteApplication" +rootProject.name = "noteApplication" include ':app'