Implemented search ui and screen for exploring repositories.

This commit is contained in:
M M Arif
2019-10-10 18:40:43 +05:00
parent 2fe175223c
commit d5cffddc72
7 changed files with 340 additions and 196 deletions

View File

@ -1,25 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.MainActivity">
android:background="@color/colorPrimary"
android:orientation="vertical">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/pullToRefresh"
<EditText
android:id="@+id/searchKeyword"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:padding="4dp"
android:scrollbars="vertical"
/>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
android:layout_height="wrap_content"
android:padding="10dp"
android:textSize="14sp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:inputType="text"
android:background="@drawable/shape_inputs"
android:textColor="@color/white"
android:textColorHint="@color/colorAccent"
android:hint="@string/exploreTextBoxHint"
android:textColorHighlight="@color/white"
android:imeOptions="actionSend" />
<TextView
android:id="@+id/noData"
@ -27,7 +30,7 @@
android:layout_height="match_parent"
android:layout_margin="15dp"
android:gravity="center"
android:text="@string/noData"
android:text="@string/noDataFound"
android:textColor="@color/white"
android:textSize="20sp"
android:visibility="gone" />
@ -37,8 +40,18 @@
style="@style/Base.Widget.AppCompat.ProgressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="visible" />
android:visibility="gone" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewReposSearch"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="0dp"
android:scrollbars="vertical" />
</LinearLayout>

View File

@ -503,5 +503,6 @@
<!-- generic copy -->
<string name="translateText">Translate GitNex with Crowdin</string>
<string name="exploreTextBoxHint">Explore repositories</string>
</resources>