diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/PropertiesDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/PropertiesDialog.kt index fb188ee57..d5e6baa75 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/PropertiesDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/PropertiesDialog.kt @@ -25,6 +25,7 @@ class PropertiesDialog() { private lateinit var mInflater: LayoutInflater private lateinit var mPropertyView: ViewGroup private lateinit var mResources: Resources + private lateinit var mActivity: Activity /** * A File Properties dialog constructor with an optional parameter, usable at 1 file selected @@ -39,6 +40,7 @@ class PropertiesDialog() { return } + mActivity = activity mInflater = LayoutInflater.from(activity) mResources = activity.resources val view = mInflater.inflate(R.layout.dialog_properties, null) @@ -147,6 +149,7 @@ class PropertiesDialog() { * @param countHiddenItems toggle determining if we will count hidden files themselves and their sizes */ constructor(activity: Activity, paths: List, countHiddenItems: Boolean = false) : this() { + mActivity = activity mInflater = LayoutInflater.from(activity) mResources = activity.resources val view = mInflater.inflate(R.layout.dialog_properties, null) @@ -224,6 +227,11 @@ class PropertiesDialog() { property_value.text = value mPropertyView.properties_holder.addView(this) + property_value.setOnLongClickListener { + mActivity.copyToClipboard(property_value.value) + true + } + if (viewId != 0) { id = viewId }