Skip to content

Commit

Permalink
Updated version code for v5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
OmGodse committed Mar 3, 2023
1 parent ced51bc commit 11c0439
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 70 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
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. (Without compromising on readability)

### Features
* Auto backup
* Adjustable text size
* No permissions required
* Support for Lollipop devices and up
* APK size of 1.2 MB (1.6 MB uncompressed)
* Color, pin and label your notes for quick organisation
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "com.omgodse.notally"
minSdk 21
targetSdk 32
versionCode 46
versionName "5.1"
versionCode 47
versionName "5.2"
resConfigs "en", "ca", "cs", "da", "de", "el", "es", "fr", "hu", "in", "it", "ja", "nb", "nl", "nn", "pl", "pt-rBR", "pt-rPT", "ru", "sk", "sv", "tl", "tr", "uk", "vi", "zh-rCN"
vectorDrawables.generatedDensities = []
}
Expand Down
63 changes: 24 additions & 39 deletions app/src/main/java/com/omgodse/notally/activities/NotallyActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.content.res.ColorStateList
import android.os.Build
import android.os.Bundle
import android.util.TypedValue
import android.view.Menu
import android.view.MenuItem
import android.view.View
import androidx.activity.viewModels
Expand Down Expand Up @@ -45,7 +44,6 @@ abstract class NotallyActivity(private val type: Type) : AppCompatActivity() {
super.onCreate(savedInstanceState)
initialiseBinding()
setContentView(binding.root)
setupToolbar()

if (model.isFirstInstance) {
val selectedBaseNote = intent.getParcelableExtra<BaseNote>(Constants.SelectedBaseNote)
Expand All @@ -61,45 +59,12 @@ abstract class NotallyActivity(private val type: Type) : AppCompatActivity() {
model.isFirstInstance = false
}

setupToolbar()
setupListeners()
setStateFromModel()
}


override fun onCreateOptionsMenu(menu: Menu?): Boolean {
if (menu != null) {
val pin = menu.add(R.string.pin, R.drawable.pin) { item -> pin(item) }
bindPinned(pin)

menu.add(R.string.share, R.drawable.share) { share() }
menu.add(R.string.labels, R.drawable.label) { label() }

when (model.folder) {
Folder.NOTES -> {
menu.add(R.string.delete, R.drawable.delete) { delete() }
menu.add(R.string.archive, R.drawable.archive) { archive() }
}
Folder.DELETED -> {
menu.add(R.string.restore, R.drawable.restore) { restore() }
menu.add(R.string.delete_forever, R.drawable.delete) { deleteForever() }
}
Folder.ARCHIVED -> {
menu.add(R.string.delete, R.drawable.delete) { delete() }
menu.add(R.string.unarchive, R.drawable.unarchive) { restore() }
}
}
}
return super.onCreateOptionsMenu(menu)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) {
onBackPressed()
}
return super.onOptionsItemSelected(item)
}


open fun receiveSharedNote() {}

open fun setupListeners() {
Expand Down Expand Up @@ -179,9 +144,29 @@ abstract class NotallyActivity(private val type: Type) : AppCompatActivity() {


private fun setupToolbar() {
setSupportActionBar(binding.Toolbar)
supportActionBar?.title = null
supportActionBar?.setDisplayHomeAsUpEnabled(true)
binding.Toolbar.setNavigationOnClickListener { onBackPressed() }

val menu = binding.Toolbar.menu
val pin = menu.add(R.string.pin, R.drawable.pin) { item -> pin(item) }
bindPinned(pin)

menu.add(R.string.share, R.drawable.share) { share() }
menu.add(R.string.labels, R.drawable.label) { label() }

when (model.folder) {
Folder.NOTES -> {
menu.add(R.string.delete, R.drawable.delete) { delete() }
menu.add(R.string.archive, R.drawable.archive) { archive() }
}
Folder.DELETED -> {
menu.add(R.string.restore, R.drawable.restore) { restore() }
menu.add(R.string.delete_forever, R.drawable.delete) { deleteForever() }
}
Folder.ARCHIVED -> {
menu.add(R.string.delete, R.drawable.delete) { delete() }
menu.add(R.string.unarchive, R.drawable.unarchive) { restore() }
}
}
}

private fun initialiseBinding() {
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_notally.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/Toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
app:navigationIcon="?attr/homeAsUpIndicator" />

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
Expand All @@ -34,7 +35,7 @@
android:paddingStart="24dp"
android:paddingTop="16dp"
android:paddingEnd="24dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6" />
android:textAppearance="?attr/textAppearanceHeadline6" />

<TextView
android:id="@+id/DateCreated"
Expand Down
11 changes: 5 additions & 6 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<!-- Fragment Titles -->
<string name="notes">Poznámky</string>
<string name="labels">Štítky</string>
Expand Down Expand Up @@ -88,7 +87,7 @@

<string name="date_format">Formát data</string>
<string name="none">Žádné</string>

<string name="text_size">Velikost písma</string>
<string name="small">Malé</string>
<string name="medium">Střední</string>
Expand All @@ -99,21 +98,21 @@
<string name="max_lines_to_display">Max. počet položek v poznámce</string>

<string name="backup">Zálohování</string>
<!-- Auto backup -->

<!-- Auto backup -->
<string name="auto_backup">Automatická záloha</string>
<string name="tap_to_set_up">Nastavit klepnutím sem</string>
<string name="notes_will_be">Poznámky budou každý den zálohovány do interního uložiště telefonu.\n\nPokud máte zapnutý úsporný režim, nemusí to fungovat.</string>
<string name="choose_folder">Vybrat složku</string>
<string name="disable_auto_backup">Zakázat automatickou zálohu</string>
<string name="choose_another_folder">Vybrat jinou složku</string>
<string name="cant_find_folder">Složka nebyla nalezena. Možná byla přesunuta nebo smazána.</string>

<string name="export_backup">Exportovat zálohu</string>
<string name="import_backup">Importovat zálohu</string>

<string name="about">O aplikaci</string>
<string name="libraries">Knihovny</string>
<string name="rate">Ohodnotit aplikaci</string>
<string name="send_feedback">Odeslat zpětnou vazbu</string>
</resources>
</resources>
8 changes: 4 additions & 4 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

<string name="date_format">Datumsformat</string>
<string name="none">Keines</string>

<string name="text_size">Textgröße</string>
<string name="small">Klein</string>
<string name="medium">Mittel</string>
Expand All @@ -98,7 +98,7 @@
<string name="max_lines_to_display">Maximal angezeigte Zeilen</string>

<string name="backup">Sichern und Wiederherstellen</string>

<!-- Auto backup -->
<string name="auto_backup">Automatische Sicherung</string>
<string name="tap_to_set_up">Zum Einrichten antippen</string>
Expand All @@ -107,12 +107,12 @@
<string name="disable_auto_backup">Automatische Sicherung deaktivieren</string>
<string name="choose_another_folder">Anderen Ordner wählen</string>
<string name="cant_find_folder">Kann den Ordner nicht finden. Er kann verschoben oder gelöscht worden sein</string>

<string name="export_backup">Notizen sichern</string>
<string name="import_backup">Notizen wiederherstellen</string>

<string name="about">Über</string>
<string name="libraries">Bibliotheken</string>
<string name="rate">App bewerten</string>
<string name="send_feedback">Feedback senden</string>
</resources>
</resources>
8 changes: 4 additions & 4 deletions app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

<string name="date_format">Format daty</string>
<string name="none">Brak</string>

<string name="text_size">Rozmiar tekstu</string>
<string name="small">Mały</string>
<string name="medium">Średni</string>
Expand All @@ -98,10 +98,10 @@
<string name="max_lines_to_display">Maksymalna ilość linii w notatce do pokazania</string>

<string name="backup">Kopia</string>

<!-- Auto backup -->
<string name="auto_backup">Automatyczna kopia zapasowa</string>
<string name="tap_to_set_up">Dotknij, aby ustawić/string>
<string name="tap_to_set_up">Dotknij, aby ustawić</string>
<string name="notes_will_be">Notatki będą codziennie zapisywane w wewnętrznej pamięci telefonu.\n\nTo może nie działać, jeśli masz włączony tryb oszczędzania energii.</string>
<string name="choose_folder">Wybierz katalog</string>
<string name="disable_auto_backup">Wyłącz automatyczną kopię zapasową</string>
Expand All @@ -115,4 +115,4 @@
<string name="libraries">Biblioteki</string>
<string name="rate">Oceń aplikację</string>
<string name="send_feedback">Wyślij opinię</string>
</resources>
</resources>
15 changes: 6 additions & 9 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>


<!-- Fragment Titles -->
<string name="notes">笔记</string>
<string name="labels">标签</string>
Expand Down Expand Up @@ -88,18 +87,18 @@

<string name="date_format">日期格式</string>
<string name="none">无</string>

<string name="text_size">文本大小</string>
<string name="small">小</string>
<string name="medium">中</string>
<string name="large">大</string>

<string name="content_density">内容密度</string>
<string name="max_items_to_display">列表最多显示多少条目</string>
<string name="max_lines_to_display">笔记最多显示几行</string>

<string name="backup">备份</string>

<!-- Auto backup -->
<string name="auto_backup">自动备份</string>
<string name="tap_to_set_up">轻按进行设置</string>
Expand All @@ -108,14 +107,12 @@
<string name="disable_auto_backup">禁用自动备份</string>
<string name="choose_another_folder">选择另一个文件夹</string>
<string name="cant_find_folder">找不到该文件夹。可能被移动或删除了。</string>

<string name="export_backup">导出备份</string>
<string name="import_backup">导入备份</string>

<string name="about">关于</string>
<string name="libraries">库</string>
<string name="rate">给应用打分</string>
<string name="send_feedback">发送反馈</string>


</resources>
</resources>
6 changes: 5 additions & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@
</style>


<style name="TextAppearance.Headline6" parent="TextAppearance.MaterialComponents.Headline6">
<style name="TextAppearance.Headline6.Toolbar">
<item name="android:textSize">18sp</item>
</style>

<style name="TextAppearance.Headline6" parent="TextAppearance.MaterialComponents.Headline6">
<item name="android:letterSpacing">0.02</item>
</style>

Expand All @@ -48,6 +51,7 @@

<style name="Toolbar" parent="Widget.MaterialComponents.Toolbar.Surface">
<item name="android:elevation">4dp</item>
<item name="titleTextAppearance">@style/TextAppearance.Headline6.Toolbar</item>
</style>


Expand Down
5 changes: 5 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/47.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Updated Czech, Polish, Chinese (Simplified) and German translations

Removed the ACCESS NETWORK STATE permission which had been added automatically by the auto backup library. No user data was being collected.

Instead of going through a dialog, notes can now be directly created from the home page.
3 changes: 1 addition & 2 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ Add clickable links to notes with support for phone numbers, email addresses and

• Dark mode
• Completely free
• Auto save and backup
• Adjustable text size
No permissions required
Auto save and backup
• APK size of 1.2 MB (1.6 MB uncompressed)

<b>Privacy</b>
Expand Down

0 comments on commit 11c0439

Please sign in to comment.