mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-23 20:10:07 +01:00
Remove delete icon from checklist item
This commit is contained in:
parent
8c77eae5c3
commit
12e21a0282
@ -15,7 +15,6 @@ import com.simplemobiletools.notes.pro.R
|
||||
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.add_item
|
||||
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.checklist_holder
|
||||
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.dialog_holder
|
||||
import kotlinx.android.synthetic.main.item_add_checklist.view.delete_item
|
||||
import kotlinx.android.synthetic.main.item_add_checklist.view.title_edit_text
|
||||
|
||||
class NewChecklistItemDialog(val activity: Activity, callback: (titles: ArrayList<String>) -> Unit) {
|
||||
@ -57,12 +56,6 @@ class NewChecklistItemDialog(val activity: Activity, callback: (titles: ArrayLis
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
val currentIndex = titles.size
|
||||
delete_item.setOnClickListener {
|
||||
view.checklist_holder.removeViewAt(currentIndex)
|
||||
titles.removeAt(currentIndex)
|
||||
}
|
||||
titles.add(title_edit_text)
|
||||
view.checklist_holder.addView(this)
|
||||
view.dialog_holder.post {
|
||||
|
@ -1,32 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<com.simplemobiletools.commons.views.MyEditText xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/title_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyEditText
|
||||
android:id="@+id/title_edit_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/medium_margin"
|
||||
android:layout_marginBottom="@dimen/medium_margin"
|
||||
android:inputType="textCapSentences"
|
||||
android:maxLength="500"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
app:layout_constraintEnd_toStartOf="@id/delete_item"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete_item"
|
||||
android:layout_width="@dimen/checklist_delete_size"
|
||||
android:layout_height="@dimen/checklist_delete_size"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_delete_vector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textCapSentences"
|
||||
android:maxLength="500"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="@dimen/normal_text_size" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user