mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix(uidesigner): suppress exceptions thrown while editing attribute values (closes #873)
This commit is contained in:
+6
-1
@@ -93,7 +93,12 @@ class AttrValueEditorFragment : Fragment() {
|
||||
|
||||
val value = binding.attrValue.text.toString()
|
||||
attr.value = value
|
||||
view.applyAttribute(attr.copyAttr(value = value))
|
||||
try {
|
||||
view.applyAttribute(attr.copyAttr(value = value))
|
||||
} catch (e: Exception) {
|
||||
// When the user is editing the attribute value, it is always invalid and cannot be
|
||||
// resolved. Exceptions may be thrown while parsing the value which should be ignored
|
||||
}
|
||||
}
|
||||
|
||||
textView.setText(attr.value)
|
||||
|
||||
Reference in New Issue
Block a user