<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2023 Samson Achiaga
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<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">
<data>
<import type="androidx.databinding.ObservableField" />
<import type="com.certified.audionote.utils.UIState" />
<variable
name="uiState"
type="UIState" />
<variable
name="viewModel"
type="com.certified.audionote.ui.NotesViewModel" />
</data>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:background="@color/fragment_background"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.HomeFragment">
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/btn_settings"
android:background="@null"
android:padding="@dimen/_4sdp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:tint="@color/black_day_white_night"
app:srcCompat="@drawable/ic_settings_black_24dp"
app:layout_constraintBottom_toBottomOf="@+id/materialTextView3"
app:layout_constraintEnd_toEndOf="@+id/fab_add_note"
app:layout_constraintTop_toTopOf="@+id/materialTextView2" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/materialTextView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_16sdp"
android:layout_marginTop="@dimen/_16sdp"
android:text="@string/hi_there"
android:textSize="@dimen/_18ssp"
android:textColor="@color/black_day_white_night"
android:fontFamily="@font/open_sans_bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/materialTextView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha=".7"
android:text="@string/welcome_back"
android:fontFamily="@font/open_sans_medium"
android:textSize="@dimen/_12ssp"
app:layout_constraintStart_toStartOf="@+id/materialTextView2"
app:layout_constraintTop_toBottomOf="@+id/materialTextView2" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_notes"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/_16sdp"
android:layout_marginStart="@dimen/_8sdp"
android:layout_marginEnd="@dimen/_8sdp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/materialTextView3"
app:listItems="@{viewModel.notes}"
app:visible="@{viewModel.uiState == UIState.HAS_DATA}"
tools:listitem="@layout/item_note" />
<!-- <com.google.android.material.textview.MaterialTextView-->
<!-- android:id="@+id/materialTextView"-->
<!-- android:layout_width="0dp"-->
<!-- android:textColor="@color/titleText"-->
<!-- android:layout_marginEnd="@dimen/_16sdp"-->
<!-- android:layout_marginStart="@dimen/_16sdp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="“The more that you read, the more things you will know, the more that you learn, the more places you’ll go.”"-->
<!-- android:textAlignment="center"-->
<!-- android:alpha=".7"-->
<!-- android:textSize="@dimen/_14ssp"-->
<!-- android:fontFamily="@font/open_sans_medium_italic"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/materialTextView4"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintHorizontal_bias="0.5"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent"-->
<!-- app:layout_constraintVertical_chainStyle="packed" />-->
<!-- <com.google.android.material.textview.MaterialTextView-->
<!-- android:id="@+id/materialTextView4"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="– Dr. Seuss"-->
<!-- android:scrollbarSize="@dimen/_18ssp"-->
<!-- android:textColor="@color/titleText"-->
<!-- android:fontFamily="@font/open_sans_bold_italic"-->
<!-- android:textSize="@dimen/_18ssp"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintEnd_toEndOf="@+id/materialTextView"-->
<!-- app:layout_constraintHorizontal_bias="0.5"-->
<!-- app:layout_constraintStart_toStartOf="@+id/materialTextView"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/materialTextView" />-->
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_empty_notes"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/_16sdp"
android:src="@drawable/ic_undraw_empty"
app:layout_constraintBottom_toTopOf="@+id/fab_add_note"
app:layout_constraintEnd_toEndOf="@+id/fab_add_note"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/materialTextView3"
app:layout_constraintTop_toBottomOf="@+id/materialTextView3"
app:layout_constraintVertical_bias="1.0" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tv_empty_notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/_8sdp"
android:alpha=".7"
app:fontFamily="@font/open_sans_semi_bold"
android:textColor="@color/titleText"
android:paddingStart="@dimen/_16sdp"
android:paddingEnd="@dimen/_16sdp"
android:text="@string/your_record_list_is_empty_click_the_button_below_to_get_started"
android:textAlignment="center"
android:textSize="@dimen/_12ssp"
android:fontFamily="@font/open_sans_regular"
app:layout_constraintBottom_toBottomOf="@+id/iv_empty_notes"
app:layout_constraintEnd_toEndOf="@+id/iv_empty_notes"
app:layout_constraintStart_toStartOf="@+id/iv_empty_notes" />
<androidx.constraintlayout.widget.Group
android:id="@+id/group_empty_notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
app:constraint_referenced_ids="iv_empty_notes, tv_empty_notes"
app:visible="@{viewModel.uiState == UIState.EMPTY}" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_add_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/_16sdp"
android:layout_marginBottom="@dimen/_16sdp"
android:backgroundTint="@color/fab_background_tint"
android:contentDescription="@string/add_note_button"
app:iconSize="@dimen/_27sdp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_mic_black_24dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:visibility="gone"
android:id="@+id/bottom_sheet_dialog_layout"
layout="@layout/bottom_sheet_dialog" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>