Text Basic 2.0.1: added a force save button

This commit is contained in:
denizk0461
2023-05-19 11:15:04 +02:00
parent 447ca4ecb2
commit c552c584b4
8 changed files with 58 additions and 18 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ android {
applicationId "com.denizk0461.textbasic"
minSdk 23
targetSdk 33
versionCode 7
versionName "2.0.0"
versionCode 9
versionName "2.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
+1 -1
View File
@@ -11,7 +11,7 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 6,
"versionCode": 8,
"versionName": "2.0.0",
"outputFile": "app-release.apk"
}
@@ -43,6 +43,14 @@ class QuoteFragment : BaseFragment(R.layout.fragment_quote), QuoteAdapter.OnDele
}
}
binding.buttonSave.setOnClickListener {
save()
context.theme.showSnackBar(
binding.coordinatorLayout,
getString(R.string.quote_fragment_force_save),
)
}
binding.fabAddQuote.setOnClickListener {
quoteAdapter.addNewQuote()
}
+5
View File
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
</vector>
+1 -2
View File
@@ -37,10 +37,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
ads:adUnitId="ca-app-pub-6028283326987089/7147449316"
ads:layout_constraintBottom_toBottomOf="parent"
ads:layout_constraintStart_toStartOf="parent"
ads:layout_constraintEnd_toEndOf="parent"/>
<!-- ads:adUnitId="ca-app-pub-6028283326987089/7147449316"-->
</androidx.constraintlayout.widget.ConstraintLayout>
+28 -2
View File
@@ -13,18 +13,44 @@
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp">
<TextView
android:id="@+id/app_title_bar"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/quote_fragment_title"
android:textSize="28sp"
android:fontFamily="@font/mono_bold_italic"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/button_save"
app:layout_scrollFlags="scroll|exitUntilCollapsed"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.Material3.Button.IconButton.Outlined"
android:id="@+id/button_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
app:icon="@drawable/save"
app:iconPadding="0dp"
app:strokeColor="?attr/colorOutlineVariant"
app:layout_constraintTop_toTopOf="@id/app_title_bar"
app:layout_constraintBottom_toBottomOf="@id/app_title_bar"
app:layout_constraintEnd_toEndOf="parent"
app:iconTint="?attr/colorOnSurfaceVariant"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
+2 -1
View File
@@ -20,6 +20,7 @@
<string name="quote_fragment_fab_add">Eintrag hinzufügen</string>
<string name="quote_fragment_snack_text">Eintrag wurde gelöscht</string>
<string name="quote_fragment_snack_undo">Rückgängig</string>
<string name="quote_fragment_force_save">Einträge wurden gespeichert!</string>
<string name="guide_fragment_title">Anleitung</string>
@@ -101,5 +102,5 @@
<string name="bold">Fett</string>
<string name="italics">Kursiv</string>
<string name="bold_italics">Fett &amp; kursiv</string>
<string name="guide1"><i>Text Basic</i> ist eine einfache App, um einen beliebigen Text auf deinem Startbildschirm darzustellen! Füge einfach das <i>Text Basic</i>-Widget auf deinem Startbildschirm hinzu, gib Text in die App ein, und der Text wird auf deinem Bildschirm angezeigt.\n\n<b>Wechsle zwischen Texten:</b> In der App kannst du beliebig viele Texte eingeben, indem du den [+]-Knopf drückst und deinen Text in das neu aufgetauchte Feld eingibst. Alle Texte werden automatisch gespeichert, du musst nichts weiteres tun.\nDu kannst zwischen deinen Texten wechseln, indem du auf deinem Startbildschirm auf das Widget klickst. Die Texte werden in der Reihenfolge angezeigt, in der du sie eingegeben hast, du kannst jedoch \"zufällige Reihenfolge\" in den App-Einstellungen aktivieren, um eine willkürliche Reihenfolge zu nutzen.\nHINWEIS: Sollte das Wechseln zwischen Texten nicht klappen, so versuche bitte, das Widget zu vergrößern und wieder zu verkleinern. Danach sollte der Fehler behoben sein.\n\n<b>Verändere den Look:</b> Du kannst verändern, wie der Text aussieht, indem du in die App-Einstellungen schaust dort findest du Optionen für verschiedene Schriftarten und -größen, du kannst die Position bearbeiten sowie den Textstil, und du kannst einen Hintergrund, Umriss, oder Schatten hinzufügen.</string>
<string name="guide1"><i>Text Basic</i> ist eine einfache App, um einen beliebigen Text auf deinem Startbildschirm darzustellen! Füge einfach das <i>Text Basic</i>-Widget auf deinem Startbildschirm hinzu, gib Text in die App ein, und der Text wird auf deinem Bildschirm angezeigt.\n\n<b>Wechsle zwischen Texten:</b> In der App kannst du beliebig viele Texte eingeben, indem du den [+]-Knopf drückst und deinen Text in das neu aufgetauchte Feld eingibst. Alle Texte werden automatisch gespeichert, aber du kannst gerne den \'Speichern\'-Knopf oben rechts drücken, um sicherzustellen, dass deine Einträge gespeichert werden.\nDu kannst zwischen deinen Texten wechseln, indem du auf deinem Startbildschirm auf das Widget klickst. Die Texte werden in der Reihenfolge angezeigt, in der du sie eingegeben hast, du kannst jedoch \"zufällige Reihenfolge\" in den App-Einstellungen aktivieren, um eine willkürliche Reihenfolge zu nutzen.\nHINWEIS: Sollte das Wechseln zwischen Texten nicht klappen, so versuche bitte, das Widget zu vergrößern und wieder zu verkleinern. Danach sollte der Fehler behoben sein.\n\n<b>Verändere den Look:</b> Du kannst verändern, wie der Text aussieht, indem du in die App-Einstellungen schaust dort findest du Optionen für verschiedene Schriftarten und -größen, du kannst die Position bearbeiten sowie den Textstil und die Farben, und du kannst einen Hintergrund, Umriss, oder Schatten hinzufügen.</string>
</resources>
+3 -2
View File
@@ -19,6 +19,7 @@
<string name="quote_fragment_fab_add">Add entry</string>
<string name="quote_fragment_snack_text">Entry has been deleted</string>
<string name="quote_fragment_snack_undo">Undo</string>
<string name="quote_fragment_force_save">Entries have been saved!</string>
<string name="guide_fragment_title">Guide</string>
@@ -109,9 +110,9 @@
<string name="bold_italics">Bold &amp; Italics</string>
<string name="guide1"><i>Text Basic</i> is a simple app for displaying a text on your home screen! Just add the <i>Text Basic</i> widget to your home screen, enter text in the app, and it will show on your home screen.
\n\n<b>Cycle through texts:</b> In the app, you can enter as many texts as you like by clicking the [+] button and entering your text into the newly appeared field. All texts are saved automatically, you have to take no further action.\nYou can cycle through your texts by clicking on the widget on your home screen. They will be shown in the order you added them in, but you can turn on "random order" in the app\'s settings to randomise the order.
\n\n<b>Cycle through texts:</b> In the app, you can enter as many texts as you like by clicking the [+] button and entering your text into the newly appeared field. All texts are saved automatically, but feel free to press the \'save\' button in the top right if you want to make sure that your entries will be saved.\nYou can cycle through your texts by clicking on the widget on your home screen. They will be shown in the order you added them in, but you can turn on "random order" in the app\'s settings to randomise the order.
\nNOTE: if clicking on the widget does not cycle between texts, please try changing the size of the widget and then change it back. This should solve the issue.
\n\n<b>Customise the look:</b> You can change how your text will look by heading into the app\'s settings there, you can edit the text appearance by changing the size, font, position, apply formatting options, and even add a background, an outline, or a shadow.</string>
\n\n<b>Customise the look:</b> You can change how your text will look by heading into the app\'s settings there, you can edit the text appearance by changing the size, font, position, colours, apply formatting options, and even add a background, an outline, or a shadow.</string>
<string-array name="typefaces">
<item>Sans-Serif</item>