Added file indicator to exported notes

This commit is contained in:
Agnieszka C
2023-12-26 10:20:25 +01:00
parent dc449b19cb
commit 04f887bc3a
2 changed files with 19 additions and 2 deletions

View File

@@ -15,6 +15,8 @@ import org.fossify.commons.extensions.beGoneIf
import org.fossify.commons.extensions.beVisibleIf
import org.fossify.commons.extensions.getColoredDrawableWithColor
import org.fossify.commons.extensions.isBlackAndWhiteTheme
import org.fossify.commons.extensions.applyColorFilter
import org.fossify.commons.extensions.toast
import org.fossify.commons.helpers.LOWER_ALPHA_INT
import org.fossify.commons.helpers.SORT_BY_CUSTOM
import org.fossify.commons.views.MyRecyclerView
@@ -75,6 +77,13 @@ class OpenNoteAdapter(
text = formattedText
setTextColor(textColor)
}
openNoteItemIcon.apply {
beVisibleIf(note.path.isNotEmpty())
applyColorFilter(textColor)
setOnClickListener {
activity.toast(note.path)
}
}
}
}

View File

@@ -19,12 +19,20 @@
android:src="@drawable/ic_lock_vector"
android:visibility="gone" />
<org.fossify.commons.views.MyTextView
android:id="@+id/open_note_item_title"
<ImageView
android:id="@+id/open_note_item_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="@dimen/small_margin"
android:src="@drawable/ic_attach_file_vector" />
<org.fossify.commons.views.MyTextView
android:id="@+id/open_note_item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/open_note_item_icon"
android:ellipsize="end"
android:lines="1"
android:textSize="@dimen/big_text_size"