Add UUID in Entry View

This commit is contained in:
J-Jamet committed 2019-08-18 22:32:33 +02:00
1 parent 1f8d17d27e
commit 954d522341
4 files changed
+60 -8

No files matched your search

@@ -236,6 +236,9 @@ class EntryActivity : LockingHideActivity() {
entryContentsView?.assignExpiresDate(getString(R.string.never))
}
// Assign special data
entryContentsView?.assignUUID(entry.nodeId.id)
database.stopManageEntry(entry)
}
@@ -65,6 +65,8 @@ class EntryContentsView @JvmOverloads constructor(context: Context, attrs: Attri
private val lastAccessDateView: TextView
private val expiresDateView: TextView
private val uuidView: TextView
val isUserNamePresent: Boolean
get() = userNameContainerView.visibility == View.VISIBLE
@@ -97,6 +99,8 @@ class EntryContentsView @JvmOverloads constructor(context: Context, attrs: Attri
lastAccessDateView = findViewById(R.id.entry_accessed)
expiresDateView = findViewById(R.id.entry_expires)
uuidView = findViewById(R.id.entry_UUID)
val attrColorAccent = intArrayOf(R.attr.colorAccent)
val taColorAccent = context.theme.obtainStyledAttributes(attrColorAccent)
colorAccent = taColorAccent.getColor(0, Color.BLACK)
@@ -238,6 +242,10 @@ class EntryContentsView @JvmOverloads constructor(context: Context, attrs: Attri
expiresDateView.text = constString
}
fun assignUUID(uuid: UUID) {
uuidView.text = uuid.toString()
}
override fun generateDefaultLayoutParams(): LayoutParams {
return LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)
}