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
19f00c42
Commit
19f00c42
authored
Dec 26, 2017
by
姜敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加颜色
parent
2060f676
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
318 additions
and
13 deletions
+318
-13
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
...main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
+25
-0
app/src/main/java/com/xingdata/zzdpos/ui/vip/adapter/VipRechargeAdapter.java
...om/xingdata/zzdpos/ui/vip/adapter/VipRechargeAdapter.java
+32
-0
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipInfoFragment.java
.../com/xingdata/zzdpos/ui/vip/fragment/VipInfoFragment.java
+19
-0
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipListFragment.java
.../com/xingdata/zzdpos/ui/vip/fragment/VipListFragment.java
+3
-0
app/src/main/res/layout/fragment_vipinfo.xml
app/src/main/res/layout/fragment_vipinfo.xml
+119
-2
app/src/main/res/layout/item_vip_recharge_item.xml
app/src/main/res/layout/item_vip_recharge_item.xml
+63
-0
app/src/main/res/layout/title.xml
app/src/main/res/layout/title.xml
+9
-11
app/src/main/res/layout/title_pop.xml
app/src/main/res/layout/title_pop.xml
+46
-0
app/src/main/res/mipmap-xhdpi/pop_menu.9.png
app/src/main/res/mipmap-xhdpi/pop_menu.9.png
+0
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
View file @
19f00c42
...
...
@@ -5,7 +5,12 @@ import android.view.inputmethod.EditorInfo;
import
com.blankj.utilcode.util.KeyboardUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseSku
;
import
com.xingdata.zzdpos.databinding.ActivityStoreBinding
;
import
com.xingdata.zzdpos.model.Ms
;
import
com.xingdata.zzdpos.model.Sskugrp
;
import
java.util.List
;
public
class
StoreActivity
extends
BaseActivity
<
StorePresenter
,
ActivityStoreBinding
>
implements
StoreContract
.
View
{
...
...
@@ -27,4 +32,24 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
return
false
;
});
}
@Override
public
<
Sku
extends
BaseSku
>
void
loadSkus
(
List
<
Sku
>
skus
,
boolean
isRefresh
)
{
}
@Override
public
void
loadSkugrps
(
List
<
Sskugrp
>
sskugrps
)
{
}
@Override
public
void
loadMss
(
List
<
Ms
>
mss
)
{
}
@Override
public
<
Sku
extends
BaseSku
>
void
loadSearchResult
(
List
<
Sku
>
skus
,
boolean
isRefresh
)
{
}
}
app/src/main/java/com/xingdata/zzdpos/ui/vip/adapter/VipRechargeAdapter.java
0 → 100644
View file @
19f00c42
package
com
.
xingdata
.
zzdpos
.
ui
.
vip
.
adapter
;
import
android.content.Context
;
import
android.support.annotation.Nullable
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseAdapter
;
import
com.xingdata.zzdpos.databinding.ItemVipListItemBinding
;
import
com.xingdata.zzdpos.databinding.ItemVipRechargeItemBinding
;
import
com.xingdata.zzdpos.model.Vip
;
import
com.xingdata.zzdpos.model.VipRechangeOrder
;
import
java.util.List
;
/**
* Created by JM_DEV on 2017/12/25.
*/
public
class
VipRechargeAdapter
extends
BaseAdapter
<
VipRechangeOrder
,
ItemVipRechargeItemBinding
>
{
private
Context
mContext
;
public
VipRechargeAdapter
(
Context
mContext
,
@Nullable
List
<
VipRechangeOrder
>
data
)
{
super
(
R
.
layout
.
item_vip_list_item
,
data
);
this
.
mContext
=
mContext
;
}
@Override
protected
void
convert
(
ItemVipRechargeItemBinding
mViewBinding
,
VipRechangeOrder
item
)
{
// mViewBinding.vipName.setText(item.getVipName());
// mViewBinding.vipMobile.setText(String.valueOf(item.getVipMobile()));
// mViewBinding.vipDiscount.setText(String.valueOf(item.getVipDefDiscount()));
}
}
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipInfoFragment.java
View file @
19f00c42
...
...
@@ -4,15 +4,25 @@ package com.xingdata.zzdpos.ui.vip.fragment;
* Created by JM_DEV on 2017/12/21.
*/
import
android.support.v7.widget.LinearLayoutManager
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentVipinfoBinding
;
import
com.xingdata.zzdpos.model.VipRechangeOrder
;
import
com.xingdata.zzdpos.ui.vip.VipPresenter
;
import
com.xingdata.zzdpos.ui.vip.adapter.VipRechargeAdapter
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 会员信息界面
*/
public
class
VipInfoFragment
extends
BaseFragment
<
VipPresenter
,
FragmentVipinfoBinding
>
{
private
VipRechargeAdapter
vipRechargeAdapter
;
private
List
<
VipRechangeOrder
>
orders
=
new
ArrayList
<>();
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_vipinfo
;
...
...
@@ -20,7 +30,16 @@ public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentVipinfoB
@Override
public
void
initView
()
{
vipRechargeAdapter
=
new
VipRechargeAdapter
(
getActivity
(),
orders
);
mViewBinding
.
rechargeRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
rechargeRecyclerView
.
setAdapter
(
vipRechargeAdapter
);
mViewBinding
.
rechargeRefresh
.
setOnRefreshListener
(
this
::
onRefresh
);
}
private
void
onRefresh
()
{
vipRechargeAdapter
.
addData
(
new
ArrayList
<
VipRechangeOrder
>());
mViewBinding
.
rechargeRefresh
.
setRefreshing
(
false
);
ToastUtils
.
showShort
(
"刷新成功"
);
}
@Override
...
...
app/src/main/java/com/xingdata/zzdpos/ui/vip/fragment/VipListFragment.java
View file @
19f00c42
...
...
@@ -38,6 +38,9 @@ public class VipListFragment extends BaseFragment<VipPresenter, FragmentVipListB
mViewBinding
.
vipRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
()));
mViewBinding
.
vipRecyclerView
.
setAdapter
(
vipListAdapter
);
mViewBinding
.
vipRefresh
.
setOnRefreshListener
(
this
::
onRefresh
);
mViewBinding
.
vipRecyclerView
.
setOnClickListener
(
view
->
{
start
(
new
VipInfoFragment
());
});
}
private
void
onRefresh
()
{
...
...
app/src/main/res/layout/fragment_vipinfo.xml
View file @
19f00c42
...
...
@@ -4,9 +4,126 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/bg"
android:orientation=
"vertical"
>
<include
layout=
"@layout/title_pop"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_margin"
android:layout_marginTop=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"张思"
/>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"13311525312"
/>
</LinearLayout>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_margin=
"@dimen/all_margin"
android:text=
"@string/vip_info_discount"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/line_bg"
></View>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"可用金額"
/>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"50.00"
android:textColor=
"@color/reddeep"
/>
</LinearLayout>
<View
android:layout_width=
"1dp"
android:layout_height=
"40dp"
android:background=
"@color/line_bg"
></View>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<include
layout=
"@layout/title"
/>
<TextView
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"可用金額"
/>
<TextView
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"160.00"
android:textColor=
"@color/reddeep"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/line_bg"
></View>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/recharge_refresh"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rechargeRecyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_vip_recharge_item.xml
0 → 100644
View file @
19f00c42
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/all_margin"
android:background=
"@mipmap/pay_alipay"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/rechange_type"
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"支付宝支付"
/>
<TextView
android:id=
"@+id/rechange_time"
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"wrap_content"
android:textColor=
"@color/black_likui"
android:layout_height=
"wrap_content"
android:text=
"08-09 10:10"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_margin=
"@dimen/all_margin"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"right"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/rechange_money"
style=
"@style/default_blacktext_bigstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"+充值金额"
/>
<TextView
android:id=
"@+id/rechange_shop"
android:textColor=
"@color/black_likui"
style=
"@style/default_blacktext_smallstyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"充值总店"
/>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/title.xml
View file @
19f00c42
...
...
@@ -5,7 +5,7 @@
<variable
name=
"onClickListener"
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
</data>
...
...
@@ -19,12 +19,10 @@
<ImageButton
android:id=
"@+id/iv_back"
android:layout_width=
"
?attr/actionBarSize
"
android:layout_width=
"
60dp
"
android:layout_height=
"match_parent"
android:background=
"@color/transparent"
android:onClick=
"@{onClickListener}"
android:padding=
"@dimen/all_margin"
android:src=
"@mipmap/back_black"
/>
android:background=
"@mipmap/go_back"
android:onClick=
"@{onClickListener}"
/>
<TextView
android:id=
"@+id/tv_title"
...
...
@@ -33,7 +31,7 @@
android:layout_centerInParent=
"true"
android:text=
"标题"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
android:textSize=
"@dimen/text_secondary_title"
/>
</RelativeLayout>
...
...
app/src/main/res/layout/title_pop.xml
0 → 100644
View file @
19f00c42
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name=
"onClickListener"
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
</data>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@drawable/singleline_white_gray"
android:orientation=
"horizontal"
>
<ImageButton
android:id=
"@+id/iv_back"
android:layout_width=
"?attr/actionBarSize"
android:layout_height=
"match_parent"
android:background=
"@mipmap/go_back"
android:onClick=
"@{onClickListener}"
/>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:text=
"标题"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
<ImageButton
android:id=
"@+id/pop_menu"
android:layout_width=
"60dp"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:background=
"@mipmap/pop_menu"
android:onClick=
"@{onClickListener}"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/pop_menu.9.png
0 → 100644
View file @
19f00c42
324 Bytes
app/src/main/res/values/strings.xml
View file @
19f00c42
...
...
@@ -129,6 +129,8 @@
<string
name=
"vip_message_point_amt_hint"
>
积分可抵金额
</string>
<string
name=
"vip_message_point_cr_hint"
>
(100积分=1元)
</string>
<string
name=
"vip_message_ticket_none"
>
不使用优惠券
</string>
<string
name=
"vip_info_discount"
>
折扣:%s折
</string>
<!--抹零页面-->
...
...
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