Updated gradle plugin version + improved UI

This commit is contained in:
Sylvain Berfini 2020-07-16 13:40:41 +02:00
parent 153ccab4ae
commit 9802d0a8d8
4 changed files with 57 additions and 65 deletions

View file

@ -162,13 +162,18 @@
android:queryBackground="@color/transparent_color" android:queryBackground="@color/transparent_color"
android:queryHint="@string/contact_filter_hint"/> android:queryHint="@string/contact_filter_hint"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/searchBar"
android:background="?attr/dividerColor" />
<HorizontalScrollView <HorizontalScrollView
android:visibility="@{viewModel.createGroupChat ? View.VISIBLE : View.GONE}" android:visibility="@{viewModel.createGroupChat ? View.VISIBLE : View.GONE}"
android:id="@+id/layoutContactsSelected" android:id="@+id/layoutContactsSelected"
android:layout_below="@id/searchBar" android:layout_below="@id/searchBar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginTop="5dp"
android:background="?attr/lightToolbarBackgroundColor" android:background="?attr/lightToolbarBackgroundColor"
android:fadeScrollbars="false" android:fadeScrollbars="false"
android:lines="1"> android:lines="1">

View file

@ -95,70 +95,54 @@
</FrameLayout> </FrameLayout>
<TextView <com.google.android.material.textfield.TextInputLayout
style="@style/contact_edit_form_label_font"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10dp" android:hint="@string/contact_last_name">
android:text="@string/contact_last_name"
android:textAllCaps="true" />
<EditText <com.google.android.material.textfield.TextInputEditText
style="@style/contact_edit_form_font" android:text="@={viewModel.lastName}"
android:text="@={viewModel.lastName}" android:imeOptions="actionDone"
android:layout_width="match_parent" android:singleLine="true"
android:layout_height="40dp" android:inputType="textPersonName|textCapWords"
android:background="@drawable/resizable_text_field" android:background="@color/transparent_color"
android:textColor="@color/black_color" android:layout_width="match_parent"
android:gravity="left" android:layout_height="wrap_content"/>
android:inputType="textPersonName|textCapWords"
android:paddingRight="5dp"
android:hint="@string/contact_last_name"
android:textCursorDrawable="@null" />
<TextView </com.google.android.material.textfield.TextInputLayout>
style="@style/contact_edit_form_label_font"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10dp" android:hint="@string/contact_first_name">
android:text="@string/contact_first_name"
android:textAllCaps="true" />
<EditText <com.google.android.material.textfield.TextInputEditText
style="@style/contact_edit_form_font" android:text="@={viewModel.firstName}"
android:text="@={viewModel.firstName}" android:imeOptions="actionDone"
android:layout_width="match_parent" android:singleLine="true"
android:layout_height="40dp" android:inputType="textPersonName|textCapWords"
android:background="@drawable/resizable_text_field" android:background="@color/transparent_color"
android:textColor="@color/black_color" android:layout_width="match_parent"
android:gravity="left" android:layout_height="wrap_content"/>
android:inputType="textPersonName|textCapWords"
android:paddingRight="5dp"
android:hint="@string/contact_first_name"
android:textCursorDrawable="@null" />
<TextView </com.google.android.material.textfield.TextInputLayout>
style="@style/contact_edit_form_label_font"
<com.google.android.material.textfield.TextInputLayout
android:visibility="@{viewModel.displayOrganization ? View.VISIBLE : View.GONE}" android:visibility="@{viewModel.displayOrganization ? View.VISIBLE : View.GONE}"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10dp" android:hint="@string/contact_organization">
android:text="@string/contact_organization"
android:textAllCaps="true" />
<EditText <com.google.android.material.textfield.TextInputEditText
style="@style/contact_edit_form_font" android:text="@={viewModel.organization}"
android:visibility="@{viewModel.displayOrganization ? View.VISIBLE : View.GONE}" android:imeOptions="actionDone"
android:text="@={viewModel.organization}" android:singleLine="true"
android:layout_width="match_parent" android:inputType="textPersonName|textCapWords"
android:layout_height="40dp" android:background="@color/transparent_color"
android:background="@drawable/resizable_text_field" android:layout_width="match_parent"
android:textColor="@color/black_color" android:layout_height="wrap_content"/>
android:gravity="left"
android:inputType="textPersonName|textCapWords" </com.google.android.material.textfield.TextInputLayout>
android:paddingRight="5dp"
android:hint="@string/contact_organization"
android:textCursorDrawable="@null" />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -14,20 +14,23 @@
android:visibility="@{data.toRemove ? View.GONE : View.VISIBLE, default=visible}" android:visibility="@{data.toRemove ? View.GONE : View.VISIBLE, default=visible}"
android:paddingBottom="5dp"> android:paddingBottom="5dp">
<EditText <com.google.android.material.textfield.TextInputLayout
style="@style/contact_edit_form_font"
android:text="@={data.newValue}"
android:inputType="@{data.sipAddress ? InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS : InputType.TYPE_CLASS_PHONE}"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="wrap_content"
android:background="@drawable/resizable_text_field"
android:textColor="@color/black_color"
android:layout_toLeftOf="@id/delete" android:layout_toLeftOf="@id/delete"
android:layout_centerVertical="true"
android:gravity="left"
android:paddingRight="5dp" android:paddingRight="5dp"
android:hint="@{data.sipAddress ? @string/sip_address : @string/phone_number, default=@string/sip_address}" android:hint="@{data.sipAddress ? @string/sip_address : @string/phone_number, default=@string/sip_address}">
android:textCursorDrawable="@null" />
<com.google.android.material.textfield.TextInputEditText
android:text="@={data.newValue}"
android:imeOptions="actionDone"
android:singleLine="true"
android:inputType="@{data.sipAddress ? InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS : InputType.TYPE_CLASS_PHONE}"
android:background="@color/transparent_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
<ImageView <ImageView
android:id="@+id/delete" android:id="@+id/delete"

View file

@ -12,7 +12,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.0.0' classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.1.1" classpath "org.jlleitschuh.gradle:ktlint-gradle:9.1.1"