feat: add a bit more space
This commit is contained in:
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.INVISIBLE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.ViewGroup
|
||||
@@ -156,9 +157,14 @@ class DeviceListAdapter(
|
||||
measurementsListView.adapter = measurementsAdapter
|
||||
measurementsListView.divider = null
|
||||
|
||||
if (measurements.isEmpty()) {
|
||||
measurementsListView.visibility = GONE
|
||||
} else {
|
||||
measurementsListView.visibility = VISIBLE
|
||||
measurementsListView.layoutParams.height = measurementsRowHeight * measurements.size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
|
||||
// Create a new view, which defines the UI of the list item
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/name_and_actions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/kirby_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleX="0.7"
|
||||
android:scaleY="0.7"
|
||||
@@ -74,7 +74,8 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/address_and_rssi"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/name_and_actions">
|
||||
|
||||
@@ -103,7 +104,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/status_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/address_and_rssi">
|
||||
|
||||
@@ -120,7 +121,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ListView
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:id="@+id/measurement_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user