Skip to content

Instantly share code, notes, and snippets.

@TimCastelijns
Last active May 17, 2019 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimCastelijns/ec15768ac9f605ea4141d9d6cf73f202 to your computer and use it in GitHub Desktop.
Save TimCastelijns/ec15768ac9f605ea4141d9d6cf73f202 to your computer and use it in GitHub Desktop.
<androidx.constraintlayout.widget.ConstraintLayout
@@ -20,6 +21,7 @@
android:onClick="@{(view) -> cmdHandler.enterEntity(UIStorage.id)}"
android:onLongClick="@{(view) -> cmdHandler.editEntity(UIStorage)}">
<TextView
+ tools:text="Sample storage name"
android:id="@+id/txt_storage_name"
style="@style/wrap_content"
app:layout_constraintTop_toTopOf="parent"
@@ -46,13 +48,14 @@
<ImageView
android:id="@+id/img_pin"
style="@style/icon_pin"
- android:layout_width="25dp"
- android:layout_height="25dp"
- app:layout_constraintTop_toTopOf="parent"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ android:layout_marginBottom="16dp"
app:layout_constraintLeft_toLeftOf="parent"
- android:layout_marginTop="70dp"
- android:layout_marginLeft="50dp"/>
+ app:layout_constraintStart_toStartOf="@id/txt_storage_name"/>
<TextView
+ tools:text="Sample location"
android:id="@+id/txt_storage_location"
style="@style/wrap_content"
android:layout_width="wrap_content"
@@ -79,25 +82,21 @@
<ImageButton
android:id="@+id/btn_delete"
style="@style/icon_bin"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintWidth_percent="0.10"
- app:layout_constraintHeight_percent="0.15"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintLeft_toLeftOf="parent"
- android:layout_margin="15dp"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ app:layout_constraintEnd_toStartOf="@id/img_pin"
+ app:layout_constraintTop_toTopOf="@id/img_pin"
android:onClick="@{() -> cmdHandler.deleteEntity()}"
+ android:layout_marginEnd="8sp"
android:visibility="@{safeUnbox(UIStorage.isEditObsv) ? View.VISIBLE : View.GONE}"/>
<ImageButton
android:id="@+id/btn_approve"
style="@style/icon_check"
- android:layout_width="0dp"
- android:layout_height="0dp"
- app:layout_constraintWidth_percent="0.10"
- app:layout_constraintHeight_percent="0.15"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintRight_toRightOf="parent"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
android:layout_margin="15dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
android:onClick="@{() -> cmdHandler.saveEntity(false)}"
android:visibility="@{safeUnbox(UIStorage.isEditObsv) ? View.VISIBLE : View.GONE}"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment