Skip to content

Commit 4308831

Browse files
committed
feat: refactor layout names
1 parent 720a120 commit 4308831

File tree

5 files changed

+24
-34
lines changed

5 files changed

+24
-34
lines changed

app/demo/src/main/java/net/gotev/recycleradapterdemo/activities/PagingActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import androidx.appcompat.app.AppCompatActivity
66
import androidx.paging.PagedList
77
import androidx.recyclerview.widget.LinearLayoutManager
88
import androidx.recyclerview.widget.RecyclerView
9-
import kotlinx.android.synthetic.main.activity_recycler_view.*
9+
import kotlinx.android.synthetic.main.activity_paging.*
1010
import net.gotev.recycleradapter.paging.PagingAdapter
1111
import net.gotev.recycleradapterdemo.App
1212
import net.gotev.recycleradapterdemo.R
@@ -24,7 +24,7 @@ class PagingActivity : AppCompatActivity() {
2424

2525
override fun onCreate(savedInstanceState: Bundle?) {
2626
super.onCreate(savedInstanceState)
27-
setContentView(R.layout.activity_recycler_view)
27+
setContentView(R.layout.activity_paging)
2828

2929
title = getString(R.string.paged_scrolling)
3030

app/demo/src/main/java/net/gotev/recycleradapterdemo/activities/RecyclerViewActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ open class RecyclerViewActivity : AppCompatActivity(), RecyclerAdapterProvider {
1616
override fun onCreate(savedInstanceState: Bundle?) {
1717
super.onCreate(savedInstanceState)
1818

19-
setContentView(R.layout.activity_selection)
19+
setContentView(R.layout.activity_recycler_view)
2020

2121
supportActionBar?.apply {
2222
setHomeButtonEnabled(true)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/swipeRefresh"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent">
6+
7+
<androidx.recyclerview.widget.RecyclerView
8+
android:id="@+id/recycler_view"
9+
android:layout_width="match_parent"
10+
android:layout_height="match_parent"
11+
android:scrollbars="vertical" />
12+
13+
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:id="@+id/swipeRefresh"
2+
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/recycler_view"
4+
android:paddingLeft="@dimen/activity_horizontal_margin"
5+
android:paddingTop="@dimen/activity_vertical_margin"
6+
android:paddingRight="@dimen/activity_horizontal_margin"
7+
android:paddingBottom="@dimen/activity_vertical_margin"
48
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
6-
7-
<androidx.recyclerview.widget.RecyclerView
8-
android:id="@+id/recycler_view"
9-
android:layout_width="match_parent"
10-
android:layout_height="match_parent"
11-
android:scrollbars="vertical" />
12-
13-
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
9+
android:layout_height="match_parent"
10+
android:scrollbars="none" />

app/demo/src/main/res/layout/activity_selection.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)