Skip to content

Commit

Permalink
feat: refactor layout names
Browse files Browse the repository at this point in the history
  • Loading branch information
gotev committed Mar 22, 2021
1 parent 720a120 commit 4308831
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.paging.PagedList
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.activity_recycler_view.*
import kotlinx.android.synthetic.main.activity_paging.*
import net.gotev.recycleradapter.paging.PagingAdapter
import net.gotev.recycleradapterdemo.App
import net.gotev.recycleradapterdemo.R
Expand All @@ -24,7 +24,7 @@ class PagingActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_recycler_view)
setContentView(R.layout.activity_paging)

title = getString(R.string.paged_scrolling)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ open class RecyclerViewActivity : AppCompatActivity(), RecyclerAdapterProvider {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setContentView(R.layout.activity_selection)
setContentView(R.layout.activity_recycler_view)

supportActionBar?.apply {
setHomeButtonEnabled(true)
Expand Down
13 changes: 13 additions & 0 deletions app/demo/src/main/res/layout/activity_paging.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
19 changes: 8 additions & 11 deletions app/demo/src/main/res/layout/activity_recycler_view.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeRefresh"
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recycler_view"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
android:layout_height="match_parent"
android:scrollbars="none" />
20 changes: 0 additions & 20 deletions app/demo/src/main/res/layout/activity_selection.xml

This file was deleted.

0 comments on commit 4308831

Please sign in to comment.