diff --git a/app/src/main/java/org/openobservatory/ooniprobe/adapters/ResultDetailExpandableListAdapter.kt b/app/src/main/java/org/openobservatory/ooniprobe/adapters/ResultDetailExpandableListAdapter.kt index 46fd48604..61742dff4 100755 --- a/app/src/main/java/org/openobservatory/ooniprobe/adapters/ResultDetailExpandableListAdapter.kt +++ b/app/src/main/java/org/openobservatory/ooniprobe/adapters/ResultDetailExpandableListAdapter.kt @@ -90,10 +90,16 @@ class ResultDetailExpandableListAdapter( is Measurement -> bindMeasurement(groupItem, root) else -> { - root.findViewById(R.id.text).text = groupItem.toString() + val groupMeasurement = (items[groupPosition] as MeasurementGroup) + + groupMeasurement.measurements.firstOrNull()?.let { + root.findViewById(R.id.text).setText(it.getTest().labelResId) + } ?: run { + root.findViewById(R.id.text).text = groupMeasurement.title + } root.findViewById(R.id.indicator).apply { visibility = View.VISIBLE - text = "${(items[groupPosition] as MeasurementGroup).measurements.size} Inputs" + text = "${groupMeasurement.measurements.size} Inputs" setCompoundDrawablesRelativeWithIntrinsicBounds( null, null, @@ -115,6 +121,7 @@ class ResultDetailExpandableListAdapter( ) { view.tag = measurement view.setOnClickListener(onClickListener) + view.findViewById(R.id.indicator).visibility = View.GONE view.findViewById(R.id.text).also { textView -> val test: AbstractTest = measurement.getTest() diff --git a/app/src/main/res/layout/activity_result_detail.xml b/app/src/main/res/layout/activity_result_detail.xml index eaa550612..3ea29f6f7 100644 --- a/app/src/main/res/layout/activity_result_detail.xml +++ b/app/src/main/res/layout/activity_result_detail.xml @@ -1,73 +1,78 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/coordinatorLayout" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".activity.ResultDetailActivity"> - + - + - + - + - - + + - + - - - + + + - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_run_tests.xml b/app/src/main/res/layout/activity_run_tests.xml index dd3f26875..f67c1ec09 100644 --- a/app/src/main/res/layout/activity_run_tests.xml +++ b/app/src/main/res/layout/activity_run_tests.xml @@ -1,90 +1,113 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".activity.runtests.RunTestsActivity"> - + - + - + -