Initial work on commits list using paging library

This commit is contained in:
M M Arif
2020-03-25 19:43:40 +05:00
parent 162e86f0c0
commit c8164c56d0
14 changed files with 774 additions and 6 deletions

View File

@ -74,6 +74,12 @@
android:layout_height="wrap_content"
android:text="@string/tabPullRequests" />
<com.google.android.material.tabs.TabItem
android:id="@+id/tabItemCommits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/repositoryTabCommits" />
<com.google.android.material.tabs.TabItem
android:id="@+id/tabItem3_ml"
android:layout_width="wrap_content"

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".activities.RepoDetailActivity">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/pullToRefresh"
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="?attr/primaryBackgroundColor"
android:padding="4dp"
android:scrollbars="vertical" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<TextView
android:id="@+id/noDataCommits"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:gravity="center"
android:text="@string/noDataFound"
android:textColor="?attr/primaryTextColor"
android:textSize="20sp"
android:visibility="gone" />
<ProgressBar
android:id="@+id/progress_bar"
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" />
</RelativeLayout>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" >
<LinearLayout
android:id="@+id/linearLayoutFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_margin="15dp"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/commitTitle"
android:layout_width="0dp"
android:layout_weight=".70"
android:layout_height="wrap_content"
android:text="@string/commitTitle"
android:textIsSelectable="true"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -560,4 +560,6 @@
<string name="shareIssue">Share Issue</string>
<string name="shareRepository">Share Repository</string>
<string name="createRepository">Create Repository</string>
<string name="repositoryTabCommits">Commits</string>
<string name="commitTitle">Commit Title</string>
</resources>