Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
王海
TangKuPos
Commits
07b4b57f
Commit
07b4b57f
authored
Dec 25, 2017
by
zhang_z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
emptyView;
parent
b50ebd43
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
7 deletions
+38
-7
app/src/main/java/com/xingdata/zzdpos/ui/settle/fragment/VipFragment.java
...a/com/xingdata/zzdpos/ui/settle/fragment/VipFragment.java
+10
-0
app/src/main/res/layout/fragment_settle_vip.xml
app/src/main/res/layout/fragment_settle_vip.xml
+19
-1
app/src/main/res/layout/item_settle_vip.xml
app/src/main/res/layout/item_settle_vip.xml
+5
-1
app/src/main/res/layout/view_empty.xml
app/src/main/res/layout/view_empty.xml
+3
-4
app/src/main/res/mipmap-xhdpi/nong.png
app/src/main/res/mipmap-xhdpi/nong.png
+0
-0
app/src/main/res/mipmap-xxhdpi/nong.png
app/src/main/res/mipmap-xxhdpi/nong.png
+0
-0
app/src/main/res/mipmap-xxxhdpi/nong.png
app/src/main/res/mipmap-xxxhdpi/nong.png
+0
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+1
-1
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/settle/fragment/VipFragment.java
View file @
07b4b57f
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
.
fragment
;
package
com
.
xingdata
.
zzdpos
.
ui
.
settle
.
fragment
;
import
android.annotation.SuppressLint
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
...
@@ -25,10 +28,16 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
...
@@ -25,10 +28,16 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mViewBinding
.
setEmpty
(
true
);
mVipAdapter
=
new
VipAdapter
();
mVipAdapter
=
new
VipAdapter
();
mViewBinding
.
rlVip
.
setAdapter
(
mVipAdapter
);
mViewBinding
.
rlVip
.
setAdapter
(
mVipAdapter
);
mViewBinding
.
rlVip
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
mViewBinding
.
rlVip
.
setLayoutManager
(
new
LinearLayoutManager
(
mContext
));
@SuppressLint
(
"InflateParams"
)
View
emptyView
=
getLayoutInflater
().
inflate
(
R
.
layout
.
view_empty
,
null
);
((
TextView
)
emptyView
.
findViewById
(
R
.
id
.
tv_empty
)).
setText
(
R
.
string
.
settle_vip_search_empty
);
mVipAdapter
.
setEmptyView
(
emptyView
);
mVipAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
mVipAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
mPresenter
.
selectVip
(
mVipAdapter
.
getData
().
get
(
position
));
mPresenter
.
selectVip
(
mVipAdapter
.
getData
().
get
(
position
));
this
.
pop
();
this
.
pop
();
...
@@ -45,6 +54,7 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
...
@@ -45,6 +54,7 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
* @param vips 会员列表
* @param vips 会员列表
*/
*/
public
void
loadVips
(
List
<
Vip
>
vips
)
{
public
void
loadVips
(
List
<
Vip
>
vips
)
{
mViewBinding
.
setEmpty
(
vips
.
size
()
==
0
);
mVipAdapter
.
setNewData
(
vips
);
mVipAdapter
.
setNewData
(
vips
);
}
}
...
...
app/src/main/res/layout/fragment_settle_vip.xml
View file @
07b4b57f
...
@@ -2,6 +2,16 @@
...
@@ -2,6 +2,16 @@
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<import
type=
"android.view.View"
/>
<variable
name=
"empty"
type=
"boolean"
/>
</data>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
@@ -43,11 +53,19 @@
...
@@ -43,11 +53,19 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginBottom=
"@dimen/all_margin"
android:layout_marginBottom=
"@dimen/all_margin"
android:background=
"@color/gray_huanggai"
android:visibility=
"@{empty?View.GONE:View.VISIBLE}"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
android:background=
"@color/gray_huanggai"
/>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_vip"
android:id=
"@+id/rl_vip"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"match_parent"
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_settle_vip.xml
View file @
07b4b57f
...
@@ -93,7 +93,11 @@
...
@@ -93,7 +93,11 @@
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"parent"
/>
app:layout_constraintTop_toBottomOf=
"parent"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
</layout>
...
...
app/src/main/res/layout/view_empty.xml
View file @
07b4b57f
...
@@ -12,11 +12,10 @@
...
@@ -12,11 +12,10 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawablePadding=
"@dimen/all_margin"
android:drawablePadding=
"@dimen/all_margin"
android:drawableTop=
"@mipmap/
icon_things_null
"
android:drawableTop=
"@mipmap/
nong
"
android:gravity=
"center"
android:gravity=
"center"
android:lineSpacingExtra=
"@dimen/all_padding"
android:lineSpacingExtra=
"@dimen/all_padding"
android:text=
"@string/empty_other_select"
android:textColor=
"@color/gray_huanggai"
android:textColor=
"@color/white_half"
android:textSize=
"@dimen/all_text_size"
/>
android:textSize=
"@dimen/all_text_size_big"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/nong.png
0 → 100644
View file @
07b4b57f
8.07 KB
app/src/main/res/mipmap-xxhdpi/nong.png
0 → 100644
View file @
07b4b57f
12.4 KB
app/src/main/res/mipmap-xxxhdpi/nong.png
0 → 100644
View file @
07b4b57f
16.4 KB
app/src/main/res/values/strings.xml
View file @
07b4b57f
...
@@ -524,6 +524,7 @@
...
@@ -524,6 +524,7 @@
<!--支付里的Vip-->
<!--支付里的Vip-->
<string
name=
"settle_vip_search_hint"
>
请输入会员手机号
</string>
<string
name=
"settle_vip_search_hint"
>
请输入会员手机号
</string>
<string
name=
"settle_vip_search_empty"
>
请输入会员手机号进行搜索~
</string>
<string
name=
"settle_vip_none"
>
不需要会员
</string>
<string
name=
"settle_vip_none"
>
不需要会员
</string>
...
@@ -562,5 +563,4 @@
...
@@ -562,5 +563,4 @@
<string
name=
"statistics_todayVipAdd_hint"
>
今日新增会员
</string>
<string
name=
"statistics_todayVipAdd_hint"
>
今日新增会员
</string>
</resources>
</resources>
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