Created
June 3, 2019 15:21
-
-
Save MwBakker/947840297d8b162e0b314cb0b3706f36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:background="@color/background" | |
tools:context=".RegistrationActivity"> | |
<data> | |
<import type="android.view.View" /> | |
<variable | |
name="vm" | |
type="com.mwb.digitalstorage.viewmodel.StorageOverViewViewModel" /> | |
<variable | |
name="cmdHandler" | |
type="com.mwb.digitalstorage.command_handlers.StorageCmdHandler" /> | |
<variable | |
name="companyCmdHandler" | |
type="com.mwb.digitalstorage.command_handlers.RegistrationCmdHandler" /> | |
<variable | |
name="tbvm" | |
type="com.mwb.digitalstorage.viewmodel.ToolbarViewModel" /> | |
<variable | |
name="tbCmdHandler" | |
type="com.mwb.digitalstorage.command_handlers.ToolbarCmdHandler" /> | |
</data> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
style="@style/match_parent" | |
android:focusableInTouchMode="true"> | |
<include | |
android:id="@+id/toolbar" | |
layout="@layout/toolbar" | |
app:cmdHandler="@{tbCmdHandler}" | |
app:vm="@{tbvm}" /> | |
<include | |
android:id="@+id/company_img" | |
layout="@layout/img_view" | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
app:cmdHandler="@{companyCmdHandler}" | |
app:img="@{vm.uiCompany.imgObsv}" | |
app:isEditObsv="@{safeUnbox(vm.uiCompany.isEdit)}" | |
app:isFaded="@{true}" | |
app:layout_constraintHeight_percent="0.36" | |
app:layout_constraintTop_toBottomOf="@id/toolbar" /> | |
<ImageButton | |
android:id="@+id/btn_check" | |
style="@style/icon_check" | |
android:layout_width="36dp" | |
android:layout_height="36dp" | |
android:layout_marginStart="76dp" | |
android:layout_marginBottom="8dp" | |
android:onClick="@{() -> companyCmdHandler.saveCompany()}" | |
android:visibility="@{vm.uiCompany.isEdit ? View.VISIBLE : View.GONE}" | |
app:layout_constraintBottom_toBottomOf="@id/company_img" | |
app:layout_constraintLeft_toLeftOf="parent" /> | |
<TextView | |
android:id="@+id/txt_main_title" | |
style="@style/wrap_content" | |
android:layout_marginStart="64dp" | |
android:layout_marginBottom="125dp" | |
android:background="#660F0F0F" | |
android:text="@{vm.uiCompany.nameObsv}" | |
android:textColor="@color/icon_color" | |
android:textSize="22dp" | |
android:visibility="@{safeUnbox(vm.uiCompany.isEdit) ? View.GONE : View.VISIBLE}" | |
app:layout_constraintBottom_toBottomOf="@id/company_img" | |
app:layout_constraintLeft_toLeftOf="@id/company_img" /> | |
<EditText | |
style="@style/edit_item" | |
android:layout_width="wrap_content" | |
android:layout_marginStart="64dp" | |
android:layout_marginBottom="125dp" | |
android:background="#660F0F0F" | |
android:onTextChanged="@{companyCmdHandler::editCompanyName}" | |
android:text="@{vm.uiCompany.nameObsv}" | |
android:textColor="@color/icon_color" | |
android:textSize="22dp" | |
android:visibility="@{safeUnbox(vm.uiCompany.isEdit) ? View.VISIBLE : View.GONE}" | |
app:layout_constraintBottom_toBottomOf="@id/company_img" | |
app:layout_constraintLeft_toLeftOf="@id/company_img" /> | |
<ImageButton | |
android:id="@+id/icon_pin" | |
style="@style/icon_pin" | |
android:layout_width="24dp" | |
android:layout_height="24dp" | |
android:layout_marginStart="60dp" | |
android:layout_marginBottom="52dp" | |
app:layout_constraintBottom_toBottomOf="@id/company_img" | |
app:layout_constraintLeft_toLeftOf="parent" /> | |
<TextView | |
style="@style/wrap_content" | |
android:layout_marginStart="24dp" | |
android:background="#660F0F0F" | |
android:text="@{vm.uiCompany.locationObsv}" | |
android:textColor="@color/icon_color" | |
android:textSize="24sp" | |
android:visibility="@{safeUnbox(vm.uiCompany.isEdit) ? View.GONE : View.VISIBLE}" | |
app:layout_constraintLeft_toRightOf="@id/icon_pin" | |
app:layout_constraintTop_toTopOf="@+id/icon_pin" /> | |
<EditText | |
style="@style/edit_item" | |
android:layout_width="wrap_content" | |
android:layout_marginStart="25dp" | |
android:layout_marginBottom="150dp" | |
android:background="#660F0F0F" | |
android:onTextChanged="@{companyCmdHandler::editCompanyLocation}" | |
android:text="@{vm.uiCompany.locationObsv}" | |
android:textColor="@color/icon_color" | |
android:textSize="22dp" | |
android:visibility="@{safeUnbox(vm.uiCompany.isEdit) ? View.VISIBLE : View.GONE}" | |
app:layout_constraintLeft_toRightOf="@id/icon_pin" | |
app:layout_constraintTop_toTopOf="@+id/icon_pin" /> | |
<ImageButton | |
style="@style/icon_edit" | |
android:layout_width="45dp" | |
android:layout_height="45dp" | |
android:onClick="@{() -> companyCmdHandler.editCompany()}" | |
android:visibility="@{safeUnbox(vm.uiCompany.isEdit) ? View.GONE : View.VISIBLE}" | |
app:layout_constraintBottom_toBottomOf="@id/company_img" | |
app:layout_constraintRight_toRightOf="@id/company_img" /> | |
<ScrollView | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
app:layout_constraintTop_toBottomOf="@id/company_img" | |
app:layout_constraintBottom_toBottomOf="parent"> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintBottom_toBottomOf="parent"> | |
</androidx.constraintlayout.widget.ConstraintLayout> | |
</ScrollView> | |
</androidx.constraintlayout.widget.ConstraintLayout> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment