feat(v1.4.0): Checklists feature + WiFi permission cleanup
Features: - Interactive checklists with tap-to-check, drag & drop sorting - GitHub-flavored Markdown export (- [ ] / - [x]) - FAB menu for note type selection Fixes: - Improved Markdown parsing (robust line-based content extraction) - Better duplicate filename handling (ID suffix) - Foreground notification suppression Privacy: - Removed ACCESS_WIFI_STATE and CHANGE_WIFI_STATE permissions (SSID binding was never used, app only checks connectivity state) Code Quality: - Fixed 7 Detekt warnings (SwallowedException, MaxLineLength, MagicNumber)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<LinearLayout
|
||||
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"
|
||||
android:orientation="vertical"
|
||||
@@ -18,8 +19,9 @@
|
||||
app:title="@string/edit_note"
|
||||
app:titleTextAppearance="@style/TextAppearance.Material3.TitleLarge" />
|
||||
|
||||
<!-- Material 3 Outlined TextInputLayout with 16dp corners -->
|
||||
<!-- Title Input (für beide Typen) -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/tilTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
@@ -44,8 +46,9 @@
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Material 3 Outlined TextInputLayout for Content -->
|
||||
<!-- Content Input (nur für TEXT sichtbar) -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/tilContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
@@ -74,4 +77,39 @@
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- v1.4.0: Checklist Container (nur für CHECKLIST sichtbar) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/checklistContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<!-- Checklist Items RecyclerView -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvChecklistItems"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="8dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_checklist_editor" />
|
||||
|
||||
<!-- Add Item Button -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnAddItem"
|
||||
style="@style/Widget.Material3.Button.TextButton.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/add_item"
|
||||
app:icon="@android:drawable/ic_input_add" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
57
android/app/src/main/res/layout/item_checklist_editor.xml
Normal file
57
android/app/src/main/res/layout/item_checklist_editor.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- v1.4.0: Checklist Item Layout für Editor -->
|
||||
<LinearLayout
|
||||
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="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="4dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:minHeight="48dp">
|
||||
|
||||
<!-- Drag Handle -->
|
||||
<ImageView
|
||||
android:id="@+id/ivDragHandle"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/ic_drag_handle_24"
|
||||
android:contentDescription="@string/reorder_item"
|
||||
android:importantForAccessibility="yes" />
|
||||
|
||||
<!-- Checkbox -->
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/cbItem"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp" />
|
||||
|
||||
<!-- Text Input (ohne Box, nur transparent) -->
|
||||
<EditText
|
||||
android:id="@+id/etItemText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="@string/item_placeholder"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionNext"
|
||||
android:maxLines="3"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
|
||||
tools:text="Milch kaufen" />
|
||||
|
||||
<!-- Delete Button -->
|
||||
<ImageButton
|
||||
android:id="@+id/btnDeleteItem"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_delete_24"
|
||||
android:contentDescription="@string/delete_item"
|
||||
app:tint="?attr/colorOnSurfaceVariant" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Material 3: Filled Card Style (Flat, No Shadow) -->
|
||||
<!-- v1.4.0: Unterstützt jetzt TEXT und CHECKLIST Notizen -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
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="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
@@ -17,17 +19,37 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- Material 3 Typography: TitleMedium -->
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
<!-- v1.4.0: Header Row mit Icon und Titel -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/note_title_placeholder"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- Material 3 Typography: BodyMedium -->
|
||||
<!-- v1.4.0: Note Type Icon -->
|
||||
<ImageView
|
||||
android:id="@+id/ivNoteTypeIcon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/ic_note_24"
|
||||
app:tint="?attr/colorPrimary"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<!-- Material 3 Typography: TitleMedium -->
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/note_title_placeholder"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Content Preview (für TEXT Notizen) -->
|
||||
<TextView
|
||||
android:id="@+id/textViewContent"
|
||||
android:layout_width="match_parent"
|
||||
@@ -39,6 +61,18 @@
|
||||
android:maxLines="3"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<!-- v1.4.0: Checklist Preview (für CHECKLIST Notizen) -->
|
||||
<TextView
|
||||
android:id="@+id/textViewChecklistPreview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="gone"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:textColor="?attr/colorOnSurfaceVariant"
|
||||
tools:visibility="visible"
|
||||
tools:text="2/5 erledigt" />
|
||||
|
||||
<!-- Metadata Row mit Timestamp und Sync-Status -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
Reference in New Issue
Block a user