85 lines
4.8 KiB
XML
85 lines
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<android.support.constraint.ConstraintLayout
|
|
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:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context=".HomeActivity" android:background="@drawable/ic_home_bg" android:id="@+id/root">
|
|
|
|
<android.support.constraint.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="60dp" app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent" android:id="@+id/header">
|
|
|
|
<ImageView
|
|
android:layout_width="44dp"
|
|
android:layout_height="44dp" app:srcCompat="@drawable/ic_icon_white"
|
|
android:id="@+id/icon" android:layout_marginBottom="8dp"
|
|
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginTop="8dp"
|
|
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
|
|
android:layout_marginStart="8dp"
|
|
android:contentDescription="brand"/>
|
|
<EditText
|
|
android:layout_width="0dp"
|
|
android:layout_height="36dp"
|
|
android:inputType="textPersonName"
|
|
android:ems="10"
|
|
android:id="@+id/search"
|
|
app:layout_constraintStart_toEndOf="@+id/icon" android:layout_marginStart="16dp"
|
|
android:layout_marginEnd="16dp"
|
|
android:theme="@style/Base.V7.Widget.AppCompat.EditText"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="14sp" android:fontFamily="@font/roboto"
|
|
android:background="@android:color/transparent"
|
|
android:hint="@string/search_hint"
|
|
android:textColorHint="@color/soft_grey" android:layout_marginTop="10dp"
|
|
app:layout_constraintTop_toTopOf="parent" app:layout_constraintEnd_toStartOf="@+id/search_button"/>
|
|
<ImageView
|
|
android:layout_width="0dp"
|
|
android:layout_height="5dp"
|
|
app:layout_constraintTop_toBottomOf="@+id/search" app:layout_constraintStart_toStartOf="@+id/search"
|
|
app:layout_constraintEnd_toEndOf="@+id/search" android:id="@+id/search_underline"
|
|
>
|
|
|
|
</ImageView>
|
|
<ImageView
|
|
android:layout_width="44dp"
|
|
android:layout_height="44dp"
|
|
android:id="@+id/search_button" android:layout_marginBottom="8dp"
|
|
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginTop="8dp"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
android:contentDescription="brand @android:string/fingerprint_icon_content_description"
|
|
android:layout_marginEnd="8dp" app:layout_constraintEnd_toEndOf="parent"
|
|
app:srcCompat="@drawable/ic_search"/>
|
|
</android.support.constraint.ConstraintLayout>
|
|
<android.support.constraint.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp" android:layout_marginTop="32dp"
|
|
app:layout_constraintTop_toBottomOf="@+id/header" app:layout_constraintEnd_toEndOf="parent"
|
|
android:layout_marginEnd="50dp" app:layout_constraintStart_toStartOf="parent"
|
|
android:layout_marginStart="50dp" android:layout_marginBottom="32dp"
|
|
app:layout_constraintBottom_toBottomOf="parent" android:id="@+id/category_list"
|
|
android:background="@drawable/rounded_category_bg">
|
|
|
|
<GridView
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
app:layout_constraintTop_toTopOf="parent" app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
android:id="@+id/category_grid" android:numColumns="@integer/category_cols"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
android:horizontalSpacing="5dp" android:verticalSpacing="5dp" android:padding="12dp"
|
|
android:stretchMode="columnWidth" android:gravity="start"/>
|
|
</android.support.constraint.ConstraintLayout>
|
|
<ImageView
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:id="@+id/filter"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
|
|
android:contentDescription="animation filter"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:clickable="false"/>
|
|
</android.support.constraint.ConstraintLayout> |