diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index d1be243..0140359 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - - + diff --git a/app/build.gradle b/app/build.gradle index 34e8ecd..602f35e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId "ru.plumsoftware.notebook" minSdk 27 targetSdk 33 - versionCode 11 - versionName "1.2.0" + versionCode 14 + versionName "1.2.6 - Bug-fix" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -34,14 +34,14 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'com.google.firebase:firebase-analytics:21.2.2' + implementation 'com.google.firebase:firebase-analytics:21.3.0' implementation 'com.google.firebase:firebase-messaging:23.1.2' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' //Yandex ads - implementation 'com.yandex.android:mobileads:5.8.0' + implementation 'com.yandex.android:mobileads:5.9.0' implementation 'com.yandex.android:mobmetricalib:5.2.0' //Glide diff --git a/app/release/app-release.apk b/app/release/app-release.apk index 659341c..efdc82d 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 24074cf..e900d64 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 9, - "versionName": "1.1.9-C", + "versionCode": 14, + "versionName": "1.2.6 - Bug-fix", "outputFile": "app-release.apk" } ], diff --git a/app/src/main/java/ru/plumsoftware/notebook/activities/AddNoteActivity.java b/app/src/main/java/ru/plumsoftware/notebook/activities/AddNoteActivity.java index 3d254fe..c393720 100644 --- a/app/src/main/java/ru/plumsoftware/notebook/activities/AddNoteActivity.java +++ b/app/src/main/java/ru/plumsoftware/notebook/activities/AddNoteActivity.java @@ -22,6 +22,7 @@ import android.widget.EditText; import android.widget.GridView; import android.widget.LinearLayout; +import android.widget.TextView; import android.widget.TimePicker; import android.widget.Toast; @@ -80,6 +81,7 @@ protected void onCreate(Bundle savedInstanceState) { EditText tvTitle = (EditText) findViewById(R.id.Title); EditText tvText = (EditText) findViewById(R.id.Text); cardViewBtnDone = (CardView) findViewById(R.id.cardBtnDoneUltra); + TextView textView5 = (TextView) findViewById(R.id.textView5); SQLiteDatabaseManager sqLiteDatabaseManager = new SQLiteDatabaseManager(this); sqLiteDatabaseNotes = sqLiteDatabaseManager.getWritableDatabase(); noteTime = System.currentTimeMillis(); @@ -99,6 +101,7 @@ protected void onCreate(Bundle savedInstanceState) { cardViewBtnDone.setCardBackgroundColor(color); tvTitle.setText(note.getNoteName()); tvText.setText(note.getNoteText()); + textView5.setText("РЕДАКТИРОВАТЬ"); } else { toolbar.setTitle("Добавить заметку"); toolbar.setSubtitle(new SimpleDateFormat("dd.MM.yyyy HH.mm", Locale.getDefault()).format(new Date(noteTime))); @@ -171,6 +174,8 @@ public void onClick(View view) { note.setOpacity(opacityRes); note.setAddNoteTime(noteTime); updateNote(note); +// deleteNote(noteTime); +// saveNote(noteTitle, text, opacityRes, color, noteTime); onBackPressed(); } else { saveNote(noteTitle, text, opacityRes, color, noteTime); @@ -230,7 +235,11 @@ private void updateNote(Note note) { contentValues.put(DatabaseConstants._IS_LIKED, note.getIsLiked()); contentValues.put(DatabaseConstants._IS_PINNED, note.getIsPinned()); contentValues.put(DatabaseConstants._ADD_NOTE_TIME, note.getAddNoteTime()); - sqLiteDatabaseNotes.update(DatabaseConstants._NOTES_TABLE_NAME, contentValues, DatabaseConstants._ADD_NOTE_TIME + " = ?", new String[]{Long.toString(note.getAddNoteTime())}); + sqLiteDatabaseNotes.update(DatabaseConstants._NOTES_TABLE_NAME, contentValues, DatabaseConstants._ID + " = ?", new String[]{String.valueOf(note.getId())}); + } + + private void deleteNote(long time) { + sqLiteDatabaseNotes.delete(DatabaseConstants._NOTES_TABLE_NAME, DatabaseConstants._ADD_NOTE_TIME + "= ?", new String[]{String.valueOf(time)}); } @SuppressLint("NonConstantResourceId") diff --git a/build.gradle b/build.gradle index a488832..c01351d 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,8 @@ buildscript { } }// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.4.2' apply false - id 'com.android.library' version '7.4.2' apply false + id 'com.android.application' version '8.0.2' apply false + id 'com.android.library' version '8.0.2' apply false } task clean(type: Delete) { diff --git a/gradle.properties b/gradle.properties index 33555ef..7242c9d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,6 @@ android.useAndroidX=true # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index cfdd66e..5ca382b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Sep 29 00:05:39 GMT+06:00 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/private_key.pepk b/private_key.pepk index b4eddb7..dd6e5e0 100644 Binary files a/private_key.pepk and b/private_key.pepk differ diff --git a/release/app-release.aab b/release/app-release.aab new file mode 100644 index 0000000..28b4e8b Binary files /dev/null and b/release/app-release.aab differ diff --git a/release/app-release.apk b/release/app-release.apk index 8c7f2a2..98c03f2 100644 Binary files a/release/app-release.apk and b/release/app-release.apk differ diff --git a/release/output-metadata.json b/release/output-metadata.json index 020c70e..4187f8a 100644 --- a/release/output-metadata.json +++ b/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 11, - "versionName": "1.2.0", + "versionCode": 13, + "versionName": "1.2.5 - Bug-fix", "outputFile": "app-release.apk" } ], diff --git a/release/release/app-release.aab b/release/release/app-release.aab index e81e752..543a1cf 100644 Binary files a/release/release/app-release.aab and b/release/release/app-release.aab differ