159 lines
5.2 KiB
XML
159 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:orientation="vertical"
|
|
android:background="@color/white"
|
|
tools:context=".articles.ArticlesActivity">
|
|
|
|
<ImageView
|
|
android:id="@+id/back_btn"
|
|
android:layout_width="35sp"
|
|
android:layout_height="35sp"
|
|
android:layout_margin="15dp"
|
|
android:contentDescription="@string/back_button"
|
|
android:padding="5dp"
|
|
android:paddingStart="-15dp"
|
|
android:paddingEnd="0dp"
|
|
android:src="@drawable/arrow_back" />
|
|
|
|
<TextView
|
|
android:id="@+id/title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="15dp"
|
|
android:layout_marginBottom="5dp"
|
|
android:fontFamily="@font/nunito_medium"
|
|
android:text="@string/articles"
|
|
android:textSize="@dimen/_18ssp"
|
|
android:textColor="@color/black" />
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/search_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginHorizontal="@dimen/_10sdp"
|
|
android:layout_marginVertical="@dimen/_10sdp"
|
|
|
|
app:cardBackgroundColor="@color/white"
|
|
app:cardElevation="5dp"
|
|
|
|
app:strokeWidth="2dp"
|
|
app:strokeColor="@color/color_accent"
|
|
|
|
app:cardCornerRadius="20dp"
|
|
|
|
>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<EditText
|
|
android:id="@+id/search_et"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_toStartOf="@id/close_btn"
|
|
|
|
android:hint="@string/search_places"
|
|
android:fontFamily="@font/nunito_regular"
|
|
android:textColorHint="@android:color/darker_gray"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/_14ssp"
|
|
|
|
android:background="@android:color/transparent"
|
|
|
|
android:layout_marginVertical="10dp"
|
|
android:layout_marginStart="15dp"
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
app:drawableStartCompat="@drawable/ic_search_outline"
|
|
android:drawablePadding="15dp"
|
|
|
|
android:imeOptions="actionSearch"
|
|
android:maxLines="1"
|
|
android:inputType="textCapSentences"
|
|
|
|
android:autofillHints="@null"
|
|
|
|
/>
|
|
|
|
<ImageView
|
|
android:id="@+id/close_btn"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:src="@drawable/ic_close_outline"
|
|
android:contentDescription="@string/close"
|
|
android:layout_centerVertical="true"
|
|
android:layout_alignParentEnd="true"
|
|
android:layout_marginEnd="15dp"
|
|
app:tint="@android:color/darker_gray" />
|
|
|
|
</RelativeLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<ProgressBar
|
|
android:id="@+id/progress_bar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginTop="25dp"
|
|
android:visibility="gone"
|
|
/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/no_articles"
|
|
android:visibility="gone"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginTop="50dp"
|
|
>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/no_articles_found"
|
|
android:fontFamily="@font/nunito_medium"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/_14ssp"
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/articles_rv"
|
|
android:layout_above="@id/page_progress"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:overScrollMode="never"
|
|
/>
|
|
|
|
<ProgressBar
|
|
android:id="@+id/page_progress"
|
|
android:layout_width="30dp"
|
|
android:layout_height="30dp"
|
|
android:indeterminateTint="@android:color/darker_gray"
|
|
android:indeterminate="true"
|
|
android:layout_alignParentBottom="true"
|
|
android:layout_centerHorizontal="true"
|
|
android:layout_marginVertical="5dp"
|
|
android:visibility="gone"
|
|
/>
|
|
|
|
</RelativeLayout>
|
|
|
|
</LinearLayout> |