Skip to content

Commit a67f567

Browse files
committed
Updated dependencies
1 parent 78b950a commit a67f567

18 files changed

+82
-86
lines changed

CONTRIBUTORS.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
17. 🇫🇷 French by Arnaud Dieumegard
1919
18. 🇧🇷 Portuguese (Brazil) by [fabianski7](https://github.com/fabianski7)
2020
19. 🇵🇹 Portuguese (Portugal) by [joaopmatos](https://github.com/joaopmatos)
21-
20. 🇳🇴 Norwegian by Fredrik Magnussen
22-
21. 🇵🇭 Tagalog by Isaiah Collins Abetong
23-
22. 🇨🇳 Chinese (Simplified) by [Austin Huang](https://github.com/austinhuang0131)
24-
23. 🇩🇪 German by Maximilian Braunschmied, [jonas-haeusler](https://github.com/jonas-haeusler)
21+
20. 🇳🇴 Norwegian (Bokmål) by Fredrik Magnussen, [Erik Thom](https://github.com/erikthm)
22+
21. 🇳🇴 Norwegian (Nynorsk) by [Erik Thom](https://github.com/erikthm)
23+
22. 🇵🇭 Tagalog by Isaiah Collins Abetong
24+
23. 🇨🇳 Chinese (Simplified) by [Austin Huang](https://github.com/austinhuang0131)
25+
24. 🇩🇪 German by Maximilian Braunschmied, [jonas-haeusler](https://github.com/jonas-haeusler), [samuel141](https://github.com/samuel141)

README.md

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
### Background
2-
Although there are many notes apps out there, they're all hideous, glitchy, low quality or all 3 at the same time.
3-
4-
Maybe the developer views developing a beautiful user interface as the realm of _lowly_ designers. Maybe he just doesn't care.
5-
6-
Well, Notally is none of these things. It's extremely light, minimalistic and elegant. There are minimal dependencies and lines of code. (All without compromising on readability)
2+
Notally was created because I wanted to make something that was beautiful and at the same time, useful. It's extremely light, there are minimal dependencies and lines of code. (All without compromising on readability)
73

84
### Features
95
* Auto save
10-
* Dark mode
11-
* Material design
126
* No permissions required
13-
* Create lists to stay on track
147
* Support for Lollipop devices and up
8+
* Label your notes for quick organisation
159
* Pin notes to always keep them at the top
1610
* APK size of 1.3 MB (1.7 MB uncompressed)
17-
* Add labels to your notes for quick organisation
1811
* Archive notes to keep them around, but out of your way
19-
* Export notes as plain text, XML, JSON, HTML or PDF files with formatting
12+
* Export notes as TXT, XML, JSON, HTML or PDF files with formatting
2013
* Create rich text notes with support for bold, italics, mono space and strike-through
2114
* Add clickable links to notes with support for phone numbers, email addresses and web urls
2215

2316
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="Get it on Google Play" height="70"/>](https://play.google.com/store/apps/details?id=com.omgodse.notally)
2417
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="70"/>](https://f-droid.org/packages/com.omgodse.notally/)
2518

2619
### Translations
27-
All [translations](CONTRIBUTORS.md) are crowd sourced. To contribute or point out any errors, please contact me via [email](mailto:omgodseapps@gmail.com) or open a pull request.
20+
All translations are crowd sourced. To contribute or point out any errors, please email me or open a pull request.
2821

2922
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" width="250"/><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" width="250"/><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" width="250"/>

app/build.gradle

+9-11
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ android {
1212
applicationId "com.omgodse.notally"
1313
minSdk 21
1414
targetSdk 30
15-
versionCode 40
16-
versionName "4.5"
17-
resConfigs "en", "ca", "cs", "da", "de", "es", "fr", "hu", "in", "it", "ja", "nb", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "sk", "sv", "tl", "tr", "uk", "zh-rCN"
15+
versionCode 41
16+
versionName "4.6"
17+
resConfigs "en", "ca", "cs", "da", "de", "es", "fr", "hu", "in", "it", "ja", "nb", "nl", "nn", "pl", "pt-rBR", "pt-rPT", "ru", "sk", "sv", "tl", "tr", "uk", "zh-rCN"
1818
vectorDrawables.generatedDensities = []
1919
}
2020

@@ -37,26 +37,24 @@ android {
3737

3838
buildFeatures { viewBinding true }
3939

40-
packagingOptions {
41-
exclude "DebugProbesKt.bin"
42-
exclude "META-INF/**.version"
43-
exclude "kotlin/**.kotlin_builtins"
40+
packagingOptions.resources {
41+
excludes += ["DebugProbesKt.bin", "META-INF/**.version", "kotlin/**.kotlin_builtins", "kotlin-tooling-metadata.json"]
4442
}
4543
}
4644

4745
dependencies {
4846
final def navVersion = "2.3.5"
49-
final def roomVersion = "2.3.0"
47+
final def roomVersion = "2.4.1"
5048

5149
implementation "androidx.preference:preference-ktx:1.1.1"
5250

5351
kapt "androidx.room:room-compiler:$roomVersion"
5452
implementation "androidx.room:room-ktx:$roomVersion"
5553
implementation "androidx.room:room-runtime:$roomVersion"
5654

57-
implementation "androidx.navigation:navigation-ui:$navVersion"
58-
implementation "androidx.navigation:navigation-fragment:$navVersion"
55+
implementation "androidx.navigation:navigation-ui-ktx:$navVersion"
56+
implementation "androidx.navigation:navigation-fragment-ktx:$navVersion"
5957

6058
implementation "org.ocpsoft.prettytime:prettytime:4.0.6.Final"
6159
implementation "com.google.android.material:material:1.4.0"
62-
}
60+
}

app/src/main/java/com/omgodse/notally/activities/MainActivity.kt

+22-25
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ import androidx.activity.viewModels
66
import androidx.appcompat.app.AppCompatActivity
77
import androidx.core.view.GravityCompat
88
import androidx.core.view.isVisible
9-
import androidx.core.widget.addTextChangedListener
9+
import androidx.core.widget.doAfterTextChanged
1010
import androidx.drawerlayout.widget.DrawerLayout
11-
import androidx.navigation.*
11+
import androidx.navigation.NavController
12+
import androidx.navigation.NavDestination
1213
import androidx.navigation.fragment.NavHostFragment
14+
import androidx.navigation.navOptions
1315
import androidx.navigation.ui.AppBarConfiguration
14-
import androidx.navigation.ui.NavigationUI
16+
import androidx.navigation.ui.navigateUp
17+
import androidx.navigation.ui.setupActionBarWithNavController
1518
import com.omgodse.notally.R
1619
import com.omgodse.notally.databinding.ActivityMainBinding
1720
import com.omgodse.notally.viewmodels.BaseNoteModel
@@ -25,7 +28,7 @@ class MainActivity : AppCompatActivity() {
2528
private val model: BaseNoteModel by viewModels()
2629

2730
override fun onSupportNavigateUp(): Boolean {
28-
return NavigationUI.navigateUp(navController, configuration)
31+
return navController.navigateUp(configuration)
2932
}
3033

3134
override fun onCreate(savedInstanceState: Bundle?) {
@@ -42,10 +45,8 @@ class MainActivity : AppCompatActivity() {
4245
private fun setupNavigation() {
4346
val navHostFragment = supportFragmentManager.findFragmentById(R.id.NavHostFragment) as NavHostFragment
4447
navController = navHostFragment.navController
45-
configuration = AppBarConfiguration.Builder(binding.NavigationView.menu)
46-
.setOpenableLayout(binding.DrawerLayout)
47-
.build()
48-
NavigationUI.setupActionBarWithNavController(this, navController, configuration)
48+
configuration = AppBarConfiguration(binding.NavigationView.menu, binding.DrawerLayout)
49+
setupActionBarWithNavController(navController, configuration)
4950

5051
var fragmentIdToLoad: Int? = null
5152
binding.NavigationView.setNavigationItemSelectedListener { item ->
@@ -54,26 +55,23 @@ class MainActivity : AppCompatActivity() {
5455
return@setNavigationItemSelectedListener true
5556
}
5657

57-
binding.DrawerLayout.addDrawerListener(object : DrawerLayout.DrawerListener {
58-
override fun onDrawerOpened(drawerView: View) {}
58+
binding.DrawerLayout.addDrawerListener(object : DrawerLayout.SimpleDrawerListener() {
5959

6060
override fun onDrawerClosed(drawerView: View) {
6161
if (fragmentIdToLoad != null && navController.currentDestination?.id != fragmentIdToLoad) {
62-
val options = NavOptions.Builder()
63-
.setLaunchSingleTop(true)
64-
.setExitAnim(R.anim.nav_default_exit_anim)
65-
.setEnterAnim(R.anim.nav_default_enter_anim)
66-
.setPopExitAnim(R.anim.nav_default_pop_exit_anim)
67-
.setPopEnterAnim(R.anim.nav_default_pop_enter_anim)
68-
.setPopUpTo(navController.graph.startDestination, false)
69-
.build()
62+
val options = navOptions {
63+
launchSingleTop = true
64+
anim {
65+
exit = R.anim.nav_default_exit_anim
66+
enter = R.anim.nav_default_enter_anim
67+
popExit = R.anim.nav_default_pop_exit_anim
68+
popEnter = R.anim.nav_default_pop_enter_anim
69+
}
70+
popUpTo(navController.graph.startDestination) { inclusive = false }
71+
}
7072
navController.navigate(requireNotNull(fragmentIdToLoad), null, options)
7173
}
7274
}
73-
74-
override fun onDrawerStateChanged(newState: Int) {}
75-
76-
override fun onDrawerSlide(drawerView: View, slideOffset: Float) {}
7775
})
7876

7977
navController.addOnDestinationChangedListener { controller, destination, arguments ->
@@ -91,11 +89,10 @@ class MainActivity : AppCompatActivity() {
9189
binding.EnterSearchKeyword.isVisible = (destination.id == R.id.Search)
9290
}
9391

94-
9592
private fun setupSearch() {
9693
binding.EnterSearchKeyword.setText(model.keyword)
97-
binding.EnterSearchKeyword.addTextChangedListener(onTextChanged = { text, start, count, after ->
94+
binding.EnterSearchKeyword.doAfterTextChanged { text ->
9895
model.keyword = text?.trim()?.toString() ?: String()
99-
})
96+
}
10097
}
10198
}

app/src/main/java/com/omgodse/notally/activities/NotallyActivity.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ abstract class NotallyActivity : AppCompatActivity(), OperationsParent {
3333
}
3434

3535
override fun onSaveInstanceState(outState: Bundle) {
36-
model.saveNote { super.onSaveInstanceState(outState) }
36+
super.onSaveInstanceState(outState)
37+
model.saveNote {}
3738
}
3839

3940

app/src/main/java/com/omgodse/notally/fragments/Labels.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ package com.omgodse.notally.fragments
22

33
import android.os.Bundle
44
import android.view.*
5-
import androidx.core.os.bundleOf
65
import androidx.core.view.isVisible
76
import androidx.fragment.app.Fragment
87
import androidx.fragment.app.activityViewModels
9-
import androidx.navigation.fragment.NavHostFragment
8+
import androidx.navigation.fragment.findNavController
109
import androidx.recyclerview.widget.DividerItemDecoration
1110
import androidx.recyclerview.widget.LinearLayoutManager
1211
import androidx.recyclerview.widget.RecyclerView
@@ -64,8 +63,9 @@ class Labels : Fragment(), ItemListener {
6463

6564
override fun onClick(position: Int) {
6665
adapter?.currentList?.get(position)?.let { value ->
67-
val bundle = bundleOf(Constants.SelectedLabel to value)
68-
NavHostFragment.findNavController(this).navigate(R.id.LabelsToDisplayLabel, bundle)
66+
val bundle = Bundle()
67+
bundle.putString(Constants.SelectedLabel, value)
68+
findNavController().navigate(R.id.LabelsToDisplayLabel, bundle)
6969
}
7070
}
7171

@@ -80,10 +80,10 @@ class Labels : Fragment(), ItemListener {
8080

8181

8282
private fun setupObserver() {
83-
model.labels.observe(viewLifecycleOwner, { labels ->
83+
model.labels.observe(viewLifecycleOwner) { labels ->
8484
adapter?.submitList(labels)
8585
binding?.RecyclerView?.isVisible = labels.isNotEmpty()
86-
})
86+
}
8787
}
8888

8989

app/src/main/java/com/omgodse/notally/fragments/NotallyFragment.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ abstract class NotallyFragment : Fragment(), OperationsParent, ItemListener {
119119

120120

121121
private fun setupObserver() {
122-
getObservable().observe(viewLifecycleOwner, { list ->
122+
getObservable().observe(viewLifecycleOwner) { list ->
123123
adapter?.submitList(list)
124124
binding?.RecyclerView?.isVisible = list.isNotEmpty()
125-
})
125+
}
126126
}
127127

128128
private fun setupRecyclerView() {

app/src/main/java/com/omgodse/notally/fragments/Notes.kt

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import android.os.Bundle
44
import android.view.Menu
55
import android.view.MenuInflater
66
import android.view.View
7-
import androidx.navigation.fragment.NavHostFragment
7+
import androidx.navigation.fragment.findNavController
88
import com.omgodse.notally.MenuDialog
99
import com.omgodse.notally.R
1010
import com.omgodse.notally.activities.MainActivity
@@ -24,9 +24,7 @@ class Notes : NotallyFragment() {
2424
}
2525

2626
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
27-
menu.add(R.string.search, R.drawable.search) {
28-
NavHostFragment.findNavController(this).navigate(R.id.NotesToSearch)
29-
}
27+
menu.add(R.string.search, R.drawable.search) { findNavController().navigate(R.id.NotesToSearch) }
3028
}
3129

3230

app/src/main/java/com/omgodse/notally/fragments/Settings.kt

+12-6
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ class Settings : PreferenceFragmentCompat() {
5252
about.addPreference(libraries)
5353
about.addPreference(rate)
5454

55-
screen.forEach { preference ->
56-
preference.isIconSpaceReserved = false
57-
if (preference is PreferenceGroup) {
58-
preference.forEach { child -> child.isIconSpaceReserved = false }
59-
}
60-
}
55+
disableIconSpace(screen)
6156

6257
preferenceScreen = screen
6358

@@ -100,6 +95,17 @@ class Settings : PreferenceFragmentCompat() {
10095
}
10196

10297

98+
private fun disableIconSpace(group: PreferenceGroup) {
99+
for (index in 0 until group.preferenceCount) {
100+
val preference = group.getPreference(index)
101+
preference.isIconSpaceReserved = false
102+
if (preference is PreferenceGroup) {
103+
disableIconSpace(preference)
104+
}
105+
}
106+
}
107+
108+
103109
private fun exportBackup() {
104110
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT)
105111
intent.type = "text/xml"

app/src/main/res/layout/activity_main.xml

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
android:theme="@style/PrimarySecondarySwap"
6363
app:headerLayout="@layout/drawer_header"
6464
app:itemIconTint="@color/navigation_view_item"
65-
app:itemTextAppearance="?attr/textAppearanceButton"
6665
app:itemTextColor="@color/navigation_view_item"
6766
app:menu="@menu/navigation" />
6867

app/src/main/res/layout/activity_make_list.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
android:paddingEnd="20dp"
6161
android:paddingBottom="12dp"
6262
android:text="@string/add_item"
63-
android:textAppearance="?attr/textAppearanceButton"
63+
android:textAppearance="?textAppearanceSubtitle2"
6464
android:textColor="?android:textColorHint"
6565
app:drawableStartCompat="@drawable/add"
6666
app:drawableTint="?android:textColorHint" />

app/src/main/res/layout/menu_item.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
android:drawablePadding="24dp"
88
android:gravity="center_vertical"
99
android:padding="16dp"
10-
android:textAppearance="?attr/textAppearanceButton"
11-
app:drawableTint="?attr/colorOnSurface" />
10+
android:textAppearance="?textAppearanceSubtitle2"
11+
app:drawableTint="?colorOnSurface" />

app/src/main/res/layout/recycler_header.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
android:paddingTop="8dp"
77
android:paddingEnd="20dp"
88
android:paddingBottom="8dp"
9-
android:textAppearance="?attr/textAppearanceButton"
10-
android:textColor="?attr/colorSecondary" />
9+
android:textAppearance="?textAppearanceSubtitle2"
10+
android:textColor="?colorSecondary" />

app/src/main/res/layout/recycler_label.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
android:ellipsize="end"
77
android:maxLines="1"
88
android:padding="16dp"
9-
android:textAppearance="?attr/textAppearanceBody1" />
9+
android:textAppearance="?textAppearanceBody1" />

app/src/main/res/values/styles.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77

88
<item name="windowActionModeOverlay">true</item>
99

10-
<item name="textAppearanceButton">@style/TextAppearance.Button</item>
10+
<item name="textAppearanceButton">@style/TextAppearance.Subtitle2</item>
11+
<item name="textAppearanceSubtitle2">@style/TextAppearance.Subtitle2</item>
1112
<!-- Menu Items, EditTexts, Dialog Titles -->
1213
<item name="textAppearanceSubtitle1">@style/TextAppearance.Subtitle1</item>
1314

1415
<!-- Required for the Settings page to look good -->
15-
<item name="preferenceCategoryTitleTextAppearance">?attr/textAppearanceButton</item>
16+
<item name="preferenceCategoryTitleTextAppearance">?attr/textAppearanceSubtitle2</item>
1617
<item name="android:textAppearanceListItem">?attr/textAppearanceBody1</item>
1718
<item name="android:textAppearanceListItemSecondary">?attr/textAppearanceBody2</item>
1819

@@ -33,11 +34,6 @@
3334
</style>
3435

3536

36-
<style name="TextAppearance.Button" parent="TextAppearance.MaterialComponents.Button">
37-
<item name="android:textAllCaps">false</item>
38-
<item name="android:letterSpacing">0.02</item>
39-
</style>
40-
4137
<style name="TextAppearance.Toolbar" parent="TextAppearance.MaterialComponents.Headline6">
4238
<item name="android:textSize">18sp</item>
4339
<item name="android:letterSpacing">0.02</item>
@@ -47,6 +43,10 @@
4743
<item name="android:letterSpacing">0.02</item>
4844
</style>
4945

46+
<style name="TextAppearance.Subtitle2" parent="TextAppearance.MaterialComponents.Subtitle2">
47+
<item name="android:letterSpacing">0.02</item>
48+
</style>
49+
5050

5151
<style name="Preview" parent="Widget.AppCompat.TextView">
5252
<item name="android:paddingBottom">16dp</item>

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77

88
dependencies {
99
classpath "com.android.tools.build:gradle:7.0.4"
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
10+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
1111
}
1212
}
1313

0 commit comments

Comments
 (0)