Skip to content

Commit f7d8995

Browse files
author
oleksii.kuropiatnyk
committed
add default views
1 parent 5aad482 commit f7d8995

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

demo/src/main/kotlin/com/alkurop/updatingexample/ExampleAdapter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.github.alkurop.updatinglist.BaseViewHolder
1111
class ExampleAdapter() : BaseLoadMoreAdapter<ILongProcessData>() {
1212
val SOME_OTHER_VIEW_TYPE = 1
1313
override fun onCreateProgressVH(viewGroup: ViewGroup): BaseViewHolder<ILongProcessData> {
14-
val view = LayoutInflater.from(viewGroup.context).inflate(R.layout.example_item_loading_view, viewGroup, false)
14+
val view = LayoutInflater.from(viewGroup.context).inflate(R.layout.default_item_loading_view, viewGroup, false)
1515
return ProgressVH(view)
1616
}
1717

demo/src/main/kotlin/com/alkurop/updatingexample/UpdatingListExampleActivity.kt

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,8 @@ package com.alkurop.updatingexample
33
import android.os.Bundle
44
import android.support.v7.app.AppCompatActivity
55
import android.util.Log
6-
import android.view.LayoutInflater
7-
import android.view.View
8-
import android.view.ViewGroup
9-
import com.github.alkurop.updatinglist.BaseLoadMoreAdapter
10-
import com.github.alkurop.updatinglist.BaseViewHolder
11-
import com.github.alkurop.updatinglist.UpdatingListView
12-
import com.squareup.picasso.Picasso
136

147
import kotlinx.android.synthetic.main.example_activity_main.*
15-
import kotlinx.android.synthetic.main.example_item_int_view.view.*
16-
import kotlinx.android.synthetic.main.example_item_picture_view.view.*
178
import rx.Subscription
189
import rx.android.schedulers.AndroidSchedulers
1910
import rx.schedulers.Schedulers
@@ -45,7 +36,7 @@ class UpdatingListExampleActivity : AppCompatActivity() {
4536

4637
fun initUpdatingList() {
4738
list.setLoadingViews(
48-
R.layout.example_native_loading_view,
39+
R.layout.default_native_loading_view,
4940
R.layout.example_empty_view)
5041

5142
list.setAdapter(mAdapter)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="85dp"
5+
android:orientation="vertical"
6+
>
7+
<ProgressBar
8+
android:id="@+id/mProgress"
9+
android:layout_width="30dp"
10+
android:layout_height="30dp"
11+
android:layout_gravity="center"
12+
android:indeterminate="true"
13+
/>
14+
</FrameLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
>
7+
<ProgressBar
8+
android:layout_width="wrap_content"
9+
android:layout_height="wrap_content"
10+
android:id="@+id/progressBar"
11+
android:layout_gravity="center"/>
12+
</FrameLayout>

0 commit comments

Comments
 (0)