mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix: attribute name not shown in delete attribute dialog
This commit is contained in:
+1
-1
@@ -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}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user