From 35632e925b12ccac65baaf7458ad0c9de1fd2dc2 Mon Sep 17 00:00:00 2001 From: JasonLiuZhuoCheng Date: Thu, 18 Nov 2021 20:55:26 -0500 Subject: [PATCH] enable ui to see preview on complex data type --- .../clusterclient/clusterinteraction/ClusterDetailFragment.kt | 2 +- .../CHIPTool/app/src/main/res/layout/cluster_callback_item.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt index 5e6f45f0afc717..7371cce20365b9 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt @@ -241,7 +241,7 @@ class ClusterDetailFragment : Fragment() { } else { it!!.javaClass.toString().split('$').last() } - attributeCallbackItem.clusterCallbackDataTv.text = callbackClassName + attributeCallbackItem.clusterCallbackDataTv.text = objectString attributeCallbackItem.clusterCallbackDataTv.setOnClickListener { AlertDialog.Builder(requireContext()) .setTitle(callbackClassName) diff --git a/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml b/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml index 91e8edfb4fa09c..36b010f0abe6ed 100644 --- a/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml +++ b/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml @@ -23,6 +23,8 @@ android:layout_height="wrap_content" android:padding="16dp" android:singleLine="false" + android:maxLines="4" + android:ellipsize="end" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/clusterCallbackTypeTv" app:layout_constraintStart_toEndOf="@id/clusterCallbackNameTv"