Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
9bbc8c17
Commit
9bbc8c17
authored
Sep 14, 2021
by
chengkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加空视图
parent
a75d4f61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
OrderListActivity.kt
...om/yidian/shenghuoquan/buserorder/ui/OrderListActivity.kt
+6
-2
border_activity_order_list.xml
...rOrder/src/main/res/layout/border_activity_order_list.xml
+20
-3
No files found.
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/ui/OrderListActivity.kt
View file @
9bbc8c17
...
@@ -2,6 +2,7 @@ package com.yidian.shenghuoquan.buserorder.ui
...
@@ -2,6 +2,7 @@ package com.yidian.shenghuoquan.buserorder.ui
import
android.graphics.Typeface
import
android.graphics.Typeface
import
android.graphics.drawable.Drawable
import
android.graphics.drawable.Drawable
import
android.view.View
import
androidx.activity.viewModels
import
androidx.activity.viewModels
import
com.scwang.smart.refresh.layout.api.RefreshLayout
import
com.scwang.smart.refresh.layout.api.RefreshLayout
import
com.scwang.smart.refresh.layout.listener.OnLoadMoreListener
import
com.scwang.smart.refresh.layout.listener.OnLoadMoreListener
...
@@ -52,8 +53,11 @@ class OrderListActivity : BaseMvvmActivity<BorderActivityOrderListBinding, Order
...
@@ -52,8 +53,11 @@ class OrderListActivity : BaseMvvmActivity<BorderActivityOrderListBinding, Order
binding
.
smartRefresh
.
finishLoadMore
()
binding
.
smartRefresh
.
finishLoadMore
()
}
}
listAdapter
.
setList
(
it
)
listAdapter
.
setList
(
it
)
var
oldPos
=
listAdapter
.
itemCount
if
(
listAdapter
.
itemCount
==
0
)
{
setRecyclePos
(
oldPos
)
binding
.
orderlistEmptyView
.
visibility
=
View
.
VISIBLE
}
else
{
binding
.
orderlistEmptyView
.
visibility
=
View
.
GONE
}
})
})
}
}
...
...
Components/BUserOrder/src/main/res/layout/border_activity_order_list.xml
View file @
9bbc8c17
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
name=
"vm"
name=
"vm"
type=
"com.yidian.shenghuoquan.buserorder.viewmodel.OrderListViewModel"
/>
type=
"com.yidian.shenghuoquan.buserorder.viewmodel.OrderListViewModel"
/>
</data>
</data>
<
Linear
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:orientation=
"vertical"
...
@@ -34,10 +34,12 @@
...
@@ -34,10 +34,12 @@
tools:text=
"标题"
/>
tools:text=
"标题"
/>
</androidx.appcompat.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_all_refund"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp44"
android:layout_height=
"@dimen/dp44"
android:layout_marginTop=
"@dimen/dp2"
android:layout_marginTop=
"@dimen/dp2"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:layout_below=
"@+id/order_list_toolbar"
>
>
<TextView
<TextView
android:id=
"@+id/tv_orderlist_all"
android:id=
"@+id/tv_orderlist_all"
...
@@ -62,21 +64,28 @@
...
@@ -62,21 +64,28 @@
android:layout_gravity=
"center_vertical"
>
android:layout_gravity=
"center_vertical"
>
</TextView>
</TextView>
</LinearLayout>
</LinearLayout>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id=
"@+id/smart_refresh"
android:id=
"@+id/smart_refresh"
android:layout_width=
"@dimen/dp343"
android:layout_width=
"@dimen/dp343"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"center_horizontal"
>
android:layout_below=
"@+id/ll_all_refund"
android:layout_centerHorizontal=
"true"
>
<com.scwang.smart.refresh.header.ClassicsHeader
<com.scwang.smart.refresh.header.ClassicsHeader
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
</com.scwang.smart.refresh.header.ClassicsHeader>
</com.scwang.smart.refresh.header.ClassicsHeader>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rcv_order_list"
android:id=
"@+id/rcv_order_list"
android:layout_width=
"343dp"
android:layout_width=
"343dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
>
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
>
</androidx.recyclerview.widget.RecyclerView>
</androidx.recyclerview.widget.RecyclerView>
<com.scwang.smart.refresh.footer.ClassicsFooter
<com.scwang.smart.refresh.footer.ClassicsFooter
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
>
android:layout_height=
"0dp"
>
...
@@ -84,5 +93,13 @@
...
@@ -84,5 +93,13 @@
</com.scwang.smart.refresh.footer.ClassicsFooter>
</com.scwang.smart.refresh.footer.ClassicsFooter>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
<com.yidian.bcommon.widget.CommonEmptyPageView
android:id=
"@+id/orderlist_empty_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:visibility=
"gone"
app:CommonEmptyPageView_empty_tips_text=
"这里什么都没有"
app:CommonEmptyPageView_place_holder_img=
"@drawable/bcommon_icon_nothing_place_holder"
android:layout_centerInParent=
"true"
/>
</RelativeLayout>
</layout>
</layout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment