fix: attribute name not shown in delete attribute dialog

This commit is contained in:
Akash Yadav
2023-01-07 17:16:55 +05:30
parent 454afb6764
commit 81413466b3
3 changed files with 9 additions and 3 deletions
@@ -90,7 +90,7 @@ internal class ViewAttrListAdapter(
DialogUtils.newYesNoDialog(
context = context,
title = context.getString(R.string.title_confirm_delete),
message = context.getString(R.string.msg_confirm_delete),
message = context.getString(R.string.msg_confirm_delete, attribute.qualifiedName),
positiveClickListener = { dialog, _ ->
dialog.dismiss()
if (onDeleteAttr(attribute)) {
@@ -19,6 +19,7 @@ package com.itsaky.androidide.uidesigner.models
import android.os.Parcelable
import com.itsaky.androidide.inflater.IAttribute
import com.itsaky.androidide.inflater.INamespace
import com.itsaky.androidide.inflater.IView
import com.itsaky.androidide.inflater.internal.AttributeImpl
import com.itsaky.androidide.inflater.internal.NamespaceImpl
@@ -34,8 +35,7 @@ import kotlinx.parcelize.Parcelize
open class UiAttribute
@JvmOverloads
constructor(
override val namespace: NamespaceImpl =
com.itsaky.androidide.inflater.INamespace.ANDROID as NamespaceImpl,
override val namespace: NamespaceImpl = INamespace.ANDROID as NamespaceImpl,
override val name: String,
override var value: String,
internal var isRequired: Boolean = false
@@ -32,4 +32,10 @@ interface IAttribute {
/** The value of the attribute. */
var value: String
/**
* The name of this attribute the form `<namespace>:<name>`.
*/
val qualifiedName : String
get() = "${namespace.prefix}:${name}"
}