mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-20 17:11:32 -08:00
Add UUID in Entry View
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
@@ -182,45 +182,53 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Created -->
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_created_label"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_created_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_created"
|
||||
style="@style/KeepassDXStyle.TextAppearance.LabelTextStyle" />
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_created"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_created"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/KeepassDXStyle.TextAppearance.TextEntryItem" />
|
||||
|
||||
<!-- Modified -->
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_modified_label"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_modified_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_modified"
|
||||
style="@style/KeepassDXStyle.TextAppearance.LabelTextStyle" />
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_modified"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_modified"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/KeepassDXStyle.TextAppearance.TextEntryItem" />
|
||||
|
||||
<!-- Accessed -->
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_accessed_label"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_accessed_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_accessed"
|
||||
style="@style/KeepassDXStyle.TextAppearance.LabelTextStyle" />
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_accessed"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_accessed"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/KeepassDXStyle.TextAppearance.TextEntryItem" />
|
||||
|
||||
<!-- Expires -->
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_expires_label"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_expires_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_expires"
|
||||
style="@style/KeepassDXStyle.TextAppearance.LabelTextStyle" />
|
||||
<android.support.v7.widget.AppCompatTextView android:id="@+id/entry_expires"
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_expires"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/KeepassDXStyle.TextAppearance.TextEntryItem" />
|
||||
@@ -228,4 +236,36 @@
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/default_margin"
|
||||
android:layout_marginEnd="@dimen/default_margin"
|
||||
android:layout_marginBottom="@dimen/default_margin">
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_margin="@dimen/default_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Expires -->
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_UUID_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_UUID"
|
||||
style="@style/KeepassDXStyle.TextAppearance.LabelTextStyle" />
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/entry_UUID"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/KeepassDXStyle.TextAppearance.TextEntryItem" />
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -75,6 +75,7 @@
|
||||
<string name="entry_confpassword">Confirm password</string>
|
||||
<string name="entry_created">Created</string>
|
||||
<string name="entry_expires">Expires</string>
|
||||
<string name="entry_UUID">UUID</string>
|
||||
<string name="entry_keyfile">Keyfile</string>
|
||||
<string name="entry_modified">Modified</string>
|
||||
<string name="entry_not_found">Could not find entry data.</string>
|
||||
|
||||
Reference in new issue
Block a user