Commit 4a0175ec authored by 姜敏's avatar 姜敏

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
#	app/src/main/java/com/xingdata/zzdpos/util/SystemUtil.java
parents 9671595b 60dc818c
......@@ -3,12 +3,24 @@
<words>
<w>baozheng</w>
<w>caocao</w>
<w>chengyaojin</w>
<w>diaochan</w>
<w>exps</w>
<w>guanyu</w>
<w>huanggai</w>
<w>huangxin</w>
<w>inputer</w>
<w>kongming</w>
<w>kongrun</w>
<w>likui</w>
<w>liubei</w>
<w>mawu</w>
<w>patt</w>
<w>shixiu</w>
<w>sunquan</w>
<w>xishi</w>
<w>yanqing</w>
<w>yuefei</w>
<w>zhangfei</w>
<w>zhouyu</w>
</words>
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xingdata.zzdpos">
package="com.xingdata.zzdpos">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<application
android:name=".App"
......@@ -50,6 +50,28 @@
android:name=".ui.payment.PaymentActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.marketing.integral.IntegralActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.marketing.ticket.ReturnTicketActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_ticket"
android:theme="@style/AppTheme" />
<activity
android:name=".ui.settle.SettleActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.announcement.AnnouncementActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".ui.help.HelpActivity" />
<activity android:name=".ui.feedback.FeedBackActivity"></activity>
<activity
android:name=".ui.vip.VipActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......
......@@ -14,6 +14,11 @@ public class C {
public static final int MENU_TICKET = 104;
public static final int MENU_STATISTICS = 105;
public static final int MENU_MANAGER = 106;
public static final int MENU_ANNOUNCEMENT = 107;
public static final int MENU_FEED = 108;
public static final int MENU_UPDATE = 109;
public static final int MENU_HELP = 110;
public static final int MENU_EXIT = 111;
}
......@@ -396,6 +401,8 @@ public class C {
public final class EXTRA_KEY {
public static final String EXCEPTION = "extra.key.exception";
public static final String SETTLE_MODE = "extra.key.settle.mode";
public static final String SETTLE_EXTRA = "extra.key.settle.extra";
}
......@@ -465,4 +472,9 @@ public class C {
//商品
public static final int SKU = 4;
}
public final class SETTLE_MODE {
public static final int PAYMENT = 1;
public static final int STORE = 2;
}
}
......@@ -4,18 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.EncryptUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.StringUtils;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import io.realm.Realm;
import io.realm.RealmObject;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.base.BaseModel;
import com.xingdata.zzdpos.db.DBFactory;
......@@ -33,6 +21,18 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.UserStoreInfo;
import com.xingdata.zzdpos.ui.splash.SplashPresenter;
import com.xingdata.zzdpos.util.SystemUtil;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import io.realm.Realm;
import io.realm.RealmObject;
/**
* 对接口封装
*
......@@ -240,9 +240,9 @@ public final class ApiFactory {
* @return
*/
public static Observable<Pager<com.xingdata.zzdpos.model.Saleorder>> getSaleOrderList(int pageNulmber, int
pageSize, String orderStatus, String orderNo,String wd) {
pageSize, String orderStatus, String orderNo, String wd) {
return Api.getInstance().service.getSaleOrder(pageNulmber, pageSize, orderStatus,
orderNo,wd).onErrorReturn(new
orderNo, wd).onErrorReturn(new
ErrorFilter<>()).map(new ResultFilter<>()).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
......@@ -399,7 +399,7 @@ public final class ApiFactory {
public static class Ussku {
public static Observable<Pager<com.xingdata.zzdpos.model.Ussku>> usskuQuery(int pageNum,
String keyword) {
String keyword) {
return Api.getInstance().service.usskuQuery(keyword, C.PRODUCT.PAGE_SIZE, pageNum)
.onErrorReturn(new
ErrorFilter<>()).map(new ResultFilter<>()).subscribeOn(Schedulers.io())
......@@ -541,8 +541,7 @@ public final class ApiFactory {
.retryWhen(new RetryHelper(3));
}
public static Observable<String> addOrderPayMis(com.xingdata.zzdpos.model.Saleorder.Pay
saleorderPay) {
public static Observable<com.xingdata.zzdpos.model.Saleorder> addOrderPayMis(com.xingdata.zzdpos.model.Saleorder.Pay saleorderPay) {
return Api.getInstance().service.addOrderPayMis(saleorderPay)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -575,7 +574,7 @@ public final class ApiFactory {
}
public static Observable<Pager<com.xingdata.zzdpos.model.Sssku>> querySssku(int pageNum,
String keyword, Long skuGrpId) {
String keyword, Long skuGrpId) {
return Api.getInstance().service.querySssku(pageNum, C.PRODUCT.PAGE_SIZE, skuGrpId,
keyword)
.onErrorReturn(new ErrorFilter<>())
......@@ -586,7 +585,7 @@ public final class ApiFactory {
}
public static Observable<Pager<com.xingdata.zzdpos.model.Sssku>> querySssku(int pageNum,
String keyword) {
String keyword) {
return Api.getInstance().service.querySssku(pageNum, C.PRODUCT.PAGE_SIZE, keyword)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -629,10 +628,10 @@ public final class ApiFactory {
* 添加库存盘点详情
*/
public static Observable<com.xingdata.zzdpos.model.CsDetail> addCsDetail(com.xingdata
.zzdpos
.model
.CsDetail
csDetail) {
.zzdpos
.model
.CsDetail
csDetail) {
return Api.getInstance().service.addCsDetail(csDetail)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -699,7 +698,7 @@ public final class ApiFactory {
* 查询公告列表
*/
public static Observable<Pager<com.xingdata.zzdpos.model.Notice>> queryNotice(int pageNum,
int pageSize) {
int pageSize) {
return Api.getInstance().service.queryNotice(pageNum, pageSize)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -739,7 +738,7 @@ public final class ApiFactory {
* 查询订货订单
*/
public static Observable<Pager<com.xingdata.zzdpos.model.Psb>> queryPsb(int pageNum,
int pageSize) {
int pageSize) {
return Api.getInstance().service.queryPsb(pageNum, pageSize)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -896,7 +895,7 @@ public final class ApiFactory {
}
public static Observable<com.xingdata.zzdpos.model.Ms> update(com.xingdata.zzdpos.model.Ms
ms) {
ms) {
return Api.getInstance().service.updateMs(ms)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -918,8 +917,8 @@ public final class ApiFactory {
public static class Level {
public static Observable<com.xingdata.zzdpos.model.Level> addVipLevel(com.xingdata.zzdpos
.model.Level
level) {
.model.Level
level) {
return Api.getInstance().service.addVipLevel(level)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -929,10 +928,10 @@ public final class ApiFactory {
}
public static Observable<com.xingdata.zzdpos.model.Level> updateVipLevel(com.xingdata
.zzdpos
.model
.Level
level) {
.zzdpos
.model
.Level
level) {
return Api.getInstance().service.updateVipLevel(level)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -986,7 +985,7 @@ public final class ApiFactory {
public static class Oper {
public static Observable<com.xingdata.zzdpos.model.Oper> addOper(com.xingdata.zzdpos.model
.Oper oper) {
.Oper oper) {
return Api.getInstance().service.addOper(oper)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......@@ -996,8 +995,8 @@ public final class ApiFactory {
}
public static Observable<com.xingdata.zzdpos.model.Oper> updateOper(com.xingdata.zzdpos
.model.Oper
oper) {
.model.Oper
oper) {
return Api.getInstance().service.updateOper(oper)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
......
......@@ -194,7 +194,7 @@ interface ApiService {
Observable<HttpMessage<String>> addOrderMis(@Body Saleorder.Param saleorderParam);
@POST(C.URL.SALEORDER.addOrderPayMis)
Observable<HttpMessage<String>> addOrderPayMis(@Body Saleorder.Pay saleorderPay);
Observable<HttpMessage<Saleorder>> addOrderPayMis(@Body Saleorder.Pay saleorderPay);
@POST(C.URL.USER.query)
Observable<HttpMessage<Pager<Vip>>> queryDetailByWD(@Query("wd") String keyword, @Query
......
......@@ -10,6 +10,7 @@ import android.view.KeyEvent;
import android.view.View;
import com.hwangjr.rxbus.RxBus;
import com.xingdata.zzdpos.util.InstanceUtil;
import java.lang.reflect.ParameterizedType;
import java.util.ArrayList;
......@@ -17,7 +18,6 @@ import java.util.List;
import me.yokeyword.fragmentation.ISupportFragment;
import me.yokeyword.fragmentation.SupportActivity;
import com.xingdata.zzdpos.util.InstanceUtil;
/**
* BaseActivity,供新创建的Activity继承
......@@ -57,11 +57,9 @@ public abstract class BaseActivity<P extends BasePresenter, B extends ViewDataBi
protected void initPresenter() {
if (this instanceof BaseView &&
this.getClass().getGenericSuperclass() instanceof ParameterizedType &&
((ParameterizedType) (this.getClass().getGenericSuperclass())).getActualTypeArguments().length > 0) {
Class mPresenterClass = (Class) ((ParameterizedType) (this.getClass()
.getGenericSuperclass())).getActualTypeArguments()[0];
if (this instanceof BaseView && this.getClass().getGenericSuperclass() instanceof ParameterizedType
&& ((ParameterizedType) (this.getClass().getGenericSuperclass())).getActualTypeArguments().length > 0) {
Class mPresenterClass = (Class) ((ParameterizedType) (this.getClass().getGenericSuperclass())).getActualTypeArguments()[0];
mPresenter = InstanceUtil.getInstance(mPresenterClass);
mPresenter.setIntent(getIntent()).setView(this).build();
}
......
......@@ -69,7 +69,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
}
protected void seConfirmEnable( boolean isEnable){
protected void seConfirmEnable(boolean isEnable) {
mBaseBinding.btnConfirm.setEnabled(isEnable);
}
......@@ -143,7 +143,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
super.onActivityCreated(savedInstanceState);
if (!isEasy()) {
WindowManager.LayoutParams attributes = getDialog().getWindow().getAttributes();
attributes.width = ScreenUtils.getScreenWidth() * 45 / 100;
attributes.width = ScreenUtils.getScreenWidth() * 95 / 100;
attributes.height = -2;
getDialog().getWindow().setAttributes(attributes);
}
......
......@@ -35,7 +35,6 @@ public abstract class BasePresenter<V> {
protected Realm getRealm() {
if (mRealm == null) {
mRealm = Realm.getInstance(App.instance.mRealmConfig);
// mRealm.setAutoRefresh(false);
}
return mRealm;
}
......
package com.xingdata.zzdpos.db;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.base.BaseModel;
import com.xingdata.zzdpos.model.HandoverInfo;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observable;
import io.realm.Realm;
import io.realm.RealmModel;
import io.realm.RealmObject;
import io.realm.RealmQuery;
import io.realm.RealmResults;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.base.BaseModel;
import io.realm.Sort;
public class DBFactory {
public static class Main {
/**
* 查询交班记录
*/
public static HandoverInfo queryHandoverInfo(Long operId, String date) {
return DB.getInstance().get(MainPresenter.class).where(HandoverInfo.class)
.equalTo("operId", operId)
.equalTo("date", date)
.findFirst();
}
/**
* 更改交班记录
*/
public static void updateHandoverInfo(HandoverInfo handoverInfo) {
DB.getInstance().get(MainPresenter.class).executeTransaction(new Realm.Transaction() {
@Override
public void execute(Realm realm) {
realm.copyToRealmOrUpdate(handoverInfo);
}
});
}
}
public static class Settle {
/**
* 查询支付渠道
*
* @return 支付渠道
*/
public static Observable<List<Pay>> queryPays() {
RealmQuery<Pay> query = DB.getInstance().get(SettlePresenter.class).where(Pay.class);
query.equalTo("payDispFlag", 1);
return Observable.just(query.findAll())
.flatMap(pays -> Observable.just(getList(pays)));
}
/**
* 查询营销活动
*
* @return 营销活动
*/
public static Observable<List<Ms>> queryMss() {
RealmQuery<Ms> query = DB.getInstance().get(SettlePresenter.class).where(Ms.class);
query.equalTo("msStatus", 0);
return Observable.just(query.findAllSorted("msTouchTag2", Sort.DESCENDING))
.flatMap(ms -> Observable.just(getList(ms)));
}
}
public static <E extends RealmModel> List<E> getLimitList(RealmResults<E> data, int offset, int limit) {
......
......@@ -2,7 +2,6 @@ package com.xingdata.zzdpos.model;
import com.alibaba.fastjson.annotation.JSONField;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseBean;
import com.xingdata.zzdpos.base.BaseModel;
......@@ -40,64 +39,32 @@ public class Pay extends RealmObject implements BaseModel, BaseBean {
public void init() {
switch (getPayType()) {
case C.PAY_CHANNEL.CASH:
iconId = new int[]{R.mipmap.pay_xianjin_no, R.mipmap.pay_xianjin};
// iconId = new int[]{R.mipmap.pay_xianjin_no, R.mipmap.pay_xianjin};
isSelected = true;
break;
case C.PAY_CHANNEL.ALI:
iconId = new int[]{R.mipmap.pay_zhifubao_no, R.mipmap.pay_zhifubao};
// iconId = new int[]{R.mipmap.pay_zhifubao_no, R.mipmap.pay_zhifubao};
break;
case C.PAY_CHANNEL.WECHAT:
iconId = new int[]{R.mipmap.pay_weixin_no, R.mipmap.pay_weixin};
// iconId = new int[]{R.mipmap.pay_weixin_no, R.mipmap.pay_weixin};
break;
case C.PAY_CHANNEL.BANK:
iconId = new int[]{R.mipmap.pay_yinlian_no, R.mipmap.pay_yinlian};
// iconId = new int[]{R.mipmap.pay_yinlian_no, R.mipmap.pay_yinlian};
break;
case C.PAY_CHANNEL.CARD:
iconId = new int[]{R.mipmap.pay_chuzhi_no, R.mipmap.pay_chuzhi};
// iconId = new int[]{R.mipmap.pay_chuzhi_no, R.mipmap.pay_chuzhi};
isNeedVip = true;
break;
case C.PAY_CHANNEL.TALLY:
iconId = new int[]{R.mipmap.pay_shezhang_no, R.mipmap.pay_shezhang};
// iconId = new int[]{R.mipmap.pay_shezhang_no, R.mipmap.pay_shezhang};
isNeedVip = true;
break;
default:
iconId = new int[]{R.mipmap.pay_xianjin_no, R.mipmap.pay_xianjin};
// iconId = new int[]{R.mipmap.pay_xianjin_no, R.mipmap.pay_xianjin};
break;
}
}
// public BasePayFragment createView(Vip vip, Saleorder saleorder) {
// BasePayFragment basePayFragment = null;
// switch (payType) {
// case C.PAY_CHANNEL.CASH:
// basePayFragment = new CashPayFragment();
// break;
// case C.PAY_CHANNEL.ALI:
// basePayFragment = new AliPayFragment();
// break;
// case C.PAY_CHANNEL.WECHAT:
// basePayFragment = new WechatPayFragment();
// break;
// case C.PAY_CHANNEL.BANK:
// basePayFragment = new BankPayFragment();
// break;
// case C.PAY_CHANNEL.CARD:
// basePayFragment = new CardPayFragment();
// break;
// case C.PAY_CHANNEL.TALLY:
// basePayFragment = new TallyPayFragment();
// break;
// default:
// basePayFragment = new CashPayFragment();
// break;
// }
// basePayFragment.mVip = vip;
// basePayFragment.mSaleorder = saleorder;
// basePayFragment.mPayType = payType;
//
// return basePayFragment;
// }
@PrimaryKey
private Long id;
......
......@@ -255,6 +255,12 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
private long msDisAmt;
/**
* 支付方式
*/
@JSONField(serialize = false)
private int payType;
/**
* 设置订单的商品详情
*
......@@ -983,7 +989,6 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
}
@Override
public String getPayChange() {
return null;
......@@ -996,7 +1001,7 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
@Override
public String getGoodsAmtSum() {
return ConvertUtil.fenToYuan(orderAuthAmt,true);
return ConvertUtil.fenToYuan(orderAuthAmt, true);
}
@Override
......@@ -1011,8 +1016,8 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
@Override
public List<BaseGoodPrint> getGoodList() {
List<BaseGoodPrint> baseGoodPrints=new ArrayList<>();
for (Saledetail saledetail:saledetailList){
List<BaseGoodPrint> baseGoodPrints = new ArrayList<>();
for (Saledetail saledetail : saledetailList) {
baseGoodPrints.add(saledetail);
}
return baseGoodPrints;
......@@ -1063,6 +1068,15 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
return shopNameabcn;
}
public int getPayType() {
return payType;
}
public void setPayType(int payType) {
this.payType = payType;
}
/**
* 优惠项目实体类
*/
......
package com.xingdata.zzdpos.ui.announcement;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityAnnouncementBinding;
import com.xingdata.zzdpos.model.Notice;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.announcement.fragment.AnnouncementFragment;
import com.xingdata.zzdpos.util.OnClickListener;
public class AnnouncementActivity extends BaseActivity<AnnouncementPresenter, ActivityAnnouncementBinding> implements AnnouncementContract.View {
private AnnouncementFragment mAnnouncementFragment = new AnnouncementFragment();
@Override
public int getLayoutId() {
return R.layout.activity_announcement;
}
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("公告");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
finish();
}
});
loadRootFragment(R.id.fragment_container, mAnnouncementFragment, false, false);
}
// @Override
// public void showAnnouncementDetail(Notice s) {
// mAnnouncementDetailFragment.showAnnouncementDetail(s);
// }
@Override
public void loadNotice(Pager<Notice> noticePager, boolean isRefresh) {
mAnnouncementFragment.setData(noticePager, isRefresh);
}
}
package com.xingdata.zzdpos.ui.announcement;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Notice;
import com.xingdata.zzdpos.model.Pager;
public interface AnnouncementContract {
interface View extends BaseView {
/**
* 加载列表
*/
void loadNotice(Pager<Notice> noticePager, boolean isRefresh);
}
abstract class Presenter extends BasePresenter<View> {
/**
* 初始化查询公告列表
*/
abstract void queryNoticeList();
public abstract void refreshAnnouncement();
public abstract void loadMoreAnnouncement();
}
}
package com.xingdata.zzdpos.ui.announcement;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.api.ApiFactory;
public class AnnouncementPresenter extends AnnouncementContract.Presenter {
private int nowPageNumber = 1;
private int nowPageSize = 10;
@Override
public void onAttached() {
}
@Override
public void queryNoticeList() {
ApiFactory.Notice.queryNotice(nowPageNumber, nowPageSize).doFinally(() -> {
// mView.isShowLoading(false);
})
.subscribe(noticePager -> {
if (noticePager.getTotalRow() == 0) {
ToastUtils.showShort("抱歉,暂无公告");
}
//判断是否能加载更多
mView.loadNotice(noticePager, nowPageNumber == 1);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void refreshAnnouncement() {
this.nowPageNumber = 1;
queryNoticeList();
}
@Override
public void loadMoreAnnouncement() {
this.nowPageNumber++;
queryNoticeList();
}
}
\ No newline at end of file
package com.xingdata.zzdpos.ui.announcement.adapter;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;
import com.blankj.utilcode.util.TimeUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemAnnouncementDetailBinding;
import com.xingdata.zzdpos.model.Notice;
import java.util.List;
public class AnnouncementAdapter extends BaseAdapter<Notice, ItemAnnouncementDetailBinding> {
public AnnouncementAdapter(@Nullable List<Notice> data) {
super(R.layout.item_announcement_detail, data);
}
@Override
protected void convert(ItemAnnouncementDetailBinding mViewBinding, Notice item) {
mViewBinding.date.setText(TimeUtils.millis2String(item.getCreateTime()));
mViewBinding.title.setText(item.getNoticeTitle());
mViewBinding.body.setText(item.getNoticeDesc());
}
@Override
protected View getItemView(int layoutResId, ViewGroup parent) {
return super.getItemView(layoutResId, parent);
}
}
package com.xingdata.zzdpos.ui.announcement.fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentAnnouncementBinding;
import com.xingdata.zzdpos.model.Notice;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.announcement.AnnouncementPresenter;
import com.xingdata.zzdpos.ui.announcement.adapter.AnnouncementAdapter;
import java.util.ArrayList;
public class AnnouncementFragment extends BaseFragment<AnnouncementPresenter, FragmentAnnouncementBinding> {
private AnnouncementAdapter announcementAdapter;
@Override
public int getLayoutId() {
return R.layout.fragment_announcement;
}
@Override
protected boolean isLazy() {
return false;
}
@Override
public void initView() {
initRecycler();
mPresenter.queryNoticeList();
}
private void initRecycler() {
mViewBinding.announcementRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
announcementAdapter = new AnnouncementAdapter(new ArrayList<>());
announcementAdapter.bindToRecyclerView(mViewBinding.announcementRecycler);
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
announcementAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.announcementRecycler);
}
private void onRefresh() {
mPresenter.refreshAnnouncement();
}
private void onLoadMore() {
mPresenter.loadMoreAnnouncement();
}
/**
* 设置数据
*
* @param pager 数据
* @param isRefresh 是否刷新
*/
public void setData(Pager<Notice> pager, boolean isRefresh) {
if (isRefresh) {
announcementAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false);
}
if (isRefresh) announcementAdapter.setNewData(pager.getList());
else if (pager.getList().size() > 0) announcementAdapter.addData(pager.getList());
if (pager.isLastPage()) announcementAdapter.loadMoreEnd(isRefresh);
else announcementAdapter.loadMoreComplete();
}
}
package com.xingdata.zzdpos.ui.feedback;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.databinding.ActivityFeedBackBinding;
import com.xingdata.zzdpos.model.Feed;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.util.OnClickListener;
public class FeedBackActivity extends AppCompatActivity {
private ActivityFeedBackBinding mFeedBackBinding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View root = LayoutInflater.from(this).inflate(R.layout.activity_feed_back, null);
setContentView(root);
mFeedBackBinding = DataBindingUtil.bind(root);
mFeedBackBinding.icTitle.tvTitle.setText(R.string.feedBack_hint);
mFeedBackBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
finish();
}
});
mFeedBackBinding.setTextSize("0");
mFeedBackBinding.editText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
mFeedBackBinding.setTextSize(mFeedBackBinding.editText.getText().toString().length() + "");
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
}
});
mFeedBackBinding.btnSubmit.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
if (mFeedBackBinding.editText.getText().length() < 10) {
ToastUtils.showShort("请详细描述下您遇到的问题");
} else {
Feed feed = new Feed();
feed.setFeedText(mFeedBackBinding.editText.getText().toString() + "联系方式:" + mFeedBackBinding.editContactWay.getText().toString());
feed.setOpMapId(LoginPresenter.loginReturnBean.getOpMapId());
feed.setOperMobile(LoginPresenter.loginReturnBean.getOperMobile());
feed.setFeedFlag("0");
feed.setOpNameabcn(LoginPresenter.loginReturnBean.getOperName());
clickFeedOk(feed);
}
}
});
}
public void clickFeedOk(Feed feed) {
ApiFactory.Feed.addFeed(feed)
.subscribe(object -> {
finish();
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
protected void onPause() {
KeyboardUtils.hideSoftInput(this);
super.onPause();
}
}
package com.xingdata.zzdpos.ui.help;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.databinding.ActivityHelpBinding;
import com.xingdata.zzdpos.util.OnClickListener;
public class HelpActivity extends AppCompatActivity {
private ActivityHelpBinding mHelpBinding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View root = LayoutInflater.from(this).inflate(R.layout.activity_help, null);
setContentView(root);
mHelpBinding = DataBindingUtil.bind(root);
mHelpBinding.icTitle.tvTitle.setText(R.string.help_hint);
mHelpBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
finish();
}
});
}
}
......@@ -22,6 +22,8 @@ import com.xingdata.zzdpos.ui.login.fragment.SignInFragment;
import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.payment.PaymentActivity;
import com.xingdata.zzdpos.ui.splash.SplashActivity;
import com.xingdata.zzdpos.view.PopupWindowDownList;
......@@ -136,7 +138,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
promptDialog.dismiss();
//如果sn已经绑定款台,则直接跳转主页
if (loginReturnBean.getBindSN()) {
startActivity(new Intent(LoginActivity.this, MainActivity.class));
startActivity(new Intent(LoginActivity.this, IntegralActivity.class));
LoginActivity.this.finish();
return;
}
......
......@@ -2,24 +2,41 @@ package com.xingdata.zzdpos.ui.main;
import android.app.Activity;
import android.databinding.DataBindingUtil;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityMainBinding;
import com.xingdata.zzdpos.databinding.ItemMenuBottomBinding;
import com.xingdata.zzdpos.ui.main.adapter.FragmentViewAdapter;
import com.xingdata.zzdpos.ui.main.dialog.HandoverDialog;
import com.xingdata.zzdpos.ui.main.fragment.CasherFragment;
import com.xingdata.zzdpos.ui.main.fragment.MyselfFragment;
import com.xingdata.zzdpos.ui.main.fragment.ServiceFragment;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Scheduler;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBinding> {
private int[] titleInts={R.string.menu_cashier,R.string.menu_service,R.string.menu_myself};
private int[] iconList ={R.mipmap.icon_menu_cashier_1,R.mipmap.icon_menu_service_0,R.mipmap.icon_menu_myself_0};
public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBinding> implements MainContract.View {
private int[] titleInts = {R.string.menu_cashier, R.string.menu_service, R.string.menu_myself};
private int[] iconList = {R.mipmap.icon_menu_cashier_1, R.mipmap.icon_menu_service_0, R.mipmap.icon_menu_myself_0};
private FragmentPagerAdapter mFragmentPagerAdapter;
// private List<View> views=new ArrayList<>();
private List<ItemMenuBottomBinding> itemMenuBottomBindings = new ArrayList<>();
private HandoverDialog mHandoverDialog = new HandoverDialog();
@Override
public int getLayoutId() {
......@@ -28,30 +45,64 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
@Override
public void initView() {
mPresenter.initHandoverInfo();
List<Fragment> fragments = new ArrayList<>();
fragments.add(new CasherFragment());
fragments.add(new CasherFragment());
fragments.add(new CasherFragment());
fragments.add(new ServiceFragment());
fragments.add(new MyselfFragment());
mFragmentPagerAdapter = new FragmentViewAdapter(fragments, getSupportFragmentManager());
mViewBinding.fragmentContainer.setAdapter(mFragmentPagerAdapter);
mViewBinding.tabLayout.setupWithViewPager(mViewBinding.fragmentContainer);
setupTabIcons();
initMenuBottomView();
}
private void initMenuBottomView() {
Observable.create(new ObservableOnSubscribe<View>() {
@Override
public void subscribe(ObservableEmitter<View> e) throws Exception {
e.onNext(getLayoutInflater().inflate(R.layout.item_menu_bottom, null));
e.onNext(getLayoutInflater().inflate(R.layout.item_menu_bottom, null));
e.onNext(getLayoutInflater().inflate(R.layout.item_menu_bottom, null));
}
}).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<View>() {
int i = 0;
@Override
public void accept(View view) throws Exception {
ItemMenuBottomBinding itemMenuBottomBinding = DataBindingUtil.bind(view);
itemMenuBottomBinding.text.setText(titleInts[i]);
if (i == 0) {
itemMenuBottomBinding.text.setTextColor(getResources().getColor(R.color.red_guanyu));
}
itemMenuBottomBinding.img.setImageResource(iconList[i]);
itemMenuBottomBindings.add(itemMenuBottomBinding);
mViewBinding.tabLayout.getTabAt(i).setCustomView(view);
i++;
}
});
mViewBinding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
switch (tab.getPosition()) {
case 0:
tab.setIcon(R.mipmap.icon_menu_cashier_1);
itemMenuBottomBindings.get(0).img.setImageResource(R.mipmap.icon_menu_cashier_1);
itemMenuBottomBindings.get(0).text.setTextColor(getResources().getColor(R.color.red_guanyu));
break;
case 1:
tab.setIcon(R.mipmap.icon_menu_service_1);
itemMenuBottomBindings.get(1).img.setImageResource(R.mipmap.icon_menu_service_1);
itemMenuBottomBindings.get(1).text.setTextColor(getResources().getColor(R.color.red_guanyu));
break;
case 2:
tab.setIcon(R.mipmap.icon_menu_myself_1);
itemMenuBottomBindings.get(2).img.setImageResource(R.mipmap.icon_menu_myself_1);
itemMenuBottomBindings.get(2).text.setTextColor(getResources().getColor(R.color.red_guanyu));
break;
}
}
......@@ -60,13 +111,16 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
public void onTabUnselected(TabLayout.Tab tab) {
switch (tab.getPosition()) {
case 0:
tab.setIcon(R.mipmap.icon_menu_cashier_0);
itemMenuBottomBindings.get(0).img.setImageResource(R.mipmap.icon_menu_cashier_0);
itemMenuBottomBindings.get(0).text.setTextColor(getResources().getColor(R.color.black_likui));
break;
case 1:
tab.setIcon(R.mipmap.icon_menu_service_0);
itemMenuBottomBindings.get(1).img.setImageResource(R.mipmap.icon_menu_service_0);
itemMenuBottomBindings.get(1).text.setTextColor(getResources().getColor(R.color.black_likui));
break;
case 2:
tab.setIcon(R.mipmap.icon_menu_myself_0);
itemMenuBottomBindings.get(2).img.setImageResource(R.mipmap.icon_menu_myself_0);
itemMenuBottomBindings.get(2).text.setTextColor(getResources().getColor(R.color.black_likui));
break;
}
}
......@@ -80,13 +134,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
private void setupTabIcons() {
for (int i = 0; i < 3; i++) {
mViewBinding.tabLayout.getTabAt(i).setIcon(iconList[i]).setText(titleInts[i]);
}
@Override
public void showHandoverDialog() {
mHandoverDialog.show(this);
}
}
......@@ -17,10 +17,10 @@ interface MainContract {
// */
// void showChangePasswordDialog();
//
// /**
// * 显示交班报表页面
// */
// void showHandoverDialog();
/**
* 显示交班报表页面
*/
void showHandoverDialog();
//
// /**
// * 显示反馈页面
......@@ -270,10 +270,10 @@ interface MainContract {
// */
// public abstract void clickChangePassword();
//
// /**
// * 菜单EXIT页面 - 点击交班 打开交班报表页面
// */
// public abstract void clickHandover();
/**
* 菜单EXIT页面 - 点击交班 打开交班报表页面
*/
public abstract void clickHandover();
//
//
// /**
......@@ -507,15 +507,15 @@ interface MainContract {
// */
// public abstract void sync(SplashPresenter.SynchronousTask synchronousTask);
//
// /**
// * 初始化交班记录
// */
// public abstract void initHandoverInfo();
//
// /**
// * 交班确认
// */
// public abstract void clickHandoverOk();
/**
* 初始化交班记录
*/
public abstract void initHandoverInfo();
/**
* 交班确认
*/
public abstract void clickHandoverOk();
//
// /**
// * 点击换购确定按钮
......
......@@ -12,6 +12,9 @@ import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.api.print.ZX_PrintPOS;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.HandoverInfo;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import java.text.SimpleDateFormat;
......@@ -24,11 +27,8 @@ import io.reactivex.ObservableSource;
import io.reactivex.functions.Function;
public class MainPresenter extends MainContract.Presenter {
@Override
public void onAttached() {
}
// public static HandoverInfo handoverInfo;
public static HandoverInfo handoverInfo;
//
// /**
// * 当前的使用的支付方式
......@@ -94,10 +94,10 @@ public class MainPresenter extends MainContract.Presenter {
// private ScannerUtil mScannerUtil;
//
//
// @Override
// public void onAttached() {
// this.initRealm();
//
@Override
public void onAttached() {
this.initRealm();
// mVip = Vip.createDefault();
// mCartProducts = new ArrayList<>();
// mOrderInfo = new Saleorder();
......@@ -114,8 +114,8 @@ public class MainPresenter extends MainContract.Presenter {
// this.getPayChannels();
// //获取营销活动信息
// this.getMsList();
// }
//
}
// @Override
// public void clickLock() {
// mView.goLockActivity();
......@@ -131,11 +131,11 @@ public class MainPresenter extends MainContract.Presenter {
// mView.showChangePasswordDialog();
// }
//
// @Override
// public void clickHandover() {
// mView.showHandoverDialog();
// }
//
@Override
public void clickHandover() {
mView.showHandoverDialog();
}
//
// @Override
// public void clickFeedback() {
......@@ -869,28 +869,28 @@ public class MainPresenter extends MainContract.Presenter {
// }
//
//
// @Override
// public void initHandoverInfo() {
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd", Locale.getDefault());
// String time = TimeUtils.millis2String(System.currentTimeMillis(), simpleDateFormat);
// handoverInfo = DBFactory.Main.queryHandoverInfo(LoginPresenter.loginReturnBean.getOperId
// (), time);
// if (handoverInfo == null) {
// handoverInfo = new HandoverInfo();
// handoverInfo.setId(Long.valueOf(LoginPresenter.loginReturnBean.getOperId() + time));
// handoverInfo.setDate(time);
// handoverInfo.setOperId(LoginPresenter.loginReturnBean.getOperId());
// handoverInfo.setAlipay(0L);
// handoverInfo.setPos(0L);
// handoverInfo.setCash(0L);
// handoverInfo.setFinallyAmt(0L);
// handoverInfo.setSumOrder(0L);
// handoverInfo.setVip(0L);
// handoverInfo.setWechat(0L);
// DBFactory.Main.updateHandoverInfo(handoverInfo);
// }
// }
//
@Override
public void initHandoverInfo() {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd", Locale.getDefault());
String time = TimeUtils.millis2String(System.currentTimeMillis(), simpleDateFormat);
handoverInfo = DBFactory.Main.queryHandoverInfo(LoginPresenter.loginReturnBean.getOperId
(), time);
if (handoverInfo == null) {
handoverInfo = new HandoverInfo();
handoverInfo.setId(Long.valueOf(LoginPresenter.loginReturnBean.getOperId() + time));
handoverInfo.setDate(time);
handoverInfo.setOperId(LoginPresenter.loginReturnBean.getOperId());
handoverInfo.setAlipay(0L);
handoverInfo.setPos(0L);
handoverInfo.setCash(0L);
handoverInfo.setFinallyAmt(0L);
handoverInfo.setSumOrder(0L);
handoverInfo.setVip(0L);
handoverInfo.setWechat(0L);
DBFactory.Main.updateHandoverInfo(handoverInfo);
}
}
// /**
// * 更新交班信息
// */
......@@ -929,14 +929,14 @@ public class MainPresenter extends MainContract.Presenter {
// getRealm().copyToRealmOrUpdate(handoverInfo);
// getRealm().commitTransaction();
// }
//
//
// @Override
// public void clickHandoverOk() {
@Override
public void clickHandoverOk() {
// logout();
// mView.handoverOk();
// }
//
}
// @Override
// public void clickFeedOk(Feed feed) {
// ApiFactory.Feed.addFeed(feed)
......
package com.xingdata.zzdpos.ui.main.adapter;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemMyselfStringBinding;
import com.xingdata.zzdpos.databinding.ItemStringBinding;
import java.util.List;
/**
* Created by Administrator on 2017/12/21.
*/
public class MySelfRecyclerAdapter extends BaseAdapter<Integer, ItemMyselfStringBinding> {
private Context mContext;
private Integer titleId;
private Integer imgId;
public MySelfRecyclerAdapter(Context mContext, @Nullable List<Integer> integers) {
super(R.layout.item_myself_string, integers);
this.mContext = mContext;
}
@Override
protected void convert(ItemMyselfStringBinding mViewBinding, Integer item) {
switch (item) {
case C.MENU.MENU_ANNOUNCEMENT:
titleId = R.string.menu_announcement;
imgId = R.mipmap.ic_announcement;
break;
case C.MENU.MENU_FEED:
titleId = R.string.menu_feed;
imgId = R.mipmap.ic_feedback;
break;
case C.MENU.MENU_UPDATE:
titleId = R.string.menu_update;
imgId = R.mipmap.ic_upgrade;
break;
case C.MENU.MENU_HELP:
titleId = R.string.menu_help;
imgId = R.mipmap.ic_helping;
break;
case C.MENU.MENU_EXIT:
titleId = R.string.menu_exit;
imgId = R.mipmap.ic_out;
break;
}
mViewBinding.itemTv.setText(titleId);
Drawable drawable=mContext.getDrawable(imgId);
drawable.setBounds(0,0,(int)mViewBinding.itemTv.getTextSize()+20,(int)mViewBinding.itemTv.getTextSize()+20);
Drawable drawableRight=mContext.getDrawable(R.mipmap.drop_down);
drawableRight.setBounds(0,0,(int)mViewBinding.itemTv.getTextSize(),(int)mViewBinding.itemTv.getTextSize());
mViewBinding.itemTv.setCompoundDrawables(drawable,null,drawableRight,null);
}
}
package com.xingdata.zzdpos.ui.main.dialog;
import android.view.View;
import com.blankj.utilcode.util.TimeUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.databinding.DialogHandoverBinding;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
/**
* 交班页面
*/
public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBinding> {
@Override
public int getLayoutId() {
return R.layout.dialog_handover;
}
@Override
public int getTitle() {
return R.string.handover_hint;
}
@Override
public void onConfirmClick(View view) {
super.onConfirmClick(view);
mPresenter.clickHandoverOk();
}
@Override
public void initView() {
if (MainPresenter.handoverInfo == null) {
mPresenter.initHandoverInfo();
}
mViewBinding.setOperName(LoginPresenter.loginReturnBean.getOperName());
mViewBinding.setDate(TimeUtils.getNowString());
mViewBinding.setAlipay(ConvertUtil.fenToYuan(MainPresenter.handoverInfo.getAlipay(), true));
mViewBinding.setWechat(ConvertUtil.fenToYuan(MainPresenter.handoverInfo.getWechat(), true));
mViewBinding.setCash(ConvertUtil.fenToYuan(MainPresenter.handoverInfo.getCash(), true));
mViewBinding.setVipPay(ConvertUtil.fenToYuan(MainPresenter.handoverInfo.getVip(), true));
mViewBinding.setBank(ConvertUtil.fenToYuan(MainPresenter.handoverInfo.getPos(), true));
mViewBinding.handoverTvSumamt.setText(ConvertUtil.fenToYuan(MainPresenter.handoverInfo.getFinallyAmt(), true));
mViewBinding.setOrderNum(String.valueOf(MainPresenter.handoverInfo.getSumOrder()));
}
}
package com.xingdata.zzdpos.ui.main.fragment;
import android.content.Intent;
import android.support.v7.widget.GridLayoutManager;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ActivityUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C;
......@@ -13,14 +17,19 @@ import com.xingdata.zzdpos.databinding.FragmentCasherBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import com.xingdata.zzdpos.ui.vip.VipActivity;
import com.xingdata.zzdpos.ui.payment.PaymentActivity;
import com.xingdata.zzdpos.ui.splash.SplashActivity;
import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
public class CasherFragment extends BaseFragment<MainPresenter,FragmentCasherBinding> {
public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBinding> {
private MenuRecyclerAdapter mMenuRecyclerAdapter;
private List<Integer> integers;
@Override
public int getLayoutId() {
return R.layout.fragment_casher;
......@@ -39,15 +48,15 @@ public class CasherFragment extends BaseFragment<MainPresenter,FragmentCasherBin
integers.add(106);
mMenuRecyclerAdapter = new MenuRecyclerAdapter(getActivity(), integers);
mMenuRecyclerAdapter.bindToRecyclerView(mViewBinding.fragmentCasherRecycler);
// mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyItemDecoration(getActivity(), 2, R.color.black_zhangfei));
mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyMenuItemDecoration(getActivity(), 5, getResources().getColor(R.color.golden_yuji)));
mMenuRecyclerAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
switch ((int)adapter.getData().get(position)) {
switch ((int) adapter.getData().get(position)) {
case C.MENU.MENU_VIP://会员
ActivityUtils.startActivity(new Intent(getActivity(),VipActivity.class));
break;
case C.MENU.MENU_RECHARGE://充值
case C.MENU.MENU_RECHARGE://充值
break;
case C.MENU.MENU_MS://营销
......@@ -66,5 +75,24 @@ public class CasherFragment extends BaseFragment<MainPresenter,FragmentCasherBin
}
}
});
mViewBinding.tvPayment.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.startActivity(getActivity(), PaymentActivity.class);
}
});
mViewBinding.tvSplash.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.startActivity(getActivity(), SplashActivity.class);
}
});
mViewBinding.btnHandover.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
mPresenter.clickHandover();
}
});
}
}
package com.xingdata.zzdpos.ui.main.fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentMyselfBinding;
import com.xingdata.zzdpos.ui.announcement.AnnouncementActivity;
import com.xingdata.zzdpos.ui.feedback.FeedBackActivity;
import com.xingdata.zzdpos.ui.help.HelpActivity;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MySelfRecyclerAdapter;
import java.util.ArrayList;
import java.util.List;
public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBinding> {
private MySelfRecyclerAdapter mMySelfRecyclerAdapter;
private List<Integer> integers;
@Override
public int getLayoutId() {
return R.layout.fragment_myself;
}
@Override
public void initView() {
mViewBinding.fragmentMyselfRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
integers = new ArrayList<>();
integers.add(107);
integers.add(108);
integers.add(109);
integers.add(110);
integers.add(111);
mMySelfRecyclerAdapter = new MySelfRecyclerAdapter(getActivity(), integers);
mMySelfRecyclerAdapter.bindToRecyclerView(mViewBinding.fragmentMyselfRecycler);
// mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyItemDecoration(getActivity(), 2, R.color.black_zhangfei));
mMySelfRecyclerAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
switch ((int) adapter.getData().get(position)) {
case C.MENU.MENU_ANNOUNCEMENT://公告
ActivityUtils.startActivity(getActivity(), AnnouncementActivity.class);
break;
case C.MENU.MENU_FEED://反馈
ActivityUtils.startActivity(getActivity(), FeedBackActivity.class);
break;
case C.MENU.MENU_UPDATE://升级
break;
case C.MENU.MENU_HELP://帮助
ActivityUtils.startActivity(getActivity(), HelpActivity.class);
break;
case C.MENU.MENU_EXIT://退出
break;
}
}
});
}
}
package com.xingdata.zzdpos.ui.main.fragment;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentServiceBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import java.util.List;
public class ServiceFragment extends BaseFragment<MainPresenter,FragmentServiceBinding> {
private MenuRecyclerAdapter mMenuRecyclerAdapter;
private List<Integer> integers;
@Override
public int getLayoutId() {
return R.layout.fragment_service;
}
@Override
public void initView() {
}
}
package com.xingdata.zzdpos.ui.marketing.integral;
import android.support.annotation.Nullable;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityIntegralBinding;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.List;
public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIntegralBinding>
implements IntegralContract.View {
@Override
public int getLayoutId() {
return R.layout.activity_integral;
}
@Override
public void initView() {
loadRootFragment(R.id.frg, mPresenter.integralIndexFragment);
}
@Override
public void initComplete(List<Category> list, int nowCategory) {
mPresenter.integralIndexFragment.initComplete(list, nowCategory);
}
@Override
public void error(String errMsg, LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
PromptDialog PromptDialog = new PromptDialog();
PromptDialog.show((BaseActivity) mContext);
PromptDialog.setDialogType(com.xingdata.zzdpos.ui.dialog.PromptDialog.PROMPTDIALOG_ERROR,
errMsg).setCustomButton
("关闭", new View.OnClickListener() {
@Override
public void onClick(View view) {
PromptDialog.dismiss();
}
});
LogUtils.e(errMsg);
ToastUtils.showLong(errMsg);
}
@Override
public void querySucc(@Nullable Pager<Gbound> pager, Boolean isLoadMore, int queryType,
LoadingDialog loadingDialog) {
mPresenter.integralIndexFragment.querySucc(pager, isLoadMore, queryType, loadingDialog);
}
@Override
public void addSucc(LoadingDialog loadingDialog) {
mPresenter.query(1, mPresenter.integralIndexFragment.NORMAL_TYPE, loadingDialog);
}
@Override
public void updateSucc(LoadingDialog loadingDialog) {
pop();
mPresenter.query(1, mPresenter.integralIndexFragment.NORMAL_TYPE, loadingDialog);
}
@Override
public void exchangeQuerySucc(Pager<Ubound> uboundPager, LoadingDialog loadingDialog) {
mPresenter.integralIndexFragment.exchangeQuerySucc(uboundPager, loadingDialog);
}
@Override
public void exchangeUpdateSucc(Ubound ubound, LoadingDialog loadingDialog) {
mPresenter.exchangeQuery(loadingDialog);
}
}
package com.xingdata.zzdpos.ui.marketing.integral;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import java.util.List;
/**
* Created by Administrator on 2017/11/23.
*/
public interface IntegralContract {
interface View extends BaseView {
void initComplete(List<Category> list, int nowCategory);
void error(String errMsg, LoadingDialog loadingDialog);
void querySucc(Pager<Gbound> pager, Boolean isLoadMore, int queryType, LoadingDialog
loadingDialog);
void addSucc(LoadingDialog loadingDialog);
void updateSucc(LoadingDialog loadingDialog);
void exchangeQuerySucc(Pager<Ubound> uboundPager, LoadingDialog loadingDialog);
void exchangeUpdateSucc(Ubound ubound, LoadingDialog loadingDialog);
}
abstract class Presenter extends BasePresenter<View> {
abstract void initData(Category category, int nowCategory);
abstract void query(int pageNumber, int queryType, LoadingDialog loadingDialog);
abstract void add(@Nullable Gbound gbound, LoadingDialog loadingDialog);
abstract void update(@Nullable Gbound gbound, LoadingDialog loadingDialog);
abstract void exchangeQuery(LoadingDialog loadingDialog);
abstract void exchangeUpdate(@Nullable Ubound ubound, LoadingDialog loadingDialog);
}
}
package com.xingdata.zzdpos.ui.marketing.integral;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralIndexFragment;
import java.util.List;
import io.reactivex.functions.Function;
/**
* Created by Administrator on 2017/11/23.
*/
public class IntegralPresenter extends IntegralContract.Presenter {
private int number = 1;
public IntegralIndexFragment integralIndexFragment = new IntegralIndexFragment();
public IntegralGetFragment integralGetFragment = new IntegralGetFragment();
@Override
public void onAttached() {
}
@Override
public void initData(Category category, int nowCategory) {
ApiFactory.Shop.queryAll(category)
.map(new Function<List<Category>, List<Category>>() {
@Override
public List<Category> apply(List<Category> categoryOnes) throws
Exception {
for (Category categoryOne : categoryOnes) {
categoryOne.setNowCategory(nowCategory);
}
return categoryOnes;
}
}).subscribe(s -> {
mView.initComplete(s, nowCategory);
}, throwable -> {
mView.error(throwable.getMessage(), null);
});
}
/**
* @param pageNumber 页码 >0则使用,<0则使用默认页码number
* @param queryType 请求类型,0:正常请求;1:加载更多请求;2刷新请求
*/
@Override
public void query(int pageNumber, int queryType, LoadingDialog loadingDialog) {
if (pageNumber > 0) {
this.number = pageNumber;
}
ApiFactory.Gbounds.query(C.PRODUCT.PAGE_SIZE, number).subscribe(querySucc -> {
Boolean isLoadMore = false;
if (!querySucc.isLastPage()) {
this.number++;
isLoadMore = true;
} else {
isLoadMore = false;
}
mView.querySucc(querySucc, isLoadMore, queryType, loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void add(Gbound gbound, LoadingDialog loadingDialog) {
ApiFactory.Gbounds.add(gbound).subscribe(addSucc -> {
mView.addSucc(loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void update(Gbound gbound, LoadingDialog loadingDialog) {
ApiFactory.Gbounds.update(gbound).subscribe(addSucc -> {
mView.updateSucc(loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void exchangeQuery(LoadingDialog loadingDialog) {
ApiFactory.Ubounds.query().subscribe(query -> {
mView.exchangeQuerySucc(query, loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void exchangeUpdate(@Nullable Ubound ubound, LoadingDialog loadingDialog) {
ApiFactory.Ubounds.update(ubound).subscribe(exchangeUpdateSucc -> {
mView.exchangeUpdateSucc(exchangeUpdateSucc, loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
}
package com.xingdata.zzdpos.ui.marketing.integral.adapter;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemIntegralBinding;
import com.xingdata.zzdpos.model.Gbound;
import java.util.List;
/**
* Created by Administrator on 2017/11/24.
*/
public class IntegralAdapter extends BaseAdapter<Gbound, ItemIntegralBinding> {
public IntegralAdapter(int layoutResId, @Nullable List<Gbound> data) {
super(layoutResId, data);
}
@Override
protected void convert(ItemIntegralBinding mViewBinding, Gbound item) {
mViewBinding.tvVip.setText(item.getVipLevelName());
if (item.getSpuCateId() == 0) {
mViewBinding.tvSource.setText("全品类");
} else {
//来源品类
if (item.getSpuCateName() != null) {
mViewBinding.tvSource.setText(item.getSpuCateName());
}
}
//获取规则
mViewBinding.tvGet.setText(item.getTruleName());
//开通启用状态 0:正常 1 暂停 默认 0
if (item.getBoundGetStatus() == 0) {
mViewBinding.tvStatus.setText("启用");
} else {
mViewBinding.tvStatus.setText("未启用");
}
}
}
package com.xingdata.zzdpos.ui.marketing.integral.adapter;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemIntegralBinding;
import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.List;
/**
* Created by Administrator on 2017/11/24.
*/
public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBinding> {
public IntegralExchangeAdapter(int layoutResId, @Nullable List<Ubound> data) {
super(layoutResId, data);
}
@Override
protected void convert(ItemIntegralBinding mViewBinding, Ubound item) {
mViewBinding.tvVipTitle.setText("积分面值");
mViewBinding.tvSourceTitle.setText("兑换规则");
mViewBinding.tvVip.setText(item.getBoundValAmt() + "个积分=1元");
//兑换规则
if (item.getBoundOrderAmt() != null && item.getBoundUseNum() != null) {
mViewBinding.tvSource.setText("订单实收金额满" + ConvertUtil.fenToYuan(item.getBoundOrderAmt
()) + "元\n最多使用" + item.getBoundUseNum() + "积分");
}
//备注
mViewBinding.tvGet.setText("无");
if (item.getBoundUseStatus() != null) {
//开通启用状态 0:正常 1 暂停 默认 0
if (item.getBoundUseStatus() == 0) {
mViewBinding.tvStatus.setText("启用");
} else {
mViewBinding.tvStatus.setText("未启用");
}
}
}
}
package com.xingdata.zzdpos.ui.marketing.integral.dialog;
import android.annotation.SuppressLint;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.TextView;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.databinding.DialogIntegralExchangeSettingBinding;
import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
/**
* 积分兑换设置界面
*/
public class IntegralExchangeDialog extends BaseDialog<IntegralPresenter,
DialogIntegralExchangeSettingBinding> {
Ubound ubound;
@Override
public int getLayoutId() {
return R.layout.dialog_integral_exchange_setting;
}
@Override
protected boolean isShowTitle() {
return true;
}
@Override
public int getTitle() {
return R.string.integral_exchange_title;
}
@SuppressLint("SetTextI18n")
@Override
public void initView() {
setCancelable(false);
mViewBinding.setOnClickListener(view -> {
hintKbTwo();
switch (view.getId()) {
case R.id.rd_suspendeds: {
//暂停
ubound.setBoundUseStatus((byte) 1);
}
break;
case R.id.rd_starts: {
//启用
ubound.setBoundUseStatus((byte) 0);
}
break;
}
});
initUiData();
}
private void initUiData() {
if (ubound != null) {
if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 0) {
mViewBinding.rdStarts.setChecked(true);
} else if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 1) {
mViewBinding.rdSuspendeds.setChecked(true);
}
if (ubound.getBoundValAmt() != null) {
mViewBinding.etIntegralExchangeRuleCountMoney.setText(ubound.getBoundValAmt() + "");
}
if (ubound.getBoundOrderAmt() != null) {
mViewBinding.etIntegralExchangeMoney.setText(ConvertUtil.fenToYuanNoPoint(ubound
.getBoundOrderAmt()));
}
if (ubound.getBoundUseNum() != null) {
mViewBinding.etIntegralExchangeCount.setText(ubound.getBoundUseNum() + "");
}
}
}
public void setData(Ubound ubound) {
this.ubound = ubound;
}
@Override
public void onConfirmClick(View view) {
super.onConfirmClick(view);
if (isNullAndSet()) {
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity());
ubound.setUpdateTime(null);
ubound.setCreateTime(null);
mPresenter.exchangeUpdate(ubound, loadingDialog);
this.dismiss();
} else {
ToastUtils.showLong("输入数据不能null");
}
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private boolean isNullAndSet() {
if (ubound == null || ubound.getBoundUseStatus() == null) {
return false;
}
if (TextUtils.isEmpty(mViewBinding.etIntegralExchangeRuleCountMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralExchangeMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralExchangeCount.getText().toString
())) {
return false;
}
ubound.setBoundValAmt(Long.parseLong(mViewBinding.etIntegralExchangeRuleCountMoney
.getText().toString()));
ubound.setBoundOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralExchangeMoney
.getText().toString()));
ubound.setBoundUseNum(Long.parseLong(mViewBinding.etIntegralExchangeCount.getText()
.toString()));
return true;
}
/**
* 显示软键盘,Dialog使用
*/
public void hintKbTwo() {
View view = getDialog().getCurrentFocus();
if (view == null) {
return;
}
if (view instanceof TextView) {
InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.RESULT_UNCHANGED_SHOWN);
}
}
@Override
public void dismiss() {
hintKbTwo();
super.dismiss();
}
}
package com.xingdata.zzdpos.ui.marketing.integral.dialog;
import android.annotation.SuppressLint;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.TextView;
import com.bigkoo.pickerview.OptionsPickerView;
import com.bigkoo.pickerview.listener.CustomListener;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
import io.realm.Realm;
import io.realm.RealmResults;
/**
* 积分获取设置界面
*/
public class IntegralGetDialog extends BaseDialog<IntegralPresenter,
DialogIntegralGetSettingBinding> {
//区分请求类型 正常 加载更多,下拉刷新
public static final int ONE_CATEGORY = 1;
public static final int TWO_CATEGORY = 2;
public static final int THREE_CATEGORY = 3;
//请求商品类别使用的id
private long spuCateIdTwo = -1;
private long spuCateIdThree = -1;
private OptionsPickerView pvCustomOptions;
private List<Category> listCategory = new ArrayList<>();
//积分获取提交给服务器对象
private Gbound gbound = new Gbound();
//ui显示用
private Gbound ShowGbound = new Gbound();
//商品品类提交服务器对象
private Category category = new Category();
//当前为修改还是新增 0为修改1为新增
private int nowType = -1;
//进度对话框
LoadingDialog loadingDialog;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private int nowShopTypeId = 1;
@Override
public int getLayoutId() {
return R.layout.dialog_integral_get_setting;
}
@Override
protected boolean isShowTitle() {
return true;
}
@Override
public int getTitle() {
return R.string.integral_get_title;
}
@SuppressLint("SetTextI18n")
@Override
public void initView() {
setCancelable(false);
}
private void setShopTypeClick(Boolean b) {
mViewBinding.rdGettypeAll.setEnabled(b);
mViewBinding.rdGettypeShop.setEnabled(b);
mViewBinding.rdGettypeCategory.setEnabled(b);
if (b) {
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.GONE);
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.GONE);
mViewBinding.tvCategorySelectOne.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectTwo.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectThree.setVisibility(View.VISIBLE);
mViewBinding.tvVipLevelSelect.setVisibility(View.VISIBLE);
} else {
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectOne.setVisibility(View.GONE);
mViewBinding.tvCategorySelectTwo.setVisibility(View.GONE);
mViewBinding.tvCategorySelectThree.setVisibility(View.GONE);
mViewBinding.tvVipLevelSelect.setVisibility(View.GONE);
}
}
private void updateUi() {
if (ShowGbound != null && ShowGbound.getTruleName() != null && !(ShowGbound.getTruleName
().equals("")
)) {
mViewBinding.tvRulesName.setText(ShowGbound.getTruleName());
//开通启用状态 0:正常 1 暂停 默认 0
if (ShowGbound.getBoundGetStatus() == 0) {
mViewBinding.rdStarts
.setChecked(true);
} else if (ShowGbound.getBoundGetStatus() == 1) {
mViewBinding.rdSuspendeds.setChecked(true);
}
mViewBinding.tvVipLevelSelectShowNoEdit.setText(ShowGbound.getVipLevelName());
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
switch (ShowGbound.getVipGboundType()) {
case 0: {
showView(R.id.rd_gettype_all);
mViewBinding.rdGettypeAll.setChecked(true);
if (ShowGbound.getTransAmt() != null) {
mViewBinding.etIntegralWeight.setText(ConvertUtil.fenToYuanNoPoint
(ShowGbound.getTransAmt()));
}
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
}
break;
case 1: {
showView(R.id.rd_gettype_category);
mViewBinding.rdGettypeCategory.setChecked(true);
if (ShowGbound.getSpuClaName() != null) {
mViewBinding.tvCategorySelectOne.setText((ShowGbound.getSpuClaName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(ShowGbound.getSpuClaName
() + "/");
}
if (ShowGbound.getSpuGrpName() != null) {
mViewBinding.tvCategorySelectTwo.setText((ShowGbound.getSpuGrpName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.getSpuGrpName() + "/");
}
if (ShowGbound.getSpuCateName() != null) {
mViewBinding.tvCategorySelectThree.setText((ShowGbound.getSpuCateName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.getSpuCateName());
}
if (ShowGbound.getTransAmt() != null) {
mViewBinding.etIntegralCategoryWeight.setText(ConvertUtil
.fenToYuanNoPoint(ShowGbound
.getTransAmt()));
}
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etIntegralCategoryTimeLimit.setText(ShowGbound.getBoundExp()
+ "");
}
}
break;
case 2: {
showView(R.id.rd_gettype_shop);
mViewBinding.rdGettypeShop.setChecked(true);
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etShopTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
}
break;
}
}
}
/**
* 通过用户点击品类等级 构建提交给服务器Category对象
*
* @param id 按钮id
* @return 构建好的Category对象
*/
private Category getCategory(int id) {
switch (id) {
case R.id.tv_category_select_one: {
category = new Category();
}
break;
case R.id.tv_category_select_two: {
category.setSpuCateId(spuCateIdTwo);
}
break;
case R.id.tv_category_select_three: {
category.setSpuCateId(spuCateIdThree);
}
break;
}
return category;
}
/**
* 初始化会员等级选择对话框
*/
private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound.setVipLevel(realmResult.get(options1).getVipLevel());
mViewBinding.tvVipLevelSelect.setText(realmResult.get(options1).getVipLevelName());
}
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
public void customLayout(View v) {
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.returnData();
pvCustomOptions.dismiss();
}
});
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.dismiss();
}
});
}
})
.isDialog(true)
.build();
pvCustomOptions.setPicker(realmResult);//添加数据
pvCustomOptions.show();
}
/**
* 初始化商品品类选择对话框
*
* @param list 选择对话框数据
* @param nowList 当前选中的品类索引
*/
private void initCustomOptionPicker(List<Category> list, int nowList) {//条件选择器初始化,自定义布局
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound.setSpuCateId((int) Long.parseLong(list.get(options1).getSpuCateId() + ""));
//返回的分别是三个级别的选中位置
switch (nowList) {
case ONE_CATEGORY: {
mViewBinding.tvCategorySelectOne.setText(listCategory.get(options1)
.getSpuClaName());
spuCateIdTwo = listCategory.get(options1).getSpuCateId();
}
break;
case TWO_CATEGORY: {
mViewBinding.tvCategorySelectTwo.setText(listCategory.get(options1)
.getSpuGrpName());
spuCateIdThree = listCategory.get(options1).getSpuCateId();
}
break;
case THREE_CATEGORY: {
mViewBinding.tvCategorySelectThree.setText(listCategory.get(options1)
.getSpuCateName());
}
break;
}
}
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
public void customLayout(View v) {
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.returnData();
pvCustomOptions.dismiss();
}
});
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.dismiss();
}
});
}
})
.isDialog(true)
.build();
pvCustomOptions.setPicker(list);//添加数据
pvCustomOptions.show();
}
/**
* 根据用户点击控制UI控件的隐藏显示
*
* @param id 用户点击的id
*/
private void showView(int id) {
switch (id) {
case R.id.rd_gettype_all: {
mViewBinding.llAll.setVisibility(View.VISIBLE);
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding.llShop.setVisibility(View.GONE);
}
break;
case R.id.rd_gettype_category: {
//品类定义
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding.llCategory.setVisibility(View.VISIBLE);
mViewBinding.llShop.setVisibility(View.GONE);
}
break;
case R.id.rd_gettype_shop: {
//商品定义
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding.llShop.setVisibility(View.VISIBLE);
}
break;
}
}
@Override
public void onConfirmClick(View view) {
super.onConfirmClick(view);
if (isNullAndSetDate()) {
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity());
if (nowType == 0) {
//修改
mPresenter.update(gbound, loadingDialog);
LogUtils.e("修改");
} else if (nowType == 1) {
//新增
mPresenter.add(gbound, loadingDialog);
LogUtils.e("新增");
}
this.dismiss();
} else {
ToastUtils.showLong("输入数据不能null");
}
}
/**
* 请求成功设置数据
*
* @param list
* @param nowList
*/
public void setCategoryDate(List<Category> list, int nowList) {
listCategory = list;
initCustomOptionPicker(list, nowList);
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private boolean isNullAndSetDate() {
if (gbound.getVipGboundType() == null || gbound.getVipLevel() == null) {
return false;
}
switch (gbound.getVipGboundType()) {
case 0: {
if (TextUtils.isEmpty(mViewBinding.etIntegralWeight.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralTimeLimit.getText().toString
())) {
return false;
} else {
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralWeight.getText()
.toString() +
"元送一个积分");
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralWeight
.getText().toString()));
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralTimeLimit.getText()
.toString()));
}
}
break;
case 1: {
if (TextUtils.isEmpty(mViewBinding.etIntegralCategoryWeight.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralCategoryTimeLimit.getText()
.toString()) || gbound.getSpuCateId() == -1) {
return false;
} else {
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralCategoryWeight
.getText().toString() +
"元送一个积分");
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding
.etIntegralCategoryWeight.getText().toString()));
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralCategoryTimeLimit
.getText().toString()));
}
}
break;
case 2: {
if (TextUtils.isEmpty(mViewBinding.etShopTimeLimit.getText().toString())) {
return false;
} else {
mViewBinding.tvRulesName.setText("商品定义规则");
gbound.setBoundExp(Byte.parseByte(mViewBinding.etShopTimeLimit.getText()
.toString()));
}
}
break;
}
gbound.setTruleName(mViewBinding.tvRulesName.getText().toString());
return true;
}
/**
* @param gbound
*/
public void setData(Gbound gbound, LoadingDialog loadingDialog) {
this.gbound = gbound.clone();
this.ShowGbound = gbound;
this.loadingDialog = loadingDialog;
//置状态为修改状态
setNowType(0);
}
public void setNowType(int nowType) {
this.nowType = nowType;
}
/**
* 显示软键盘,Dialog使用
*/
public void hintKbTwo() {
View view = getDialog().getCurrentFocus();
if (view == null) {
return;
}
if (view instanceof TextView) {
InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.RESULT_UNCHANGED_SHOWN);
}
}
@Override
public void dismiss() {
hintKbTwo();
super.dismiss();
}
}
package com.xingdata.zzdpos.ui.marketing.integral.fragment;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bigkoo.pickerview.OptionsPickerView;
import com.bigkoo.pickerview.listener.CustomListener;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
import io.realm.Realm;
import io.realm.RealmResults;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
DialogIntegralGetSettingBinding> {
//区分请求类型 正常 加载更多,下拉刷新
public static final int ONE_CATEGORY = 1;
public static final int TWO_CATEGORY = 2;
public static final int THREE_CATEGORY = 3;
//请求商品类别使用的id
private long spuCateIdTwo = -1;
private long spuCateIdThree = -1;
private OptionsPickerView pvCustomOptions;
private List<Category> listCategory = new ArrayList<>();
//积分获取提交给服务器对象
private Gbound gbound = new Gbound();
//ui显示用
private Gbound ShowGbound = new Gbound();
//商品品类提交服务器对象
private Category category = new Category();
//当前为修改还是新增 0为修改1为新增
private int nowType = -1;
//进度对话框
LoadingDialog loadingDialog;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private int nowShopTypeId = 1;
@Override
public int getLayoutId() {
return R.layout.dialog_integral_get_setting;
}
@Override
public void initView() {
mViewBinding.setOnClickListener(
new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
// hintKbTwo();
switch (v.getId()) {
case R.id.rd_suspendeds: {
//暂停
gbound.setBoundGetStatus(1);
}
break;
case R.id.rd_starts: {
//启用
gbound.setBoundGetStatus(0);
}
break;
case R.id.rd_gettype_all: {
//通用
showView(v.getId());
gbound.setVipGboundType((byte) 0);
}
break;
case R.id.rd_gettype_category: {
//品类定义
showView(v.getId());
gbound.setVipGboundType((byte) 1);
}
break;
case R.id.rd_gettype_shop: {
//商品定义
showView(v.getId());
gbound.setVipGboundType((byte) 2);
}
break;
case R.id.tv_vip_level_select: {
Realm realm = Realm.getInstance(App.instance.mRealmConfig);
RealmResults<Level> realmResult = realm.where(Level.class)
.findAll();
if (realmResult != null && realmResult.size() > 0) {
initVipLevelOptionPicker(realmResult);
}
}
break;
case R.id.tv_category_select_one: {
mPresenter.initData(getCategory(v.getId()), ONE_CATEGORY);
mViewBinding.tvCategorySelectTwo.setText("");
mViewBinding.tvCategorySelectThree.setText("");
}
break;
case R.id.tv_category_select_two: {
if (nowShopTypeId >= 1) {
mPresenter.initData(getCategory(v.getId()), TWO_CATEGORY);
mViewBinding.tvCategorySelectThree.setText("");
nowShopTypeId = 2;
} else {
ToastUtils.showLong("请先选择第一类品类");
}
}
break;
case R.id.tv_category_select_three: {
if (nowShopTypeId >= 2) {
mPresenter.initData(getCategory(v.getId()), THREE_CATEGORY);
nowShopTypeId = 3;
} else {
ToastUtils.showLong("请先选择第一二类品类");
}
}
break;
case R.id.btn_add: {
if (isNullAndSetDate()) {
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity());
if (nowType == 0) {
//修改
mPresenter.update(gbound, loadingDialog);
LogUtils.e("修改");
} else if (nowType == 1) {
//新增
mPresenter.add(gbound, loadingDialog);
LogUtils.e("新增");
}
} else {
ToastUtils.showLong("输入数据不能null");
}
}
break;
default: {
}
break;
}
}
});
if (nowType == 0) {
setShopTypeClick(false);
updateUi();
} else if (nowType == 1) {
setShopTypeClick(true);
mViewBinding.rdSuspendeds.setChecked(true);
gbound.setBoundGetStatus(1);
gbound.setVipGboundType((byte) 0);
}
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
private void setShopTypeClick(Boolean b) {
mViewBinding.rdGettypeAll.setEnabled(b);
mViewBinding.rdGettypeShop.setEnabled(b);
mViewBinding.rdGettypeCategory.setEnabled(b);
if (b) {
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.GONE);
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.GONE);
mViewBinding.tvCategorySelectOne.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectTwo.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectThree.setVisibility(View.VISIBLE);
mViewBinding.tvVipLevelSelect.setVisibility(View.VISIBLE);
} else {
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectOne.setVisibility(View.GONE);
mViewBinding.tvCategorySelectTwo.setVisibility(View.GONE);
mViewBinding.tvCategorySelectThree.setVisibility(View.GONE);
mViewBinding.tvVipLevelSelect.setVisibility(View.GONE);
}
}
private void updateUi() {
if (ShowGbound != null && ShowGbound.getTruleName() != null && !(ShowGbound.getTruleName
().equals("")
)) {
mViewBinding.tvRulesName.setText(ShowGbound.getTruleName());
//开通启用状态 0:正常 1 暂停 默认 0
if (ShowGbound.getBoundGetStatus() == 0) {
mViewBinding.rdStarts
.setChecked(true);
} else if (ShowGbound.getBoundGetStatus() == 1) {
mViewBinding.rdSuspendeds.setChecked(true);
}
mViewBinding.tvVipLevelSelectShowNoEdit.setText(ShowGbound.getVipLevelName());
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
switch (ShowGbound.getVipGboundType()) {
case 0: {
showView(R.id.rd_gettype_all);
mViewBinding.rdGettypeAll.setChecked(true);
if (ShowGbound.getTransAmt() != null) {
mViewBinding.etIntegralWeight.setText(ConvertUtil.fenToYuanNoPoint
(ShowGbound.getTransAmt()));
}
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
}
break;
case 1: {
showView(R.id.rd_gettype_category);
mViewBinding.rdGettypeCategory.setChecked(true);
if (ShowGbound.getSpuClaName() != null) {
mViewBinding.tvCategorySelectOne.setText((ShowGbound.getSpuClaName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(ShowGbound.getSpuClaName
() + "/");
}
if (ShowGbound.getSpuGrpName() != null) {
mViewBinding.tvCategorySelectTwo.setText((ShowGbound.getSpuGrpName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.getSpuGrpName() + "/");
}
if (ShowGbound.getSpuCateName() != null) {
mViewBinding.tvCategorySelectThree.setText((ShowGbound.getSpuCateName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.getSpuCateName());
}
if (ShowGbound.getTransAmt() != null) {
mViewBinding.etIntegralCategoryWeight.setText(ConvertUtil
.fenToYuanNoPoint(ShowGbound
.getTransAmt()));
}
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etIntegralCategoryTimeLimit.setText(ShowGbound.getBoundExp()
+ "");
}
}
break;
case 2: {
showView(R.id.rd_gettype_shop);
mViewBinding.rdGettypeShop.setChecked(true);
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etShopTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
}
break;
}
}
}
/**
* 通过用户点击品类等级 构建提交给服务器Category对象
*
* @param id 按钮id
* @return 构建好的Category对象
*/
private Category getCategory(int id) {
switch (id) {
case R.id.tv_category_select_one: {
category = new Category();
}
break;
case R.id.tv_category_select_two: {
category.setSpuCateId(spuCateIdTwo);
}
break;
case R.id.tv_category_select_three: {
category.setSpuCateId(spuCateIdThree);
}
break;
}
return category;
}
/**
* 初始化会员等级选择对话框
*/
private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound.setVipLevel(realmResult.get(options1).getVipLevel());
mViewBinding.tvVipLevelSelect.setText(realmResult.get(options1).getVipLevelName());
}
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
public void customLayout(View v) {
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.returnData();
pvCustomOptions.dismiss();
}
});
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.dismiss();
}
});
}
})
.isDialog(true)
.build();
pvCustomOptions.setPicker(realmResult);//添加数据
pvCustomOptions.show();
}
/**
* 初始化商品品类选择对话框
*
* @param list 选择对话框数据
* @param nowList 当前选中的品类索引
*/
private void initCustomOptionPicker(List<Category> list, int nowList) {//条件选择器初始化,自定义布局
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound.setSpuCateId((int) Long.parseLong(list.get(options1).getSpuCateId() + ""));
//返回的分别是三个级别的选中位置
switch (nowList) {
case ONE_CATEGORY: {
mViewBinding.tvCategorySelectOne.setText(listCategory.get(options1)
.getSpuClaName());
spuCateIdTwo = listCategory.get(options1).getSpuCateId();
}
break;
case TWO_CATEGORY: {
mViewBinding.tvCategorySelectTwo.setText(listCategory.get(options1)
.getSpuGrpName());
spuCateIdThree = listCategory.get(options1).getSpuCateId();
}
break;
case THREE_CATEGORY: {
mViewBinding.tvCategorySelectThree.setText(listCategory.get(options1)
.getSpuCateName());
}
break;
}
}
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
public void customLayout(View v) {
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.returnData();
pvCustomOptions.dismiss();
}
});
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.dismiss();
}
});
}
})
.isDialog(true)
.build();
pvCustomOptions.setPicker(list);//添加数据
pvCustomOptions.show();
}
/**
* 根据用户点击控制UI控件的隐藏显示
*
* @param id 用户点击的id
*/
private void showView(int id) {
switch (id) {
case R.id.rd_gettype_all: {
mViewBinding.llAll.setVisibility(View.VISIBLE);
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding.llShop.setVisibility(View.GONE);
}
break;
case R.id.rd_gettype_category: {
//品类定义
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding.llCategory.setVisibility(View.VISIBLE);
mViewBinding.llShop.setVisibility(View.GONE);
}
break;
case R.id.rd_gettype_shop: {
//商品定义
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding.llShop.setVisibility(View.VISIBLE);
}
break;
}
}
/**
* 请求成功设置数据
*
* @param list
* @param nowList
*/
public void setCategoryDate(List<Category> list, int nowList) {
listCategory = list;
initCustomOptionPicker(list, nowList);
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private boolean isNullAndSetDate() {
if (gbound.getVipGboundType() == null || gbound.getVipLevel() == null) {
return false;
}
switch (gbound.getVipGboundType()) {
case 0: {
if (TextUtils.isEmpty(mViewBinding.etIntegralWeight.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralTimeLimit.getText().toString
())) {
return false;
} else {
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralWeight.getText()
.toString() +
"元送一个积分");
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralWeight
.getText().toString()));
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralTimeLimit.getText()
.toString()));
}
}
break;
case 1: {
if (TextUtils.isEmpty(mViewBinding.etIntegralCategoryWeight.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralCategoryTimeLimit.getText()
.toString()) || gbound.getSpuCateId() == -1) {
return false;
} else {
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralCategoryWeight
.getText().toString() +
"元送一个积分");
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding
.etIntegralCategoryWeight.getText().toString()));
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralCategoryTimeLimit
.getText().toString()));
}
}
break;
case 2: {
if (TextUtils.isEmpty(mViewBinding.etShopTimeLimit.getText().toString())) {
return false;
} else {
mViewBinding.tvRulesName.setText("商品定义规则");
gbound.setBoundExp(Byte.parseByte(mViewBinding.etShopTimeLimit.getText()
.toString()));
}
}
break;
}
gbound.setTruleName(mViewBinding.tvRulesName.getText().toString());
return true;
}
/**
* @param gbound
*/
public void setData(Gbound gbound, LoadingDialog loadingDialog) {
this.gbound = gbound.clone();
this.ShowGbound = gbound;
this.loadingDialog = loadingDialog;
//置状态为修改状态
setNowType(0);
}
public void setNowType(int nowType) {
this.nowType = nowType;
}
//
// /**
// * 显示软键盘,Dialog使用
// */
// public void hintKbTwo() {
// View view = getTopFragment().getCurrentFocus();
// if (view == null) {
// return;
// }
// if (view instanceof TextView) {
// InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
// .getSystemService(Context.INPUT_METHOD_SERVICE);
// mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
// .RESULT_UNCHANGED_SHOWN);
// }
// }
// @Override
// public void dismiss() {
// hintKbTwo();
// super.dismiss();
// }
}
package com.xingdata.zzdpos.ui.marketing.integral.fragment;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentIntegralMainBinding;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralAdapter;
import com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralExchangeAdapter;
import com.xingdata.zzdpos.ui.marketing.integral.dialog.IntegralExchangeDialog;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
FragmentIntegralMainBinding> {
// IntegralGetDialog integralGetDialog;
IntegralAdapter integralAdapter;
IntegralExchangeAdapter integralExchangeAdapter;
private Boolean isLoadMore = false;
public static final int NORMAL_TYPE = 1;
public static final int LOADMORE_TYPE = 2;
public static final int REFRESH_TYPE = 3;
LoadingDialog loadingDialog = new LoadingDialog();
private long mExitTime;//控制快速点击
@Override
public int getLayoutId() {
return R.layout.fragment_integral_main;
}
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("积分规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.finishActivity(IntegralActivity.class);
}
});
integralAdapter = new IntegralAdapter(R.layout.item_integral, new ArrayList<>());
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvMessage.setLayoutManager(linearLayoutManager);
mViewBinding.rvMessage.setAdapter(integralAdapter);
List<Ubound> list = new ArrayList<>();
Ubound ubound = new Ubound();
ubound.setBoundValAmt(1000l);
ubound.setBoundUseStatus((byte) 0);
ubound.setBoundOrderAmt(10l);
ubound.setBoundUseNum(10000l);
list.add(ubound);
integralExchangeAdapter = new IntegralExchangeAdapter(R.layout.item_integral, list);
LinearLayoutManager linearLayoutManager1 = new LinearLayoutManager(getActivity());
linearLayoutManager1.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvExchangeMessage.setLayoutManager(linearLayoutManager1);
mViewBinding.rvExchangeMessage.setAdapter(integralExchangeAdapter);
mViewBinding.setOnClickListener(v -> {
switch (v.getId()) {
case R.id.btn_add: {
mPresenter.integralGetFragment.setNowType(1);
start(mPresenter.integralGetFragment);
// integralGetDialog = new IntegralGetDialog();
// integralGetDialog.setNowType(1);
// integralGetDialog.show((BaseActivity) getActivity());
}
break;
case R.id.rb_get: {
mViewBinding.rbGet.getPaint().setFakeBoldText(true);
mViewBinding.rbExchange.getPaint().setFakeBoldText(false);
showView(v.getId());
mPresenter.query(1, NORMAL_TYPE, null);
}
break;
case R.id.rb_exchange: {
mViewBinding.rbGet.getPaint().setFakeBoldText(false);
mViewBinding.rbExchange.getPaint().setFakeBoldText(true);
showView(v.getId());
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity());
mPresenter.exchangeQuery(loadingDialog);
}
break;
default: {
}
break;
}
});
//set Presenter listener
mViewBinding.srlProduct.setOnRefreshListener(this::refreshProduct);
integralAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rvMessage);
integralAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
(integralAdapter.getData().get(position)));
integralExchangeAdapter.setOnItemClickListener((adapter, view, position) ->
exchangeClickProduct(integralExchangeAdapter.getData().get(position)));
mPresenter.query(1, NORMAL_TYPE, null);
}
public void initComplete(List<Category> list, int nowCategory) {
if (list.size() <= 0) {
return;
}
mPresenter.integralGetFragment.setCategoryDate(list, nowCategory);
}
public void querySucc(@Nullable Pager<Gbound> pager, Boolean isLoadMore, int queryType,
LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
this.isLoadMore = isLoadMore;
if (pager == null || pager.getList() == null || pager.getList().size() <= 0) {
integralAdapter.setEmptyView(getEmptyView("没有规则"));
}
if (pager.getList() != null) {
switch (queryType) {
case NORMAL_TYPE: {
//正常请求
integralAdapter.setNewData(pager.getList());
}
break;
case LOADMORE_TYPE: {
//加载更多
integralAdapter.addData(pager.getList());
}
break;
case REFRESH_TYPE: {
//刷新请求
integralAdapter.setNewData(pager.getList());
}
break;
}
}
integralAdapter.setEnableLoadMore(false);
mViewBinding.srlProduct.setRefreshing(false);
}
public void exchangeQuerySucc(Pager<Ubound> uboundPager, LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
if (uboundPager != null && uboundPager.getList() != null) {
integralExchangeAdapter.setNewData(uboundPager.getList());
}
}
/**
* 刷新商品
*/
private void refreshProduct() {
integralAdapter.setEnableLoadMore(false);
mPresenter.query(1, REFRESH_TYPE, null);
}
/**
* 加载更多商品
*/
private void loadMoreProduct() {
mViewBinding.srlProduct.setRefreshing(false);
if (isLoadMore) {
mPresenter.query(-1, LOADMORE_TYPE, null);
}
}
/**
* 积分获取页面点击item
*/
private void clickProduct(Gbound gbound) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
// integralGetDialog = new IntegralGetDialog();
loadingDialog.show((BaseActivity) getActivity());
mPresenter.integralGetFragment.setData(gbound, loadingDialog);
start(mPresenter.integralGetFragment);
// integralGetDialog.show((BaseActivity) getActivity());
mExitTime = System.currentTimeMillis();
} else {
ToastUtils.showLong("您操作太快了");
}
}
/**
* 积分兑换页面点击item
*/
private void exchangeClickProduct(Ubound gbound) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
IntegralExchangeDialog integralExchangeDialog = new IntegralExchangeDialog();
integralExchangeDialog.setData(gbound);
integralExchangeDialog.show((BaseActivity) getActivity());
mExitTime = System.currentTimeMillis();
} else {
ToastUtils.showLong("您操作太快了");
}
}
private View getEmptyView(String str) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(str);
return view;
}
private void showView(int id) {
switch (id) {
case R.id.rb_get: {
mViewBinding.llGet.setVisibility(View.VISIBLE);
mViewBinding.llExchange.setVisibility(View.GONE);
}
break;
case R.id.rb_exchange: {
mViewBinding.llGet.setVisibility(View.GONE);
mViewBinding.llExchange.setVisibility(View.VISIBLE);
}
break;
}
}
}
package com.xingdata.zzdpos.ui.marketing.ticket;
import android.support.v7.widget.GridLayoutManager;
import android.text.Html;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityReturnTicketBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.adapter.ReturnTicketAdapter;
import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog;
import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.ArrayList;
public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter,
ActivityReturnTicketBinding>
implements ReturnTicketContract.View {
ReturnTicketAdapter returnTicketAdapter;
LoadingDialog loadingDialog = new LoadingDialog();
@Override
public int getLayoutId() {
return R.layout.activity_return_ticket;
}
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("优惠券规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.finishActivity(ReturnTicketActivity.class);
}
});
mViewBinding.btnGroup.setText(Html.fromHtml(
getResources().
getString(R.string
.tv_ticket_count, "<font color='#1f7bdb'><big> " + "0" + " " +
"</big></font>")));
final int SPACING = mContext.getResources().getDimensionPixelOffset(R.dimen
.vip_message_item_spacing);
returnTicketAdapter = new
ReturnTicketAdapter(new ArrayList<>(), mPresenter);
mViewBinding.rcTicket.setAdapter(returnTicketAdapter);
mViewBinding.rcTicket.setLayoutManager(new
GridLayoutManager(ReturnTicketActivity.this,
4));
mViewBinding.rcTicket.addItemDecoration(new RecyclerViewUtil.GridSpacingItemDecoration(4,
SPACING, true));
mViewBinding.setOnClickListener(view ->
{
switch (view.getId()) {
case R.id.btn_add: {
mPresenter.ticketAddDialog = new TicketAddDialog();
mPresenter.ticketAddDialog.show(this);
}
break;
default: {
}
break;
}
});
}
@Override
public void error(String errorMsg, LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
LogUtils.e(errorMsg);
ToastUtils.showLong(errorMsg);
}
@Override
public void addSucc(LoadingDialog loadingDialog) {
if (mPresenter.ticketAddDialog != null && mPresenter.ticketAddDialog.isShowing) {
mPresenter.ticketAddDialog.dismiss();
}
mPresenter.truleQuery(loadingDialog);
}
@Override
public void truleQuerySucc(Pager<Trule> trulePager, LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
if (trulePager == null || trulePager.getList() == null || trulePager.getList().size() <=
0) {
mViewBinding.tvEmpty.setVisibility(View.VISIBLE);
}
if (trulePager != null && trulePager.getList() != null) {
mViewBinding.tvEmpty.setVisibility(View.GONE);
returnTicketAdapter.setNewData(trulePager.getList());
mViewBinding.btnGroup.setText(Html.fromHtml(getResources().getString(R.string
.tv_ticket_count,
"<font color='#1f7bdb'><big> " + trulePager.getList().size() + " " +
"</big></font>")));
}
}
@Override
public void truleUpdateSucc(LoadingDialog loadingDialog) {
if (mPresenter.ticketAddDialog != null && mPresenter.ticketAddDialog.isShowing) {
mPresenter.ticketAddDialog.dismiss();
}
mPresenter.truleQuery(loadingDialog);
}
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
@Override
protected void onResume() {
super.onResume();
loadingDialog.show(this);
mPresenter.truleQuery(loadingDialog);
}
}
package com.xingdata.zzdpos.ui.marketing.ticket;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
/**
* Created by Administrator on 2017/11/24.
*/
public interface ReturnTicketContract {
interface View extends BaseView {
void error(String errorMsg, LoadingDialog loadingDialog);
void addSucc(LoadingDialog loadingDialog);
void truleQuerySucc(Pager<Trule> trulePager, LoadingDialog loadingDialog);
void truleUpdateSucc(LoadingDialog loadingDialog);
}
abstract class Presenter extends BasePresenter<View> {
abstract void add(@Nullable Trule trule, LoadingDialog loadingDialog);
abstract void truleQuery(LoadingDialog loadingDialog);
abstract void truleUpdate(@Nullable Trule trule, LoadingDialog loadingDialog);
}
}
package com.xingdata.zzdpos.ui.marketing.ticket;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog;
/**
* Created by Administrator on 2017/11/24.
*/
public class ReturnTicketPresenter extends ReturnTicketContract.Presenter {
public TicketAddDialog ticketAddDialog;
@Override
public void onAttached() {
}
@Override
public void add(@Nullable Trule trule, LoadingDialog loadingDialog) {
ApiFactory.TRULE.truleAdd(trule).subscribe(s -> {
mView.addSucc(loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void truleQuery(LoadingDialog loadingDialog) {
ApiFactory.TRULE.truleQuery().subscribe(pager -> {
mView.truleQuerySucc(pager, loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void truleUpdate(@Nullable Trule trule, LoadingDialog loadingDialog) {
ApiFactory.TRULE.truleUpdate(trule).subscribe(pager -> {
mView.truleUpdateSucc(loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
}
package com.xingdata.zzdpos.ui.marketing.ticket.adapter;
import android.support.annotation.Nullable;
import android.view.View;
import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemReturnTicketBinding;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter;
import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.text.SimpleDateFormat;
import java.util.List;
public class ReturnTicketAdapter extends BaseAdapter<Trule, ItemReturnTicketBinding> {
ReturnTicketPresenter mPersenter;
public ReturnTicketAdapter(@Nullable List<Trule> data, ReturnTicketPresenter mPersenter) {
super(R.layout.item_return_ticket, data);
this.mPersenter = mPersenter;
}
@Override
protected void convert(ItemReturnTicketBinding mViewBinding, Trule item) {
mViewBinding.tvTicket.setText("优\n惠\n券");
// mViewBinding.tvSend.setText("发\n券");
mViewBinding.tvSend.setText("\n");
mViewBinding.tvTicketMoney.setText(ConvertUtil.fenToYuanNoPoint(item.getTruleValAmt()));
mViewBinding.tvRule.setText(mContext.getResources().getString(R.string.tv_rule,
ConvertUtil.fenToYuanNoPoint(item.getTruleOrderAmt())));
mViewBinding.tvDate.setText(mContext.getResources().getString(R.string.tv_date,
TimeUtils.millis2String(item.getTruleExp(), new SimpleDateFormat("yyy-mm-dd"))));
mViewBinding.clSend.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ToastUtils.showLong("发券");
}
});
mViewBinding.clItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mPersenter.ticketAddDialog = new TicketAddDialog();
mPersenter.ticketAddDialog.setNowType(2);
mPersenter.ticketAddDialog.editTicketData(item);
mPersenter.ticketAddDialog.show((BaseActivity) mContext);
}
});
}
}
package com.xingdata.zzdpos.ui.marketing.ticket.dialog;
import android.annotation.SuppressLint;
import android.app.DatePickerDialog;
import android.content.Context;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.DatePicker;
import android.widget.TextView;
import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.databinding.DialogTicketAddSettingBinding;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.text.SimpleDateFormat;
import java.util.Calendar;
/**
* 积分获取设置界面
*/
public class TicketAddDialog extends BaseDialog<ReturnTicketPresenter,
DialogTicketAddSettingBinding> {
LoadingDialog loadingDialog = new LoadingDialog();
//0:正常 1暂停
private byte nowStatus = 1;
//当前编辑的对象
private Trule trule = new Trule();
//1为新增,2为更新
private int nowType = 1;
@Override
public int getLayoutId() {
return R.layout.dialog_ticket_add_setting;
}
@Override
protected boolean isShowTitle() {
return true;
}
@Override
public int getTitle() {
return R.string.return_ticket_title;
}
@SuppressLint("SetTextI18n")
@Override
public void initView() {
hintKbTwo();
mViewBinding.etTicketMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etRuleMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etTicketCount.addTextChangedListener(mTextWatcher);
if (nowType == 2) {
setTitle("编辑优惠券");
mViewBinding.tvIntegralRuleName.setText(trule.getTruleName());
if (trule.getTruleStatus() == 1) {
mViewBinding.rbSuspended.setChecked(true);
} else if (trule.getTruleStatus() == 0) {
mViewBinding.rbStart.setChecked(true);
}
mViewBinding.etTicketMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleValAmt
()));
mViewBinding.tvDate.setText(TimeUtils.millis2String(trule.getTruleExp(), new
SimpleDateFormat("yyyy-mm-dd")));
mViewBinding.etRuleMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleOrderAmt
()));
mViewBinding.etTicketCount.setText(trule.getTruleUseNum() + "");
}
mViewBinding.setOnClickListener(view -> {
hintKbTwo();
switch (view.getId()) {
case R.id.tv_date: {
showDialogPick(mViewBinding.tvDate);
}
break;
case R.id.rb_suspended: {
//暂停
nowStatus = 1;
}
break;
case R.id.rb_start: {
//启用
nowStatus = 0;
}
break;
default: {
}
break;
}
});
}
public void editTicketData(Trule trule) {
this.trule = trule;
}
@Override
public void onConfirmClick(View view) {
if (isNull()) {
if (Integer.parseInt(mViewBinding.etRuleMoney.getText().toString()) <= Integer
.parseInt(mViewBinding.etTicketMoney.getText().toString())) {
ToastUtils.showLong("可用金额需大于优惠券面值 ");
return;
}
loadingDialog.show((BaseActivity) mContext);
if (nowType == 1) {
mPresenter.add(getUiData(), loadingDialog);
} else if (nowType == 2) {
mPresenter.truleUpdate(getUiData(), loadingDialog);
}
} else {
ToastUtils.showLong("输入数据不能null");
}
super.onConfirmClick(view);
}
private Trule getUiData() {
mViewBinding.tvIntegralRuleName.setText(mViewBinding.etTicketMoney.getText().toString() +
"元优惠券");
trule.setTruleName(mViewBinding.tvIntegralRuleName.getText().toString());
//0:正常 1暂停 默认0
trule.setTruleStatus(nowStatus);
trule.setTruleValAmt(ConvertUtil.yuanToFen(mViewBinding.etTicketMoney.getText().toString
()));
trule.setTruleExp(TimeUtils.string2Millis(mViewBinding.tvDate.getText().toString(), new
SimpleDateFormat("yyyy-mm-dd")));
trule.setTruleOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etRuleMoney.getText().toString
()));
if (!mViewBinding.etTicketCount.getText().toString().equals("")) {
trule.setTruleUseNum(Byte.parseByte(mViewBinding.etTicketCount.getText().toString()));
} else {
trule.setTruleUseNum((byte) 1);
}
return trule;
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private boolean isNull() {
return !(TextUtils.isEmpty(mViewBinding.etTicketMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.tvDate.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etRuleMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etTicketCount.getText().toString()));
}
//将两个选择时间的dialog放在该函数中
private void showDialogPick(final View btn) {
//获取Calendar对象,用于获取当前时间
final Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
//实例化DatePickerDialog对象
DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new
DatePickerDialog.OnDateSetListener() {
//选择完日期后会调用该回调函数
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear, int
dayOfMonth) {
//因为monthOfYear会比实际月份少一月所以这边要加1
((TextView) btn).setText(year + "-" + (monthOfYear + 1) + "-" + dayOfMonth);
}
}, year, month, day);
//弹出选择日期对话框
datePickerDialog.show();
}
/**
* 显示软键盘,Dialog使用
*/
public void hintKbTwo() {
View view = getDialog().getCurrentFocus();
if (view == null) {
return;
}
if (view instanceof TextView) {
InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.RESULT_UNCHANGED_SHOWN);
}
}
private TextWatcher mTextWatcher = new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
String text = s.toString();
int len = s.toString().length();
if (len == 1 && text.equals("0")) {
s.clear();
}
}
};
public void setNowType(int type) {
trule = new Trule();
this.nowType = type;
}
@Override
public void dismiss() {
hintKbTwo();
super.dismiss();
}
}
package com.xingdata.zzdpos.ui.payment;
import android.content.Intent;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityPaymentBinding;
import com.xingdata.zzdpos.ui.payment.fragment.PaymentFragment;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaymentBinding> implements PaymentContract.View {
......@@ -19,4 +24,12 @@ public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaym
loadRootFragment(R.id.f_payment, mPaymentFragment);
}
@Override
public void showSettle(Long amt) {
Intent intent = new Intent(PaymentActivity.this, SettleActivity.class);
intent.putExtra(C.EXTRA_KEY.SETTLE_MODE, C.SETTLE_MODE.PAYMENT);
intent.putExtra(C.EXTRA_KEY.SETTLE_EXTRA, amt);
ActivityUtils.startActivity(intent);
}
}
......@@ -7,8 +7,19 @@ import com.xingdata.zzdpos.base.BaseView;
interface PaymentContract {
interface View extends BaseView {
/**
* 显示结算页面
*/
void showSettle(Long amt);
}
abstract class Presenter extends BasePresenter<PaymentContract.View> {
abstract class Presenter extends BasePresenter<View> {
/**
* 收款界面 - 点击收款
*
* @param amt 金额
*/
public abstract void clickSettle(Long amt);
}
}
\ No newline at end of file
package com.xingdata.zzdpos.ui.payment;
import com.blankj.utilcode.util.EncryptUtils;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.util.SystemUtil;
public class PaymentPresenter extends PaymentContract.Presenter {
@Override
public void onAttached() {
ApiFactory.Test.signBefore("13111111111", EncryptUtils.encryptMD5ToString("000000".getBytes()),
"1", SystemUtil.getDeviceSN()).subscribe(loginReturnBean -> {
}, throwable -> {
});
}
@Override
public void clickSettle(Long amt) {
mView.showSettle(amt);
}
}
package com.xingdata.zzdpos.ui.payment.fragment;
import com.blankj.utilcode.util.LogUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentPaymentBinding;
......@@ -10,7 +9,7 @@ import com.xingdata.zzdpos.util.ConvertUtil;
public class PaymentFragment extends BaseFragment<PaymentPresenter, FragmentPaymentBinding> {
private CalculatorView mCalculatorView = new CalculatorView();
private CalculatorView<PaymentPresenter> mCalculatorView = new CalculatorView<>();
@Override
public int getLayoutId() {
......@@ -20,14 +19,14 @@ public class PaymentFragment extends BaseFragment<PaymentPresenter, FragmentPaym
@Override
public void initView() {
loadRootFragment(R.id.f_inputer, mCalculatorView);
mCalculatorView.setmOnResultChangeListener((exp, result) -> {
LogUtils.e(exp + "\n" + result);
mCalculatorView.setOnResultChangeListener((exp, result) -> {
String strResult = ConvertUtil.fenToYuan(result);
mViewBinding.tvExp.setText(exp);
mViewBinding.tvResult.setText(ConvertUtil.fenToYuan(result));
mViewBinding.tvResult.setText(strResult);
mViewBinding.tvAmt.setText(strResult);
});
mCalculatorView.setmOnSettleClickListener(result -> {
LogUtils.e(ConvertUtil.fenToYuan(result));
mCalculatorView.setOnSettleClickListener(result -> {
if (result > 0) mPresenter.clickSettle(result);
});
}
}
......@@ -7,15 +7,15 @@ import android.widget.TextView;
import com.blankj.utilcode.util.LogUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.databinding.ViewCalculatorBinding;
import com.xingdata.zzdpos.ui.payment.PaymentPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.math.BigDecimal;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculatorBinding> {
public class CalculatorView<P extends BasePresenter> extends BaseFragment<P, ViewCalculatorBinding> {
private String mExp;
private String mValue;
......@@ -48,13 +48,13 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
public void initView() {
View.OnClickListener mOnClickListener = view -> {
switch (view.getId()) {
case R.id.btn_del:
case R.id.tv_del:
delete();
break;
case R.id.btn_clear:
case R.id.tv_clear:
clear();
break;
case R.id.btn_settle:
case R.id.tv_settle:
settle();
break;
default:
......@@ -63,21 +63,20 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
String str = ((TextView) view).getText().toString();
String[] mExps = mExp.split("[+\\-×÷]");
if (mLast.matches("[+\\-×÷]")) mValue = "";
else if (mExps.length > 1) mValue = mExps[mExps.length - 1];
else mValue = mExp.replaceAll("[+\\-×÷]", "");
if (mExps.length > 1) mValue = mExps[mExps.length - 1];
else mValue = mExp;
//限制位数
if (str.matches("[0-9]+") && mValue.split("[.]").length > 1 && mValue.split("[.]")[1].length() == 2)
return;
//限制小数点
if ((mExp.length() == 0 || mValue.contains(".")) && str.matches("[.]"))
return;
//限制符号
if (mLast.matches("[+\\-×÷.]") && str.matches("[+\\-×÷.]"))
return;
if (mLast.matches("[+\\-×÷.]") && str.matches("[+\\-×÷.]")) return;
if (mValue.length() > 0 && str.matches("[+\\-×÷]")) {
mValue = "";
} else {
if (mValue.length() == 0 && str.matches("[+\\-×÷]")) return;
if (mValue.contains(".") && str.matches("[+\\-×÷.]")) return;
if (mValue.split("[.]").length > 1 && mValue.split("[.]")[1].length() > 2)
return;
if (mValue.length() == 0 && str.equals(".")) mExp += "0";
}
mLast = str;
mExp += str;
......@@ -97,7 +96,8 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
private void delete() {
if (mExp.length() > 0) {
mExp = mExp.substring(0, mExp.length() - 1);
mLast = mExp.substring(mExp.length() - 1, mExp.length());
if (mExp.length() > 0) mLast = mExp.substring(mExp.length() - 1, mExp.length());
else mLast = "";
}
}
......@@ -122,7 +122,7 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
/**
* 解析计算四则运算表达式,例:2+((3+4)*2-22)/2*3
* 解析计算四则运算表达式
*
* @param exp 算式
* @return 结果
......@@ -196,11 +196,12 @@ public class CalculatorView extends BaseFragment<PaymentPresenter, ViewCalculato
}
public void setmOnResultChangeListener(OnResultChangeListener mOnResultChangeListener) {
this.mOnResultChangeListener = mOnResultChangeListener;
public void setOnResultChangeListener(OnResultChangeListener onResultChangeListener) {
this.mOnResultChangeListener = onResultChangeListener;
mOnResultChangeListener.onResultChange(mExp, ConvertUtil.yuanToFen(parseExp(mExp)));
}
public void setmOnSettleClickListener(onSettleClickListener mOnSettleClickListener) {
this.mOnSettleClickListener = mOnSettleClickListener;
public void setOnSettleClickListener(onSettleClickListener onSettleClickListener) {
this.mOnSettleClickListener = onSettleClickListener;
}
}
package com.xingdata.zzdpos.ui.settle;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivitySettleBinding;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.main.MainActivity;
import com.xingdata.zzdpos.ui.settle.fragment.CashPayFragment;
import com.xingdata.zzdpos.ui.settle.fragment.PayResultFragment;
import com.xingdata.zzdpos.ui.settle.fragment.SettleFragment;
import java.util.List;
public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettleBinding> implements SettleContract.View {
private SettleFragment mSettleFragment = new SettleFragment();
private CashPayFragment mCashPayFragment = new CashPayFragment();
private PayResultFragment mPayResultFragment = new PayResultFragment();
private LoadingDialog mLoadingDialog = new LoadingDialog();
@Override
public int getLayoutId() {
return R.layout.activity_settle;
}
@Override
public void initView() {
this.loadRootFragment(R.id.f_settle, mSettleFragment);
}
@Override
public void setSettleFragmentBySettleMode(int settleMode) {
}
@Override
public void showSettleFragment() {
this.popTo(mSettleFragment.getClass(), false);
}
@Override
public void showVipFragment() {
}
@Override
public void loadVips(List<Vip> vips) {
}
@Override
public void loadVip(Vip vip) {
mSettleFragment.loadVip(vip);
}
@Override
public void showTicketFragment() {
}
@Override
public void loadTickets(List<Ticket> tickets) {
}
@Override
public void loadTicket(Ticket ticket) {
}
@Override
public void loadPays(List<Pay> pays) {
mSettleFragment.loadPays(pays);
}
@Override
public void loadSaleorder(Saleorder saleorder) {
mSettleFragment.loadSaleorder(saleorder);
mCashPayFragment.loadSaleorder(saleorder);
}
@Override
public void showPayFragment(int payChannel) {
switch (payChannel) {
case C.PAY_CHANNEL.CASH:
this.start(mCashPayFragment);
break;
}
}
@Override
public void changeLockState(boolean isLock) {
}
@Override
public void showLoadingDialog() {
mLoadingDialog.show(this);
}
@Override
public void dismissLoadingDialog() {
mLoadingDialog.dismiss();
}
@Override
public void showPaySuccFragment(Saleorder saleorder) {
this.start(mPayResultFragment.setResult(true).setSaleorder(saleorder));
}
@Override
public void showPayFailFragment(Throwable throwable, Saleorder saleorder) {
this.start(mPayResultFragment.setResult(false).setSaleorder(saleorder));
}
@Override
public void backToMainActivity() {
ActivityUtils.startActivity(this, MainActivity.class);
}
}
package com.xingdata.zzdpos.ui.settle;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip;
import java.util.List;
interface SettleContract {
interface View extends BaseView {
/**
* 设置初始化结算页面
*
* @param settleMode 结算模式
*/
void setSettleFragmentBySettleMode(int settleMode);
/**
* 显示结算Fragment
*/
void showSettleFragment();
/**
* 显示会员Fragment
*/
void showVipFragment();
/**
* 加载会员列表
*
* @param vips 会员列表
*/
void loadVips(List<Vip> vips);
/**
* 加载会员信息
*
* @param vip 会员信息
*/
void loadVip(Vip vip);
/**
* 显示优惠券Fragment
*/
void showTicketFragment();
/**
* 加载优惠券列表
*
* @param tickets 优惠券列表
*/
void loadTickets(List<Ticket> tickets);
/**
* 加载优惠券信息
*
* @param ticket 优惠券信息
*/
void loadTicket(Ticket ticket);
/***
* 加载支付方式列表
*
* @param pays 支付方法会列表
*/
void loadPays(List<Pay> pays);
/**
* 加载订单信息
*
* @param saleorder 订单信息
*/
void loadSaleorder(Saleorder saleorder);
/**
* 显示支付页面
*
* @param payChannel 支付渠道
*/
void showPayFragment(int payChannel);
/**
* 改变锁定状态
*
* @param isLock 是否锁定
*/
void changeLockState(boolean isLock);
/**
* 显示读取对话框
*/
void showLoadingDialog();
/**
* 隐藏读取对话框
*/
void dismissLoadingDialog();
/**
* 显示支付成功界面
*
* @param saleorder 订单信息
*/
void showPaySuccFragment(Saleorder saleorder);
/**
* 显示支付失败界面
*
* @param throwable 错误信息
* @param saleorder 订单信息
*/
void showPayFailFragment(Throwable throwable, Saleorder saleorder);
/**
* 返回主页面
*/
void backToMainActivity();
}
abstract class Presenter extends BasePresenter<View> {
/**
* 结算页面 - 初始化结算页面
*/
public abstract void initSettle();
/**
* 结算页面 - 点击会员View
*/
public abstract void clickVipView();
/**
* 会员界面 - 查找会员
*
* @param keyword 搜索关键字
*/
public abstract void searchVip(String keyword);
/**
* 会员页面 - 选择会员
*
* @param vip 会员
*/
public abstract void selectVip(Vip vip);
/**
* 结算页面 - 点击优惠券View
*/
public abstract void clickTicketView();
/**
* 结算页面 - 查询优惠券
*/
public abstract void searchTicket(Long vipId);
/**
* 优惠券页面 - 选择优惠券
*
* @param ticket 使用的优惠券
*/
public abstract void selectTicket(Ticket ticket);
/**
* 结算页面 - 切换积分状态
*
* @param isUsePoint 是否使用积分
*/
public abstract void changePointState(boolean isUsePoint);
/**
* 点击支付渠道
*
* @param payChannel 支付渠道
*/
public abstract void clickPayChannelView(int payChannel);
/**
* 现金结算页面 - 现金支付
*
* @param inputAmt 输入金额
* @param changeAmt 找零金额
*/
public abstract void payInCash(Long inputAmt, Long changeAmt);
/**
* 支付宝结算页面 - 支付宝支付
*
* @param payCode 支付码
*/
public abstract void payInAli(String payCode);
/**
* 微信结算页面 - 微信支付
*
* @param payCode 支付码
*/
public abstract void payInWechat(String payCode);
/**
* 银行卡结算页面 - 银行卡支付
*/
public abstract void payInBank();
/**
* 储值卡结算页面 - 储值卡
*
* @param cardNo 卡号
* @param password 密码
*/
public abstract void payInCard(Long cardNo, String password);
/**
* 赊账结算页面 - 赊账
*/
public abstract void payInTally();
/**
* 支付结果页面 - 完成订单
*/
public abstract void clickComplete();
/**
* 支付结果页面 - 重试
*/
public abstract void clickRetry();
}
}
package com.xingdata.zzdpos.ui.settle;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observable;
public class SettlePresenter extends SettleContract.Presenter {
/**
* 结算模式
*/
private int mSettleMode;
/**
* 当前会员
*/
private Vip mVip;
/**
* 当前的营销活动列表
*/
private List<Ms> mMss;
/**
* 当前设备的支付渠道信息
*/
private List<Pay> mPays;
/**
* 当前购物车的商品明细
*/
private List<Saledetail> mSaledetails;
/**
* 当前订单信息
*/
private Saleorder mSaleorder;
@Override
public void onAttached() {
this.initRealm();
mSaleorder = new Saleorder();
mSaledetails = new ArrayList<>();
mVip = Vip.createDefault();
mSettleMode = getIntent().getIntExtra(C.EXTRA_KEY.SETTLE_MODE, -1);
switch (mSettleMode) {
case C.SETTLE_MODE.PAYMENT:
this.getPaymentIntent();
break;
case C.SETTLE_MODE.STORE:
this.getStoreIntent();
break;
}
}
/**
* 获取收款信息
*/
private void getPaymentIntent() {
Long payAmt = getIntent().getLongExtra(C.EXTRA_KEY.SETTLE_EXTRA, 0);
mSaledetails.add(0, Saledetail.create("收款", payAmt, mVip));
mSaleorder.setSaledetails(mSaledetails).settle();
}
/**
* 获取开单信息
*/
private void getStoreIntent() {
}
@Override
public void initSettle() {
ApiFactory.Pay.query().subscribe(
pays -> mView.loadPays(pays),
throwable -> {
}
);
mView.loadSaleorder(mSaleorder);
mView.setSettleFragmentBySettleMode(mSettleMode);
}
@Override
public void clickVipView() {
// mView.showVipFragment();
mView.loadVip(Vip.createDefault());
}
@Override
public void searchVip(String keyword) {
ApiFactory.User.queryUserDetailByKeyword(keyword).subscribe(
vip -> {
List<Vip> vips = new ArrayList<>();
vips.add(vip);
mView.loadVips(vips);
},
throwable -> {
});
}
@Override
public void selectVip(Vip vip) {
mView.showSettleFragment();
mView.loadVip(vip);
}
@Override
public void clickTicketView() {
mView.showTicketFragment();
}
@Override
public void searchTicket(Long vipId) {
ApiFactory.Ticket.query(vipId).subscribe(
tickets -> mView.loadTickets(tickets),
throwable -> {
});
}
@Override
public void selectTicket(Ticket ticket) {
mView.loadTicket(ticket);
}
@Override
public void changePointState(boolean isUsePoint) {
}
@Override
public void clickPayChannelView(int payChannel) {
mSaleorder.setPayType(payChannel);
mView.showPayFragment(payChannel);
}
@Override
public void payInCash(Long inputAmt, Long changeAmt) {
subscribePay(commitOrder()
.flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, C.PAY_CHANNEL.CASH)))
);
}
@Override
public void payInAli(String payCode) {
}
@Override
public void payInWechat(String payCode) {
}
@Override
public void payInBank() {
}
@Override
public void payInCard(Long cardNo, String password) {
}
@Override
public void payInTally() {
}
@Override
public void clickComplete() {
mView.backToMainActivity();
}
@Override
public void clickRetry() {
mView.showSettleFragment();
}
/**
* 订阅支付
*
* @param observable 数据源
*/
private void subscribePay(Observable<Saleorder> observable) {
mView.showLoadingDialog();
observable.doFinally(() -> mView.dismissLoadingDialog()).subscribe(
this::paySucc,
this::payFail
);
}
/**
* 提交订单
*/
private Observable<String> commitOrder() {
if (StringUtils.isEmpty(mSaleorder.getOrderNo())) {
return ApiFactory.Saleorder.addOrderMis(createSaleorderParam())
.doAfterNext(s -> {
mSaleorder.setOrderNo(s);
mView.changeLockState(true);
});
} else {
return Observable.just(mSaleorder.getOrderNo());
}
}
/**
* 获取参数形式的订单信息
*
* @return 参数形式的订单信息
*/
private Saleorder.Param createSaleorderParam() {
Saleorder.Param saleorderParam = mSaleorder.setVip(mVip).param();
for (int i = 0; i < mSaledetails.size(); i++) {
saleorderParam.saleOrderParamDetailList.add(mSaledetails.get(i).param());
}
return saleorderParam;
}
/**
* 支付成功
*/
private void paySucc(Saleorder saleorder) {
mView.showPaySuccFragment(saleorder);
}
/**
* 支付失败
*/
private void payFail(Throwable throwable) {
mView.showPayFailFragment(throwable, mSaleorder);
}
}
package com.xingdata.zzdpos.ui.settle.adapter;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemPayBinding;
import com.xingdata.zzdpos.model.Pay;
import java.util.ArrayList;
public class PayAdapter extends BaseAdapter<Pay, ItemPayBinding> {
public PayAdapter() {
super(R.layout.item_pay, new ArrayList<>());
}
@Override
protected void convert(ItemPayBinding mViewBinding, Pay item) {
int resLogo, resBackground;
switch (item.getPayType()) {
case C.PAY_CHANNEL.CASH:
resLogo = R.mipmap.pay_cash;
resBackground = R.color.red_diaochan;
break;
case C.PAY_CHANNEL.WECHAT:
resLogo = R.mipmap.pay_wechat;
resBackground = R.color.green_kongrun;
break;
case C.PAY_CHANNEL.ALI:
resLogo = R.mipmap.pay_alipay;
resBackground = R.color.blue_yuefei;
break;
case C.PAY_CHANNEL.BANK:
resLogo = R.mipmap.pay_card;
resBackground = R.color.cyan_liubei;
break;
case C.PAY_CHANNEL.CARD:
resLogo = R.mipmap.pay_membershipcard;
resBackground = R.color.yellow_huangxin;
break;
case C.PAY_CHANNEL.TALLY:
resLogo = R.mipmap.pay_credit;
resBackground = R.color.purple_yanqing;
break;
default:
resLogo = R.mipmap.pay_cash;
resBackground = R.color.red_diaochan;
break;
}
mViewBinding.ivLogo.setImageResource(resLogo);
GenericDraweeHierarchy hierarchy = mViewBinding.ivBackground.getHierarchy();
hierarchy.setBackgroundImage(mContext.getResources().getDrawable(resBackground));
mViewBinding.ivBackground.setHierarchy(hierarchy);
}
}
package com.xingdata.zzdpos.ui.settle.fragment;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentPayCashBinding;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.view.InputerView;
import com.xingdata.zzdpos.util.ConvertUtil;
public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCashBinding> {
private InputerView<SettlePresenter> mInputerView = new InputerView<>();
private Long mOrderAmt;
@Override
public int getLayoutId() {
return R.layout.fragment_pay_cash;
}
@Override
public void initView() {
this.loadRootFragment(R.id.f_inputer, mInputerView);
mInputerView.setOnResultChangeListener(this::setOrderInfo);
mInputerView.setOnSettleClickListener(this::clickSettle);
mViewBinding.tvOrderAmt.setText(ConvertUtil.fenToYuan(mOrderAmt));
mViewBinding.tvPayAmt.setText(ConvertUtil.fenToYuan(mOrderAmt));
mViewBinding.tvChange.setText("---");
}
/**
* 加载订单信息
*
* @param saleorder 订单信息
*/
public void loadSaleorder(Saleorder saleorder) {
this.mOrderAmt = saleorder.getOrderPayAmt();
}
/**
* 界面设置
*
* @param payAmt 实付价格
*/
private void setOrderInfo(Long payAmt) {
mViewBinding.tvPayAmt.setText(ConvertUtil.fenToYuan(payAmt));
if (payAmt - mOrderAmt > 0) {
mViewBinding.tvChange.setText(ConvertUtil.fenToYuan(payAmt - mOrderAmt));
} else {
mViewBinding.tvChange.setText("---");
}
}
/**
* 点击结算
*
* @param payAmt 实付价格
*/
private void clickSettle(Long payAmt) {
if (payAmt - mOrderAmt >= 0) {
mPresenter.payInCash(payAmt, payAmt - mOrderAmt);
}
}
}
package com.xingdata.zzdpos.ui.settle.fragment;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentPayResultBinding;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.settle.SettlePresenter;
public class PayResultFragment extends BaseFragment<SettlePresenter, FragmentPayResultBinding> {
private boolean mResult;
private Saleorder mSaleorder;
@Override
public int getLayoutId() {
return R.layout.fragment_pay_result;
}
@Override
public void initView() {
mViewBinding.setPayResult(mResult);
mViewBinding.tvCount.setText(mSaleorder.getGoodsCnt());
mViewBinding.tvOrderAmt.setText(mSaleorder.getPayAmt());
mViewBinding.tvType.setText(mSaleorder.getPayChannel());
mViewBinding.tvTime.setText(mSaleorder.getOrderTime());
mViewBinding.ivResult.setImageResource(mResult ? R.mipmap.ic_succeed : R.mipmap.ic_fail);
mViewBinding.btnConfirm.setOnClickListener(view -> {
if (mResult) mPresenter.clickComplete();
else mPresenter.clickRetry();
});
}
/**
* 设置订单信息
*
* @param saleorder 订单信息
* @return this
*/
public PayResultFragment setSaleorder(Saleorder saleorder) {
this.mSaleorder = saleorder;
return this;
}
/**
* 设置结果
*
* @param isSucc 是否成功
* @return this
*/
public PayResultFragment setResult(boolean isSucc) {
this.mResult = isSucc;
return this;
}
}
package com.xingdata.zzdpos.ui.settle.fragment;
import android.support.design.widget.BottomSheetBehavior;
import android.support.v7.widget.StaggeredGridLayoutManager;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSettleBinding;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.adapter.PayAdapter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.List;
public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettleBinding> {
private PayAdapter mPayAdapter;
@Override
public int getLayoutId() {
return R.layout.fragment_settle;
}
@Override
public void initView() {
mViewBinding.setDefualtVip(true);
// pay adapter
mPayAdapter = new PayAdapter();
mViewBinding.rlPay.setAdapter(mPayAdapter);
mViewBinding.rlPay.setLayoutManager(new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL));
mViewBinding.rlPay.addItemDecoration(new RecyclerViewUtil.GridSpacingItemDecoration(3, 20, true));
mPayAdapter.setOnItemClickListener((adapter, view, position) -> mPresenter.clickPayChannelView(mPayAdapter.getData().get(position).getPayType()));
// other listener
mViewBinding.clVip.setOnClickListener(view -> mPresenter.clickVipView());
mViewBinding.tvSettle.setOnClickListener(view -> BottomSheetBehavior.from(mViewBinding.llSheet).setState(BottomSheetBehavior.STATE_EXPANDED));
mPresenter.initSettle();
}
/**
* 加载会员
*
* @param vip 会员信息
*/
public void loadVip(Vip vip) {
mViewBinding.setDefualtVip(false);
mViewBinding.setName("张洋");
mViewBinding.setPhone("15201451212");
mViewBinding.setDisRate("8.5");
// mViewBinding.setDefualtVip(vip.isDefaultVip());
// mViewBinding.setName(vip.getVipName());
// mViewBinding.setPhone(ConvertUtil.longToString(vip.getVipMobile()));
// if (vip.getVipDefDiscount() < 100 && vip.getVipDefDiscount() > 0) {
// mViewBinding.setDisRate(String.valueOf((double) vip.getVipDefDiscount() / 10));
// }
}
/**
* 加载订单信息
*
* @param saleorder 订单信息
*/
public void loadSaleorder(Saleorder saleorder) {
mViewBinding.tvPayAmt.setText(ConvertUtil.fenToYuan(saleorder.getOrderPayAmt()));
}
/**
* 加载支付方式
*/
public void loadPays(List<Pay> pays) {
mPayAdapter.setNewData(pays);
}
}
package com.xingdata.zzdpos.ui.settle.view;
import android.view.View;
import android.widget.TextView;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.databinding.ViewInputerBinding;
import com.xingdata.zzdpos.util.ConvertUtil;
public class InputerView<P extends BasePresenter> extends BaseFragment<P, ViewInputerBinding> {
private String mValue;
private OnResultChangeListener mOnResultChangeListener;
private onSettleClickListener mOnSettleClickListener;
public InputerView() {
mValue = "";
}
public interface OnResultChangeListener {
void onResultChange(Long result);
}
public interface onSettleClickListener {
void onSettleClick(Long result);
}
@Override
public int getLayoutId() {
return R.layout.view_inputer;
}
@Override
public void initView() {
View.OnClickListener mOnClickListener = view -> {
switch (view.getId()) {
case R.id.tv_del:
delete();
break;
case R.id.tv_clear:
clear();
break;
case R.id.tv_settle:
settle();
break;
default:
if (view instanceof TextView) {
String str = ((TextView) view).getText().toString();
//限制位数
if (str.matches("[0-9]+") && mValue.split("[.]").length > 1 && mValue.split("[.]")[1].length() == 2)
return;
//限制小数点
if ((mValue.length() == 0 || mValue.contains(".")) && str.matches("[.]"))
return;
mValue += str;
}
break;
}
if (mOnResultChangeListener != null) {
mOnResultChangeListener.onResultChange(ConvertUtil.yuanToFen(mValue));
}
};
mViewBinding.setOnClick(mOnClickListener);
}
/**
* 删除
*/
private void delete() {
if (mValue.length() > 0) mValue = mValue.substring(0, mValue.length() - 1);
}
/**
* 结账
*/
private void settle() {
if (mOnSettleClickListener != null) {
mOnSettleClickListener.onSettleClick(ConvertUtil.yuanToFen(mValue));
}
}
/**
* 清空
*/
private void clear() {
mValue = "";
if (mOnResultChangeListener != null) {
mOnResultChangeListener.onResultChange(ConvertUtil.yuanToFen(mValue));
}
}
public void setOnResultChangeListener(OnResultChangeListener onResultChangeListener) {
this.mOnResultChangeListener = onResultChangeListener;
this.clear();
}
public void setOnSettleClickListener(onSettleClickListener onSettleClickListener) {
this.mOnSettleClickListener = onSettleClickListener;
}
}
package com.xingdata.zzdpos.ui.store;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
interface StoreContract {
interface View extends BaseView {
}
abstract class Presenter extends BasePresenter<View> {
}
}
......@@ -71,7 +71,8 @@ public class ConvertUtil {
*/
public static Long yuanToFen(String yuan) {
yuan = StringUtils.isEmpty(yuan) ? "0" : yuan;
return (long) (Double.valueOf(yuan) * 100);
BigDecimal b = new BigDecimal(Double.valueOf(yuan) * 100);
return b.setScale(0, BigDecimal.ROUND_HALF_UP).longValue();
}
/**
......@@ -95,11 +96,11 @@ public class ConvertUtil {
if (l == null) return "0";
return String.valueOf(l);
}
/**
* 分转元去掉.0 ROUND_DOWN
*
* @param fen
* 分
* @param fen 分
* @return 元
*/
public static String fenToYuanNoZero(Long fen) {
......@@ -121,13 +122,11 @@ public class ConvertUtil {
/**
* 分转元保留2位小數
*
* @param fen
* 分
* @param fen 分
* @return 元
*/
public static String fenToYuan2(Long fen) {
if (fen==null)
{
if (fen == null) {
return "0.00";
}
BigDecimal decimal = new BigDecimal(fen);
......@@ -137,8 +136,7 @@ public class ConvertUtil {
/**
* 折扣率转换最大100
*
* @param dis
* 分
* @param dis 分
* @return 元
*/
public static String discount(Long dis) {
......
......@@ -12,16 +12,16 @@ import android.view.View;
* Created by Administrator on 2017/12/21.
*/
class MyItemDecoration extends RecyclerView.ItemDecoration {
public class MyMenuItemDecoration extends RecyclerView.ItemDecoration {
private Drawable mDividerDarwable;
private int mDividerHight = 1;
private Paint mColorPaint;
private int size=2;
private int size = 2;
public final int[] ATRRS = new int[]{android.R.attr.listDivider};
public MyItemDecoration(Context context) {
public MyMenuItemDecoration(Context context) {
final TypedArray ta = context.obtainStyledAttributes(ATRRS);
this.mDividerDarwable = ta.getDrawable(0);
ta.recycle();
......@@ -31,7 +31,7 @@ class MyItemDecoration extends RecyclerView.ItemDecoration {
int dividerHight 分割线的线宽
int dividerColor 分割线的颜色
*/
public MyItemDecoration(Context context, int dividerHight, int dividerColor) {
public MyMenuItemDecoration(Context context, int dividerHight, int dividerColor) {
this(context);
mDividerHight = dividerHight;
mColorPaint = new Paint();
......@@ -42,18 +42,19 @@ class MyItemDecoration extends RecyclerView.ItemDecoration {
int dividerHight 分割线的线宽
int dividerColor 分割线的颜色
*/
public MyItemDecoration(Context context, int dividerHight, int dividerColor, int size) {
public MyMenuItemDecoration(Context context, int dividerHight, int dividerColor, int size) {
this(context);
mDividerHight = dividerHight;
mColorPaint = new Paint();
mColorPaint.setColor(dividerColor);
this.size=size;
this.size = size;
}
/*
int dividerHight 分割线的线宽
Drawable dividerDrawable 图片分割线
*/
public MyItemDecoration(Context context, int dividerHight, Drawable dividerDrawable) {
public MyMenuItemDecoration(Context context, int dividerHight, Drawable dividerDrawable) {
this(context);
mDividerHight = dividerHight;
mDividerDarwable = dividerDrawable;
......@@ -73,8 +74,8 @@ class MyItemDecoration extends RecyclerView.ItemDecoration {
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
final int top = child.getTop() - params.topMargin+30;
final int bottom = child.getBottom() + params.bottomMargin-30;
final int top = child.getTop() - params.topMargin + 30;
final int bottom = child.getBottom() + params.bottomMargin - 30;
int left = 0;
int right = 0;
......@@ -108,8 +109,8 @@ class MyItemDecoration extends RecyclerView.ItemDecoration {
final View child = parent.getChildAt(i);
RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
final int left = child.getLeft() - params.leftMargin - mDividerHight;
final int right = child.getRight() + params.rightMargin;
final int left = child.getLeft() - params.leftMargin - mDividerHight+30;
final int right = child.getRight() + params.rightMargin-30;
int top = 0;
int bottom = 0;
......@@ -127,9 +128,11 @@ class MyItemDecoration extends RecyclerView.ItemDecoration {
// top = child.getBottom() + params.bottomMargin;
// bottom = top + mDividerHight;
// } else {
// if (i!=)
top = child.getBottom() + params.bottomMargin;
bottom = top + mDividerHight;
if (i/size!=(parent.getAdapter().getItemCount()/size-1)){
top = child.getBottom() + params.bottomMargin;
bottom = top + mDividerHight;
}
// }
//画分割线
mDividerDarwable.setBounds(left, top, right, bottom);
......
......@@ -55,7 +55,7 @@ public final class SystemUtil {
}
}
// return deviceSN;
return "92209320";
return "92209325";
}
......
......@@ -3,10 +3,10 @@
<corners android:radius="@dimen/all_shape_radius" />
<stroke
android:width="0.5dp"
android:color="@color/black" />
<solid android:color="@color/all_transparent" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!--被按压时-->
<item android:color="@color/black_baozheng" android:drawable="@drawable/radio_shape_item" android:state_checked="true"/>
<!--普通状态,这里在stroke中通过dashWidth和dashGap设置边线为虚线-->
<item android:color="@color/black" android:state_checked="false">
<shape>
<!-- 边框颜色 -->
<stroke
android:width="0.5dp"
android:color="@color/transparent"/>
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-2dp"
android:right="-2dp"
android:top="-2dp">
<shape>
<solid android:color="@android:color/transparent"/>
<stroke
android:width="2dp"
android:color="@color/red_guanyu"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="@dimen/all_radius" />
<solid android:color="@color/red_guanyu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="@dimen/all_radius" />
<stroke
android:width="0.5dp"
android:color="@color/red_guanyu" />
<solid android:color="@color/white_caocao" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/radio_select_bg" android:state_checked="true"/>
<item android:drawable="@mipmap/radio_normal_bg" android:state_checked="false"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_red_round_rectangle_strokeless" android:state_pressed="true" />
<item android:drawable="@drawable/red_border_allradius" android:state_pressed="true" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gradient_gray_round_rectangle_stroke" />
<item android:drawable="@drawable/redout_border_whitein" />
</selector>
\ No newline at end of file
......@@ -2,6 +2,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_pressed="true" />
<item android:color="@color/blue" />
<item android:color="@color/red_guanyu" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_navy_blue_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/shape_navy_blue"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/all_transparent" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_pressed="true" />
<item android:drawable="@drawable/shape_white_round_rectangle_blue" android:state_focused="true" />
<item android:drawable="@drawable/shape_white_round_rectangle_dark" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/navy_blue" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/deep_blue" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/settle_btn_radius" />
<solid android:color="@color/red_guanyu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/settle_btn_radius" />
<solid android:color="@color/white_transparent15" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<stroke
android:width="@dimen/edit_border"
android:color="@color/blue" />
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<stroke
android:width="@dimen/edit_border"
android:color="@color/edittext_border" />
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/gray_huanggai"/>
<solid android:color="@color/appBack"/>
</shape>
</item>
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/gray_huanggai"/>
</shape>
</item>
<item android:bottom="1dp">
<shape>
<solid android:color="@color/white"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/ic_title"
layout="@layout/title" />
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/gray_zhouyu"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title">
</FrameLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="textSize"
type="String"/>
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.xingdata.zzdpos.ui.feedback.FeedBackActivity">
<include
android:id="@+id/ic_title"
layout="@layout/title" />
<EditText
android:id="@+id/editText"
style="@style/dialog_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:gravity="top"
android:hint="@string/feedBack_edit_hint"
android:maxLength="101"
android:minLines="5"
app:layout_constraintTop_toBottomOf="@id/ic_title" />
<EditText
android:id="@+id/edit_contactWay"
style="@style/dialog_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:gravity="top"
android:hint="@string/feedBack_contactWay"
android:maxLength="22"
android:minLines="1"
android:singleLine="true"
app:layout_constraintTop_toBottomOf="@id/editText" />
<TextView
android:id="@+id/text_max"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp_4"
android:paddingEnd="@dimen/dp_4"
android:text="/100"
app:layout_constraintBottom_toBottomOf="@id/editText"
app:layout_constraintEnd_toEndOf="@id/editText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp_4"
android:text="@{textSize}"
android:textColor="@color/red_guanyu"
app:layout_constraintBottom_toBottomOf="@id/text_max"
app:layout_constraintEnd_toStartOf="@id/text_max" />
<Button
android:id="@+id/btn_submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:background="@drawable/red_border"
android:text="@string/feedBack_submit"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_text_size"
app:layout_constraintTop_toBottomOf="@id/edit_contactWay" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.xingdata.zzdpos.ui.help.HelpActivity">
<include
android:id="@+id/ic_title"
layout="@layout/title_appback"
app:layout_constraintTop_toTopOf="parent" />
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<ImageButton
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/black_zhangfei"
android:src="@mipmap/icon_help_logo"
app:layout_constraintBottom_toBottomOf="@id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white_caocao"
android:weightSum="2">
<TextView
style="@style/textView_body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/help_web_hint" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:padding="@dimen/all_padding"
android:text="@string/help_web" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white_caocao"
android:weightSum="2">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_phone_hint" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:padding="@dimen/all_padding"
android:text="@string/help_phone" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white_caocao"
android:weightSum="2">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_code_hint" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:padding="@dimen/all_padding"
android:text="@string/help_web" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white_caocao"
android:weightSum="2">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_word_hint" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:padding="@dimen/all_padding"
android:text="@string/help_web" />
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<FrameLayout
android:id="@+id/frg"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"></FrameLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -11,26 +11,39 @@
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
style="@style/Base.Widget.Design.TabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/white_caocao"
android:elevation="@dimen/view_line_L2"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal"
android:paddingTop="@dimen/all_padding"
app:layout_constraintBottom_toBottomOf="parent"
app:tabIndicatorHeight="0dp"
app:tabTextAppearance="@android:style/TextAppearance.Holo.Small">
app:tabGravity="fill"
app:tabSelectedTextColor="@color/red_guanyu"
app:tabTextAppearance="@android:style/TextAppearance.Holo.Small"
app:tabTextColor="@color/black_likui">
</android.support.design.widget.TabLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:background="@color/gray_zhouyu"
app:layout_constraintTop_toTopOf="@id/tab_layout" />
<android.support.v4.view.ViewPager
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/tab_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
</android.support.v4.view.ViewPager>
......
......@@ -6,12 +6,31 @@
android:layout_height="match_parent"
android:orientation="vertical">
<Toolbar
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/store_product_bg"
android:title="收款"
android:titleTextColor="@color/white" />
android:layout_height="?attr/actionBarSize"
android:background="@color/black_zhangfei">
<ImageButton
android:layout_width="@dimen/title_height"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_white" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/payment_title"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_sub_title_size" />
</FrameLayout>
<FrameLayout
android:id="@+id/f_payment"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack"
tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity">
<include
android:id="@+id/ic_title"
layout="@layout/title_appback"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/ll_menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="@integer/all_top_weight"/>
<LinearLayout
android:id="@+id/ll_menu"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"
app:layout_constraintBottom_toBottomOf="@id/rc_ticket"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title"
app:layout_constraintVertical_weight="2.5">
<TextView
android:id="@+id/btn_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:layout_weight="1.2"
android:background="@color/transparent"
android:drawablePadding="@dimen/all_spacing"
android:drawableStart="@mipmap/login_phone"
android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/fragment_store_item_spacing"
android:text="共 2 种优惠券"
android:textColor="@color/menu_back"
android:textSize="@dimen/all_text_size"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7.5"/>
<Button
android:id="@+id/btn_add"
android:layout_width="0dp"
android:layout_height="@dimen/fragment_store_et_height"
android:layout_weight="1"
android:background="@drawable/selector_navy_blue"
android:drawableLeft="@mipmap/bindingcounter_addcounter_befor"
android:onClick="@{OnClickListener}"
android:paddingLeft="5dp"
android:text="添加优惠券"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/rc_ticket"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="@dimen/all_margin_big"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu"
app:layout_constraintVertical_weight="22">
</android.support.v7.widget.RecyclerView>
<TextView
android:id="@+id/tv_empty"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/appBack"
android:drawableTop="@mipmap/icon_things_null"
android:gravity="center"
android:padding="100dp"
android:text="@string/empty_other_select"
android:textColor="@color/white_half"
android:textSize="@dimen/all_text_size_big"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu"
app:layout_constraintVertical_weight="22"/>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?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="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao">
<ImageButton
android:layout_width="@dimen/title_height"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/payment_title"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai" />
</FrameLayout>
<FrameLayout
android:id="@+id/f_settle"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -15,7 +15,7 @@
style="@style/dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin" />
android:layout_marginBottom="@dimen/all_padding" />
<ViewStub
......@@ -26,14 +26,21 @@
android:inflatedId="@+id/panel_import" />
<android.support.constraint.ConstraintLayout
<LinearLayout
android:layout_marginTop="@dimen/all_padding"
android:orientation="horizontal"
android:weightSum="2"
android:padding="@dimen/dp_4"
android:background="@color/white_caocao"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_margin="1dp"
android:id="@+id/btn_cancel"
style="@style/button_passive"
android:layout_width="@dimen/dialog_button_width"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
......@@ -47,9 +54,11 @@
tools:targetApi="lollipop" />
<Button
android:layout_margin="1dp"
android:id="@+id/btn_confirm"
style="@style/button_positive"
android:layout_width="@dimen/dialog_button_width"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
......@@ -62,7 +71,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:targetApi="lollipop" />
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="date"
type="String" />
<variable
name="operName"
type="String" />
<variable
name="orderNum"
type="String" />
<variable
name="cash"
type="String" />
<variable
name="wechat"
type="String" />
<variable
name="alipay"
type="String" />
<variable
name="bank"
type="String" />
<variable
name="vipPay"
type="String" />
</data>
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:padding="0dp">
<TextView
android:id="@+id/handover_tv_sumamt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:text="¥9999"
android:textColor="@color/red900"
android:textSize="@dimen/big_text_size"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/handover_tv_sumamt_hint" />
<TextView
android:id="@+id/handover_tv_sumamt_hint"
android:paddingTop="@dimen/all_margin"
android:paddingBottom="@dimen/all_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="实收金额"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/small_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_zhouyu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/handover_tv_sumamt" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingEnd="@dimen/dp_4"
android:paddingBottom="@dimen/all_padding"
android:weightSum="2"
app:layout_constraintTop_toBottomOf="@id/view1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_date" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_oper" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_orderNum" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_cash" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_wechat" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_alipay" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_bank" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_vip" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{date}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{operName}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{orderNum}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{cash}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{wechat}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{alipay}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{bank}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{vipPay}"
android:textColor="@color/black_likui" />
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"></variable>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="启用状态:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<RadioGroup
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rd_suspendeds"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="暂停 "
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rd_starts"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="启用 "
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:id="@+id/ll_all"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="积分面值:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_integral_exchange_rule_count_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text=" 个积分等于1元"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="兑换条件:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="right"
android:text="订单实收满 "
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
<EditText
android:id="@+id/et_integral_exchange_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="元"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text=""
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="right"
android:text="可以使用 "
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
<EditText
android:id="@+id/et_integral_exchange_count"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="个积分"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="OnClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"></variable>
<variable
name="vip"
type="com.xingdata.zzdpos.model.Vip"/>
<variable
name="ticketCount"
type="int"/>
<variable
name="isExpand"
type="boolean"/>
<variable
name="pointDisAmt"
type="String"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:id="@+id/tv_rules_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="规则名称:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/et_integral_role_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:focusable="true"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="启用状态:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<RadioGroup
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rd_suspendeds"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="暂停 "
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rd_starts"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="启用 "
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_margin"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"
android:paddingTop="@dimen/all_margin_big">
<TextView
android:id="@+id/tv_vip_level"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="会员等级:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/tv_vip_level_select"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="5"
android:drawableRight="@mipmap/createstore_drop_down"
android:ems="10"
android:gravity="center"
android:maxLength="5"
android:onClick="@{OnClickListener}"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_vip_level_select_show_no_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="5"
android:ems="10"
android:gravity="center"
android:maxLength="5"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"
android:visibility="gone"/>
<TextView
android:id="@+id/ns_vip_level"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="获取方式:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<RadioGroup
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7"
android:checkedButton="@id/rd_gettype_all"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rd_gettype_all"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="通用 "
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rd_gettype_category"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="品类定义 "
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rd_gettype_shop"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="商品定义 "
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_all"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="积分比例:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_integral_weight"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="元一个积分"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="有效期限:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_integral_time_limit"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="个月"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="商品品类:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/tv_category_select_one"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end"
android:gravity="center"
android:maxLength="5"
android:onClick="@{OnClickListener}"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_category_select_two"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/all_padding"
android:layout_weight="2"
android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end"
android:gravity="center"
android:maxLength="5"
android:onClick="@{OnClickListener}"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_category_select_three"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/all_padding"
android:layout_weight="2"
android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end"
android:ems="10"
android:gravity="center"
android:maxLength="5"
android:onClick="@{OnClickListener}"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_category_select_show_no_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/all_padding"
android:layout_weight="6"
android:ellipsize="end"
android:ems="20"
android:gravity="center"
android:maxLength="20"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"
android:visibility="gone"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="积分比例:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_integral_category_weight"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="元一个积分"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="有效期限:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_integral_category_time_limit"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"
android:textColor="@color/black"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="个月"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_shop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
android:paddingTop="@dimen/all_padding"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="有效期限:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_shop_time_limit"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxEms="5"
android:maxLength="5"
android:saveEnabled="false"
android:textColor="@color/black"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="个月"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<Button
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/red_guanyu"
android:text="添加"
android:textColor="@color/white"
android:onClick="@{OnClickListener}"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -68,7 +68,7 @@
<Button
android:id="@+id/btn_custom"
style="@style/button_positive_noradius"
style="@style/button_positive_allradius"
android:layout_width="@dimen/dialog_button_width"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"></variable>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="活动名称:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/tv_integral_rule_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:focusable="true"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="启用状态:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<RadioGroup
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:checkedButton="@id/rb_suspended"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_suspended"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="暂停 "
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rb_start"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="启用 "
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_margin"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"
android:paddingTop="@dimen/all_margin_big">
<TextView
android:id="@+id/tv_vip_level"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="规则设置:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="优惠券面值:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_ticket_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:inputType="number"
android:maxLength="5"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="元"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="券有效期:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/tv_date"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:onClick="@{OnClickListener}"
android:paddingBottom="2dp"
android:paddingTop="2dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="订单金额满:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_rule_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:inputType="phone|number"
android:maxLength="5"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="元可用"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="每单使用:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_ticket_count"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:inputType="phone|number"
android:maxLength="2"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="张"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/announcement_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu" />
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
layout="@layout/title_appback"/>
<LinearLayout
......
......@@ -5,9 +5,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragment layout -->
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
......@@ -15,10 +16,11 @@
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/black"
android:background="@color/black_zhangfei"
android:gravity="center"
android:paddingTop="30dp"
android:weightSum="2"
......@@ -27,7 +29,9 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_payment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -37,6 +41,7 @@
android:textColor="#FFF" />
<TextView
android:id="@+id/tv_splash"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -48,11 +53,28 @@
</LinearLayout>
<TextView
android:id="@+id/btn_handover"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:background="@drawable/shape_transparent_round"
android:paddingBottom="@dimen/dp_4"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/dp_4"
android:text="@string/handover_hint"
android:textColor="@color/white_caocao"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.v7.widget.RecyclerView
android:id="@+id/fragment_casher_recycler"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/gray_zhouyu"
android:layout_marginBottom="@dimen/all_padding"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/white_caocao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -16,7 +16,7 @@
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
layout="@layout/title_appback"/>
<LinearLayout
android:layout_width="match_parent"
......
......@@ -16,7 +16,7 @@
<include
android:id="@+id/ic_title"
layout="@layout/title"></include>
layout="@layout/title_appback"></include>
<LinearLayout
android:layout_width="match_parent"
......@@ -192,11 +192,12 @@
style="@style/button_positive"
android:layout_width="@dimen/create_store_btn_width"
android:layout_height="@dimen/create_store_btn_height"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:onClick="@{onClickListener}"
android:text="@string/login_createstorefragment_btn_last"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
android:textSize="@dimen/et_textsize" />
<Button
android:id="@+id/btn_next"
......
......@@ -16,7 +16,7 @@
android:gravity="center"
android:orientation="vertical">
<include android:id="@+id/ic_title" layout="@layout/title"/>
<include android:id="@+id/ic_title" layout="@layout/title_appback"/>
<LinearLayout
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<LinearLayout
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline_white_gray"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/ll_menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ic_title">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/but_add"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_padding"
android:text="添加获取规则"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/text_three_title"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_menu"
android:layout_width="0dp"
android:layout_height="49dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@id/cl_bottom"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_add"
app:layout_constraintVertical_weight="2.5">
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:checkedButton="@id/rb_get"
android:gravity="center"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_get"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/radio_select"
android:button="@null"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_padding"
android:text="获取规则"
android:textColor="@drawable/radio_select"
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rb_exchange"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/radio_select"
android:button="@null"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_padding"
android:text="兑换规则"
android:textColor="@drawable/radio_select"
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/cl_bottom"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/gray_zhouyu"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu"
app:layout_constraintVertical_weight="22">
<LinearLayout
android:id="@+id/ll_get"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical"
android:padding="@dimen/all_padding">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_message"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_exchange"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical"
android:padding="@dimen/all_padding"
android:visibility="gone">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_exchange_message"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<layout>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<android.support.constraint.ConstraintLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@mipmap/bg_myself"
android:gravity="center"
android:paddingTop="30dp"
android:weightSum="2"
app:layout_constraintBottom_toBottomOf="@id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/user_img"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="@dimen/all_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:placeholderImage="@mipmap/img_head"
app:placeholderImageScaleType="centerInside"
app:roundAsCircle="true" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/padding_medium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@mipmap/drop_down_fff"
app:layout_constraintStart_toEndOf="@id/user_img"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="李小乐"
android:textColor="@color/white_caocao"
android:textSize="@dimen/big_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_padding"
android:text="18710251009"
android:textColor="@color/white_caocao"
android:textSize="@dimen/small_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="horizontal"
android:paddingTop="@dimen/all_padding">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="北京市丰台区南四环西路186号"
android:textColor="@color/white_caocao"
android:textSize="@dimen/small_text_size" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_position" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/drop_down_fff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:src="@mipmap/drop_down_fff"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/fragment_myself_recycler"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/all_padding"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/gray_zhouyu"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="@dimen/all_margin"
android:layout_marginBottom="@dimen/all_margin_big"
android:layout_weight="4"
app:cardCornerRadius="@dimen/all_shape_radius">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white_caocao"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:gravity="center"
android:text="@string/settle_order_amt"
android:textColor="@color/black_likui"
app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toLeftOf="parent" />
<TextView
android:id="@+id/tv_order_amt"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/fragment_settle_bigtextsize"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_spacing">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_amt"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_text_size" />
<TextView
android:id="@+id/tv_pay_amt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_sub_title_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_spacing">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_change"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_text_size" />
<TextView
android:id="@+id/tv_change"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_sub_title_size" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<FrameLayout
android:id="@+id/f_inputer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="7" />
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="payResult"
type="boolean" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:contentDescription="@string/settle_pay_result" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:gravity="center"
android:text="@{payResult?@string/settle_pay_succ:@string/settle_pay_fail}"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_sub_title_size"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_time"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_caption_size" />
<TextView
android:id="@+id/tv_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_caption_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_type"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_caption_size" />
<TextView
android:id="@+id/tv_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_caption_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_count"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_caption_size" />
<TextView
android:id="@+id/tv_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_caption_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_margin"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_order_amt"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_caption_size" />
<TextView
android:id="@+id/tv_order_amt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_caption_size" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<Button
android:id="@+id/btn_confirm"
style="@style/button_positive"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:foreground="?android:attr/selectableItemBackground"
android:text="@{payResult?@string/settle_complete:@string/settle_retry}" />
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<LinearLayout
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/store_product_bg"
android:orientation="vertical">
android:background="@color/black_zhangfei"
android:gravity="bottom"
android:paddingBottom="@dimen/all_margin">
<TextView
android:id="@+id/tv_exp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_spacing"
android:layout_marginEnd="@dimen/all_margin"
android:gravity="end"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_result"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/tv_money_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:gravity="end|center_vertical"
android:textColor="@color/white_caocao" />
android:text="@string/money_rmb"
android:textColor="@color/white_caocao"
android:textSize="@dimen/fragment_settle_bigtextsize"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/tv_result" />
<TextView
android:id="@+id/tv_result"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_margin"
android:gravity="end|center_vertical"
android:textColor="@color/white_caocao" />
</LinearLayout>
android:maxLines="1"
android:textColor="@color/white_caocao"
android:textSize="@dimen/fragment_settle_bigtextsize"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/tv_money_hint"
app:layout_constraintRight_toRightOf="parent" />
</android.support.constraint.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/white"
android:background="@color/white_caocao"
android:gravity="end|center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="小计:" />
android:layout_marginEnd="@dimen/all_spacing"
android:text="@string/payment_total"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size" />
<TextView
android:id="@+id/tv_amt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="40.00"
android:textColor="@color/deep_red" />
android:layout_marginEnd="@dimen/all_margin"
android:textColor="@color/deep_red"
android:textSize="@dimen/all_sub_title_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginBottom="@dimen/all_margin_big"
android:background="@color/gray_huanggai" />
<FrameLayout
android:id="@+id/f_inputer"
android:layout_width="match_parent"
......
<layout>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<TextView
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:elevation="@dimen/view_line_L1"
android:gravity="center"
android:minHeight="?attr/actionBarSize"
android:padding="0dp"
android:text="@string/menu_service"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/big_text_size"
app:layout_constraintTop_toTopOf="parent">
</TextView>
<ScrollView
android:layout_width="0dp"
android:layout_height="0dp"
android:scrollbars="none"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tool_bar">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bg_service"
/>
</ScrollView>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="defualtVip"
type="boolean" />
<variable
name="name"
type="String" />
<variable
name="phone"
type="String" />
<variable
name="disRate"
type="String" />
</data>
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:layout_marginTop="@dimen/all_spacing"
android:background="@color/gray_huanggai" />
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_vip"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_head"
android:layout_width="@dimen/settle_vip_head"
android:layout_height="@dimen/settle_vip_head"
android:layout_marginStart="@dimen/all_margin"
app:backgroundImage="@color/white_caocao"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="parent"
app:placeholderImage="@mipmap/icon_menu_service_1"
app:roundAsCircle="true"
app:roundingBorderColor="@color/gray_huanggai"
app:roundingBorderWidth="@dimen/all_line_width" />
<com.facebook.drawee.view.SimpleDraweeView
android:layout_width="@dimen/settle_vip_level"
android:layout_height="@dimen/settle_vip_level"
android:visibility="@{defualtVip ? 8 : 0}"
app:backgroundImage="@color/red_guanyu"
app:layout_constraintBottom_toBottomOf="@id/iv_head"
app:layout_constraintRight_toRightOf="@id/iv_head"
app:placeholderImage="@mipmap/bindingcounter_addcounter_befor"
app:roundAsCircle="true" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:orientation="vertical"
android:visibility="@{defualtVip ? 8 : 0}"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_head"
app:layout_constraintTop_toBottomOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{name}"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{phone}"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_caption_size" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:text="@string/settle_select_vip"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_text_size"
android:visibility="@{defualtVip ? 0 : 8}"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_head"
app:layout_constraintTop_toBottomOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_caption_size"
android:visibility="@{defualtVip ? 8 : 0}"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@id/iv_arrow"
app:layout_constraintTop_toBottomOf="parent" />
<ImageView
android:id="@+id/iv_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:contentDescription="@string/settle_select_vip"
android:src="@mipmap/drop_down"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:layout_marginBottom="@dimen/all_spacing"
android:background="@color/gray_huanggai" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/ll_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:behavior_peekHeight="?attr/actionBarSize"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settle_pay_amt"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:text="@string/money_rmb"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_text_size" />
<TextView
android:id="@+id/tv_pay_amt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_sub_title_size" />
<TextView
android:id="@+id/tv_settle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_red_round_rectangle_more_round"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin_big"
android:paddingStart="@dimen/all_margin_big"
android:paddingTop="@dimen/all_spacing"
android:text="@string/settle_btn_expand"
android:textColor="@color/white_caocao" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_pay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/gray_zhouyu"
android:textAppearance="@android:style/TextAppearance.Large" />
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
</layout>
\ No newline at end of file
......@@ -68,8 +68,7 @@
android:ems="10"
android:hint="@string/login_et_password_hint"
android:inputType="textPassword"
android:maxLength="16"
/>
android:maxLength="16"/>
<Button
......@@ -80,6 +79,7 @@
android:layout_marginRight="@dimen/all_margin_left"
android:layout_marginTop="@dimen/et_margin_logo"
android:background="@drawable/red_border"
android:imeOptions="actionDone"
android:onClick="@{onClickListener}"
android:text="@string/login_signinfragmentfragment_btn_login"
android:textColor="@color/white"
......@@ -87,9 +87,9 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginRight="@dimen/all_margin_left"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/et_margin_logo">
<TextView
......
......@@ -15,7 +15,7 @@
android:background="@color/appBack"
android:orientation="vertical">
<include android:id="@+id/ic_title" layout="@layout/title"></include>
<include android:id="@+id/ic_title" layout="@layout/title_appback"></include>
<LinearLayout
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<layout >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/gray_zhouyu"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/all_padding"
android:text="2017-10-10" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="@dimen/all_shape_radius"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_marginBottom="@dimen/all_padding">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/all_margin"
>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_padding"
android:layout_marginStart="@dimen/all_padding"
android:layout_marginTop="@dimen/all_margin"
android:text="心灵受金华路:糖库心灵受的巅峰之路!"
android:textColor="@color/black_baozheng"
android:textStyle="bold" />
<TextView
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:text="ask領導就阿喀琉斯大家阿厤克斯大家阿隆索死啦對啦開始覺得請問哦請假了受打擊啦看到解開了缺點青蛙禮金卡實力坑爹 啊就是了看到薔薇科額的擴大勢力的就喀什燈籠褲幾千萬大家拉薩大家李克强千萬快樂件大事多久啦空間的權威的來擴大是快樂的切阿德 啊時代科技千龍網的!" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<layout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cv_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/gray_zhouyu"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/integral_bg"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:id="@+id/tv_get"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="满100送一个积分"
android:textColor="@color/white"
android:textSize="@dimen/text_secondary_title"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:layout_marginTop="55dp">
<LinearLayout
android:id="@+id/ll_vip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/all_margin">
<TextView
android:id="@+id/tv_vip_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="适用会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_vip"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="right"
android:text="金牌会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_source"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_vip"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/all_margin">
<TextView
android:id="@+id/tv_source_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="来源品类"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"
/>
<TextView
android:id="@+id/tv_source"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="right"
android:singleLine="true"
android:text="金牌会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_source"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/all_margin">
<TextView
android:id="@+id/tv_status_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="启用状态"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="right"
android:text="启用状态"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</RelativeLayout>
<!--<TextView-->
<!--android:id="@+id/tv_source"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="5"-->
<!--android:text="来源品类"-->
<!--android:textSize="@dimen/et_textsize"/>-->
<!--<TextView-->
<!--android:id="@+id/tv_get"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="3"-->
<!--android:text="获取规则"-->
<!--android:textSize="@dimen/et_textsize"/>-->
<!--<ImageView-->
<!--android:id="@+id/tv_status"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="1"-->
<!--android:src="@mipmap/integral_open"-->
<!--android:textSize="@dimen/et_textsize"/>-->
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
/>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="25dp"
android:paddingBottom="25dp"
android:gravity="center"
android:elevation="0.5dp"
android:background="@color/white_caocao"
android:layout_margin="0.8dp"
android:orientation="vertical">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"/>
android:layout_margin="0.8dp"
android:background="@color/white_caocao"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="25dp"
android:paddingTop="25dp">
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp" />
</LinearLayout>
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black_baozheng" />
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<layout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp">
<TextView
android:id="@+id/item_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/all_padding"
android:background="@color/white_caocao"
android:drawablePadding="@dimen/all_padding"
android:elevation="@dimen/view_line_L050"
android:gravity="left"
android:padding="@dimen/vicescreen_shoppingcart_pandding"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="@dimen/all_text_size" />
</FrameLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/settle_pay_item"
android:foreground="?android:attr/selectableItemBackground">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:roundedCornerRadius="@dimen/all_shape_radius" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_logo"
android:layout_width="@dimen/settle_pay_logo"
android:layout_height="@dimen/settle_pay_logo"
app:layout_constraintBottom_toTopOf="@id/iv_background"
app:layout_constraintLeft_toRightOf="@id/iv_background"
app:layout_constraintRight_toLeftOf="@id/iv_background"
app:layout_constraintTop_toBottomOf="@id/iv_background"
app:roundAsCircle="true" />
</android.support.constraint.ConstraintLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="ticket"
type="com.xingdata.zzdpos.model.Ticket"/>
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/return_ticket_one"/>
<LinearLayout
android:id="@+id/ll_top"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
app:layout_constraintBottom_toTopOf="@id/ll_bottom"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="2.5">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="¥"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_ticket_money"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/all_padding"
android:gravity="center"
android:text="20"
android:textColor="@color/white"
android:textSize="45sp"
android:textStyle="bold"/>
<TextView
android:id="@+id/tv_ticket"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/all_padding"
android:text="优惠券"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_top"
app:layout_constraintVertical_weight="2">
<TextView
android:id="@+id/tv_rule"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="@string/tv_rule"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_date"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="@dimen/all_padding"
android:layout_weight="1"
android:text="@string/tv_date"
android:textColor="@color/white"
android:textSize="@dimen/et_text_mini"/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/return_ticket_two"/>
<TextView
android:id="@+id/tv_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="发券"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/item_tv"
android:layout_width="match_parent"
......@@ -20,6 +17,5 @@
android:textSize="14sp" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#EEEEEE">
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#aaa"/>
<ImageView
android:id="@+id/iv_cancel"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_marginLeft="17dp"
android:padding="8dp"
android:src="@mipmap/to_down"/>
<TextView
android:id="@+id/tv_finish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="17dp"
android:padding="8dp"
android:text="完成"
android:textColor="#24AD9D"
android:textSize="18sp"/>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#aaa"/>
</RelativeLayout>
<!--此部分需要完整复制过去,删减或者更改ID会导致初始化找不到内容而报空-->
<LinearLayout
android:id="@+id/optionspicker"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="horizontal">
<com.bigkoo.pickerview.lib.WheelView
android:id="@+id/options1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<com.bigkoo.pickerview.lib.WheelView
android:id="@+id/options2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<com.bigkoo.pickerview.lib.WheelView
android:id="@+id/options3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#24ad9d"/>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -12,19 +12,19 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/singleline"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline_white_gray"
android:orientation="horizontal">
<ImageView
<ImageButton
android:id="@+id/iv_back"
android:layout_width="@dimen/title_height"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:gravity="center"
android:background="@color/transparent"
android:onClick="@{onClickListener}"
android:padding="16dp"
android:src="@mipmap/back_white"/>
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"/>
<TextView
android:id="@+id/tv_title"
......@@ -32,9 +32,8 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="标题"
android:textColor="@color/white"
android:textSize="@dimen/text_secondary_title"
android:textStyle="bold"/>
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/>
</RelativeLayout>
......
<?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"
android:orientation="horizontal">
<ImageButton
android:id="@+id/iv_back"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="@color/transparent"
android:gravity="center"
android:onClick="@{onClickListener}"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_white"/>
<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/white"
android:textSize="@dimen/text_secondary_title"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
......@@ -11,257 +11,312 @@
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/gray_huanggai">
<Button
android:id="@+id/btn_clear"
<TextView
android:id="@+id/tv_clear"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="1dp"
android:layout_marginEnd="1dp"
android:background="@color/white"
android:layout_marginBottom="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_line_width"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_clear"
app:layout_constraintBottom_toTopOf="@id/btn_1"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/btn_div"
app:layout_constraintRight_toLeftOf="@id/tv_div"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="1" />
<Button
android:id="@+id/btn_div"
<TextView
android:id="@+id/tv_div"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="1dp"
android:background="@color/white"
android:layout_marginEnd="@dimen/all_line_width"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_div"
app:layout_constraintBottom_toBottomOf="@id/btn_clear"
app:layout_constraintLeft_toRightOf="@id/btn_clear"
app:layout_constraintRight_toLeftOf="@id/btn_mul"
app:layout_constraintTop_toTopOf="@id/btn_clear" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_clear"
app:layout_constraintLeft_toRightOf="@id/tv_clear"
app:layout_constraintRight_toLeftOf="@id/tv_mul"
app:layout_constraintTop_toTopOf="@id/tv_clear" />
<Button
android:id="@+id/btn_mul"
<TextView
android:id="@+id/tv_mul"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="1dp"
android:background="@color/white"
android:layout_marginEnd="@dimen/all_line_width"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_mul"
app:layout_constraintBottom_toBottomOf="@id/btn_clear"
app:layout_constraintLeft_toRightOf="@id/btn_div"
app:layout_constraintRight_toLeftOf="@id/btn_del"
app:layout_constraintTop_toTopOf="@id/btn_clear" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_clear"
app:layout_constraintLeft_toRightOf="@id/tv_div"
app:layout_constraintRight_toLeftOf="@id/tv_del"
app:layout_constraintTop_toTopOf="@id/tv_clear" />
<Button
android:id="@+id/btn_del"
<TextView
android:id="@+id/tv_del"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_del"
app:layout_constraintBottom_toBottomOf="@id/btn_clear"
app:layout_constraintLeft_toRightOf="@id/btn_mul"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_clear"
app:layout_constraintLeft_toRightOf="@id/tv_mul"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/btn_clear" />
app:layout_constraintTop_toTopOf="@id/tv_clear" />
<Button
android:id="@+id/btn_1"
<TextView
android:id="@+id/tv_1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="1dp"
android:background="@color/white"
android:layout_marginBottom="@dimen/all_line_width"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_1"
app:layout_constraintBottom_toTopOf="@id/btn_4"
app:layout_constraintLeft_toLeftOf="@id/btn_clear"
app:layout_constraintRight_toRightOf="@id/btn_clear"
app:layout_constraintTop_toBottomOf="@id/btn_clear"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="@id/tv_clear"
app:layout_constraintRight_toRightOf="@id/tv_clear"
app:layout_constraintTop_toBottomOf="@id/tv_clear"
app:layout_constraintVertical_weight="1" />
<Button
android:id="@+id/btn_2"
<TextView
android:id="@+id/tv_2"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_2"
app:layout_constraintBottom_toBottomOf="@id/btn_1"
app:layout_constraintLeft_toLeftOf="@id/btn_div"
app:layout_constraintRight_toRightOf="@id/btn_div"
app:layout_constraintTop_toTopOf="@id/btn_1" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_1"
app:layout_constraintLeft_toLeftOf="@id/tv_div"
app:layout_constraintRight_toRightOf="@id/tv_div"
app:layout_constraintTop_toTopOf="@id/tv_1" />
<Button
android:id="@+id/btn_3"
<TextView
android:id="@+id/tv_3"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_3"
app:layout_constraintBottom_toBottomOf="@id/btn_1"
app:layout_constraintLeft_toLeftOf="@id/btn_mul"
app:layout_constraintRight_toRightOf="@id/btn_mul"
app:layout_constraintTop_toTopOf="@id/btn_1" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_1"
app:layout_constraintLeft_toLeftOf="@id/tv_mul"
app:layout_constraintRight_toRightOf="@id/tv_mul"
app:layout_constraintTop_toTopOf="@id/tv_1" />
<Button
android:id="@+id/btn_sub"
<TextView
android:id="@+id/tv_sub"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_sub"
app:layout_constraintBottom_toBottomOf="@id/btn_1"
app:layout_constraintLeft_toLeftOf="@id/btn_del"
app:layout_constraintRight_toRightOf="@id/btn_del"
app:layout_constraintTop_toTopOf="@id/btn_1" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_1"
app:layout_constraintLeft_toLeftOf="@id/tv_del"
app:layout_constraintRight_toRightOf="@id/tv_del"
app:layout_constraintTop_toTopOf="@id/tv_1" />
<Button
android:id="@+id/btn_4"
<TextView
android:id="@+id/tv_4"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="1dp"
android:background="@color/white"
android:layout_marginBottom="@dimen/all_line_width"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_4"
app:layout_constraintBottom_toTopOf="@id/btn_7"
app:layout_constraintLeft_toLeftOf="@id/btn_clear"
app:layout_constraintRight_toRightOf="@id/btn_clear"
app:layout_constraintTop_toBottomOf="@id/btn_1"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_7"
app:layout_constraintLeft_toLeftOf="@id/tv_clear"
app:layout_constraintRight_toRightOf="@id/tv_clear"
app:layout_constraintTop_toBottomOf="@id/tv_1"
app:layout_constraintVertical_weight="1" />
<Button
android:id="@+id/btn_5"
<TextView
android:id="@+id/tv_5"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_5"
app:layout_constraintBottom_toBottomOf="@id/btn_4"
app:layout_constraintLeft_toLeftOf="@id/btn_div"
app:layout_constraintRight_toRightOf="@id/btn_div"
app:layout_constraintTop_toTopOf="@id/btn_4" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="@id/tv_div"
app:layout_constraintRight_toRightOf="@id/tv_div"
app:layout_constraintTop_toTopOf="@id/tv_4" />
<Button
android:id="@+id/btn_6"
<TextView
android:id="@+id/tv_6"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_6"
app:layout_constraintBottom_toBottomOf="@id/btn_4"
app:layout_constraintLeft_toLeftOf="@id/btn_mul"
app:layout_constraintRight_toRightOf="@id/btn_mul"
app:layout_constraintTop_toTopOf="@id/btn_4" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="@id/tv_mul"
app:layout_constraintRight_toRightOf="@id/tv_mul"
app:layout_constraintTop_toTopOf="@id/tv_4" />
<Button
android:id="@+id/btn_add"
<TextView
android:id="@+id/tv_add"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_add"
app:layout_constraintBottom_toBottomOf="@id/btn_4"
app:layout_constraintLeft_toLeftOf="@id/btn_del"
app:layout_constraintRight_toRightOf="@id/btn_del"
app:layout_constraintTop_toTopOf="@id/btn_4" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="@id/tv_del"
app:layout_constraintRight_toRightOf="@id/tv_del"
app:layout_constraintTop_toTopOf="@id/tv_4" />
<Button
android:id="@+id/btn_7"
<TextView
android:id="@+id/tv_7"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="1dp"
android:background="@color/white"
android:layout_marginBottom="@dimen/all_line_width"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_7"
app:layout_constraintBottom_toTopOf="@id/btn_0"
app:layout_constraintLeft_toLeftOf="@id/btn_clear"
app:layout_constraintRight_toRightOf="@id/btn_clear"
app:layout_constraintTop_toBottomOf="@id/btn_4"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_0"
app:layout_constraintLeft_toLeftOf="@id/tv_clear"
app:layout_constraintRight_toRightOf="@id/tv_clear"
app:layout_constraintTop_toBottomOf="@id/tv_4"
app:layout_constraintVertical_weight="1" />
<Button
android:id="@+id/btn_8"
<TextView
android:id="@+id/tv_8"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_8"
app:layout_constraintBottom_toBottomOf="@id/btn_7"
app:layout_constraintLeft_toLeftOf="@id/btn_div"
app:layout_constraintRight_toRightOf="@id/btn_div"
app:layout_constraintTop_toTopOf="@id/btn_7" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_7"
app:layout_constraintLeft_toLeftOf="@id/tv_div"
app:layout_constraintRight_toRightOf="@id/tv_div"
app:layout_constraintTop_toTopOf="@id/tv_7" />
<Button
android:id="@+id/btn_9"
<TextView
android:id="@+id/tv_9"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_9"
app:layout_constraintBottom_toBottomOf="@id/btn_7"
app:layout_constraintLeft_toLeftOf="@id/btn_mul"
app:layout_constraintRight_toRightOf="@id/btn_mul"
app:layout_constraintTop_toTopOf="@id/btn_7" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_7"
app:layout_constraintLeft_toLeftOf="@id/tv_mul"
app:layout_constraintRight_toRightOf="@id/tv_mul"
app:layout_constraintTop_toTopOf="@id/tv_7" />
<Button
android:id="@+id/btn_settle"
<TextView
android:id="@+id/tv_settle"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/deep_red"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_settle"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="@id/btn_0"
app:layout_constraintLeft_toLeftOf="@id/btn_del"
app:layout_constraintRight_toRightOf="@id/btn_del"
app:layout_constraintTop_toTopOf="@id/btn_7" />
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_0"
app:layout_constraintLeft_toLeftOf="@id/tv_del"
app:layout_constraintRight_toRightOf="@id/tv_del"
app:layout_constraintTop_toTopOf="@id/tv_7" />
<Button
android:id="@+id/btn_0"
<TextView
android:id="@+id/tv_0"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="1dp"
android:background="@color/white"
android:layout_marginBottom="@dimen/all_line_width"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_0"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/btn_clear"
app:layout_constraintRight_toRightOf="@id/btn_div"
app:layout_constraintTop_toBottomOf="@id/btn_7"
app:layout_constraintLeft_toLeftOf="@id/tv_clear"
app:layout_constraintRight_toRightOf="@id/tv_div"
app:layout_constraintTop_toBottomOf="@id/tv_7"
app:layout_constraintVertical_weight="2" />
<Button
android:id="@+id/btn_point"
<TextView
android:id="@+id/tv_point"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_point"
app:layout_constraintBottom_toBottomOf="@id/btn_0"
app:layout_constraintLeft_toLeftOf="@id/btn_mul"
app:layout_constraintRight_toRightOf="@id/btn_mul"
app:layout_constraintTop_toTopOf="@id/btn_0" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_0"
app:layout_constraintLeft_toLeftOf="@id/tv_mul"
app:layout_constraintRight_toRightOf="@id/tv_mul"
app:layout_constraintTop_toTopOf="@id/tv_0" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/all_margin"
android:drawableTop="@mipmap/icon_things_null"
android:gravity="center"
android:lineSpacingExtra="@dimen/all_padding"
android:text="@string/empty_other_select"
android:textColor="@color/white_half"
android:textSize="@dimen/all_text_size_big" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="onClick"
type="android.view.View.OnClickListener" />
</data>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_huanggai">
<TextView
android:id="@+id/tv_1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_line_width"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_1"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/tv_2"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="1" />
<TextView
android:id="@+id/tv_2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="@dimen/all_line_width"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_2"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_1"
app:layout_constraintLeft_toRightOf="@id/tv_1"
app:layout_constraintRight_toLeftOf="@id/tv_3"
app:layout_constraintTop_toTopOf="@id/tv_1" />
<TextView
android:id="@+id/tv_3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="@dimen/all_line_width"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_3"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_1"
app:layout_constraintLeft_toRightOf="@id/tv_2"
app:layout_constraintRight_toLeftOf="@id/tv_del"
app:layout_constraintTop_toTopOf="@id/tv_1" />
<TextView
android:id="@+id/tv_del"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_del"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_1"
app:layout_constraintLeft_toRightOf="@id/tv_3"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_1" />
<TextView
android:id="@+id/tv_4"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/all_line_width"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_4"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_7"
app:layout_constraintLeft_toLeftOf="@id/tv_1"
app:layout_constraintRight_toRightOf="@id/tv_1"
app:layout_constraintTop_toBottomOf="@id/tv_1"
app:layout_constraintVertical_weight="1" />
<TextView
android:id="@+id/tv_5"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_5"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="@id/tv_2"
app:layout_constraintRight_toRightOf="@id/tv_2"
app:layout_constraintTop_toTopOf="@id/tv_4" />
<TextView
android:id="@+id/tv_6"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_6"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="@id/tv_3"
app:layout_constraintRight_toRightOf="@id/tv_3"
app:layout_constraintTop_toTopOf="@id/tv_4" />
<TextView
android:id="@+id/tv_clear"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_clear"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_4"
app:layout_constraintLeft_toLeftOf="@id/tv_del"
app:layout_constraintRight_toRightOf="@id/tv_del"
app:layout_constraintTop_toTopOf="@id/tv_4" />
<TextView
android:id="@+id/tv_7"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/all_line_width"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_7"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toTopOf="@id/tv_0"
app:layout_constraintLeft_toLeftOf="@id/tv_1"
app:layout_constraintRight_toRightOf="@id/tv_1"
app:layout_constraintTop_toBottomOf="@id/tv_4"
app:layout_constraintVertical_weight="1" />
<TextView
android:id="@+id/tv_8"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_8"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_7"
app:layout_constraintLeft_toLeftOf="@id/tv_2"
app:layout_constraintRight_toRightOf="@id/tv_2"
app:layout_constraintTop_toTopOf="@id/tv_7" />
<TextView
android:id="@+id/tv_9"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_9"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_7"
app:layout_constraintLeft_toLeftOf="@id/tv_3"
app:layout_constraintRight_toRightOf="@id/tv_3"
app:layout_constraintTop_toTopOf="@id/tv_7" />
<TextView
android:id="@+id/tv_settle"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/deep_red"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_settle"
android:textColor="@color/white"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_0"
app:layout_constraintLeft_toLeftOf="@id/tv_del"
app:layout_constraintRight_toRightOf="@id/tv_del"
app:layout_constraintTop_toTopOf="@id/tv_7" />
<TextView
android:id="@+id/tv_0"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/all_line_width"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_0"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tv_1"
app:layout_constraintRight_toRightOf="@id/tv_2"
app:layout_constraintTop_toBottomOf="@id/tv_7"
app:layout_constraintVertical_weight="2" />
<TextView
android:id="@+id/tv_point"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:onClickListener="@{onClick}"
android:text="@string/inputer_point"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
app:layout_constraintBottom_toBottomOf="@id/tv_0"
app:layout_constraintLeft_toLeftOf="@id/tv_3"
app:layout_constraintRight_toRightOf="@id/tv_3"
app:layout_constraintTop_toTopOf="@id/tv_0" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -21,6 +21,7 @@
<!-- 全透明 -->
<color name="all_transparent">#00000000</color>
<color name="black_half">#50000000</color>
<color name="white_transparent15">#0faaaaaa</color>
<color name="black">#101010</color>
<color name="black1">#273542</color>
......@@ -119,13 +120,37 @@
<color name="navy_blue">#1f7bdb</color>
<color name="light_grey">#b9b9b9</color>
<!--新颜色-->
<color name="red_guanyu">#b4282d</color>
<color name="red_xishi">#e57b7b</color>
<color name="red_diaochan">#ff8964</color>
<color name="gray_zhouyu">#f1f3f7</color>
<color name="gray_huanggai">#afb9c3</color>
<color name="gray_kongming">#e6e6e6</color>
<color name="white_caocao">#ffffff</color>
<color name="black_zhangfei">#233142</color>
<color name="black_baozheng">#121212</color>
<color name="black_likui">#646464</color>
<color name="blue_yuefei">#50c1ff</color>
<color name="blue_mawu">#3f75a2</color>
<color name="green_chengyaojin">#088b38</color>
<color name="green_kongrun">#35ba6a</color>
<color name="orange_shixiu">#e88108</color>
<color name="cyan_sunquan">#b6cadb</color>
<color name="cyan_liubei">#47dade</color>
<color name="yellow_huangxin">#ffc960</color>
<color name="golden_yuji">#f2e7d3</color>
<color name="purple_yanqing">#6590e6</color>
</resources>
......@@ -10,6 +10,7 @@
<dimen name="all_sub_title_size">20sp</dimen>
<dimen name="all_text_size">16sp</dimen>
<dimen name="all_text_size_small">12sp</dimen>
<dimen name="all_caption_size">12sp</dimen>
<dimen name="all_title_size">26sp</dimen>
<dimen name="all_padding">10dp</dimen>
<dimen name="all_text_size_big">22sp</dimen>
......@@ -25,6 +26,7 @@
<dimen name="card_radius_medium">14dp</dimen>
<!--PADDING-->
<dimen name="padding_big">24dp</dimen>
<dimen name="padding_medium">16dp</dimen>
<!--EditText 边框粗细-->
<dimen name="edit_border">0.5dp</dimen>
<!--一级标题-->
......@@ -130,6 +132,7 @@
<dimen name="vicescreen_shoppingcart_pandding">10dp</dimen>
<dimen name="view_line_L1">1dp</dimen>
<dimen name="view_line_L2">2dp</dimen>
<dimen name="view_line_L050">0.5dp</dimen>
<dimen name="view_line_L5">5dp</dimen>
<dimen name="view_line_height">0.5dp</dimen>
......@@ -178,4 +181,12 @@
<dimen name="editor_item_height">60dp</dimen>
<!--结算-->
<dimen name="settle_vip_head">40dp</dimen>
<dimen name="settle_vip_level">16dp</dimen>
<dimen name="settle_btn_radius">24dp</dimen>
<dimen name="settle_pay_item">108dp</dimen>
<dimen name="settle_pay_logo">72dp</dimen>
</resources>
......@@ -155,9 +155,6 @@
<string name="card_num">卡号:</string>
<string name="card_num_hint">请输入储值卡卡号</string>
<!--结算页面 <WHERE>_<DESCRIPTION>-->
<string name="settle_title">结算页面</string>
<string name="settle_amt">应收:</string>
<string name="settle_channel_hint">请选择支付方式</string>
<string name="settle_channel_cash">现金</string>
<string name="settle_channel_cash_not_enough">金额不足,无法支付</string>
......@@ -176,8 +173,6 @@
<string name="settle_channel_tally_arrear_hint">余额:</string>
<string name="settle_pay">支付</string>
<string name="settle_print_receipt">打印小票</string>
<string name="settle_pay_amt">实收:</string>
<string name="settle_pay_change">找零:</string>
<string name="settle_money_unit"></string>
<string name="settle_channel_input_hint">扫描或输入条码数字</string>
<string name="settle_pay_change_text">¥%s</string>
......@@ -469,6 +464,11 @@
<string name="menu_ticket">发券</string>
<string name="menu_statistics">统计</string>
<string name="menu_manager">管理</string>
<string name="menu_announcement">公告通知</string>
<string name="menu_feed">反馈</string>
<string name="menu_update">升级</string>
<string name="menu_help">帮助</string>
<string name="menu_exit">退出</string>
<!--输入器-->
<string name="inputer_1">1</string>
<string name="inputer_2">2</string>
......@@ -489,5 +489,56 @@
<string name="inputer_mul">×</string>
<string name="inputer_div">÷</string>
<!--收款-->
<string name="payment_title">收款</string>
<string name="payment_total">总计:</string>
<!--支付-->
<string name="settle_title">收款</string>
<string name="settle_amt">应收:</string>
<string name="settle_select_vip">请选择会员</string>
<string name="settle_vip_dis_rate_hint">折扣:</string>
<string name="settle_vip_dis_rate"></string>
<string name="settle_btn_expand">收款</string>
<string name="settle_order_amt">应收金额</string>
<string name="settle_pay_amt">实收金额</string>
<string name="settle_pay_change">找零金额</string>
<string name="settle_pay_result">支付结果</string>
<string name="settle_pay_succ">支付成功</string>
<string name="settle_pay_fail">支付失败</string>
<string name="settle_pay_time">交易时间</string>
<string name="settle_pay_type">收款方式</string>
<string name="settle_pay_count">商品总数</string>
<string name="settle_pay_order_amt">合计金额</string>
<string name="settle_retry">重新支付</string>
<string name="settle_complete">完成</string>
<!--帮助POS-->
<string name="help_hint">帮助</string>
<string name="help_phone">400–800–9406</string>
<string name="help_phone_hint">客服专线</string>
<string name="help_web">www.xingdata.com</string>
<string name="help_web_hint">浙星官网</string>
<string name="help_code_hint">版本号</string>
<string name="help_word_hint">指导手册</string>
<!--反馈POS-->
<string name="feedBack_hint">意见反馈</string>
<string name="feedBack_edit_hint">您的反馈是我们前进的方向,请写下您的反馈…</string>
<string name="feedBack_contactWay">手机号/邮箱(方便我们联系您)</string>
<string name="feedBack_submit">提交反馈</string>
<!--交班POS-->
<string name="handover_hint">交班</string>
<string name="handover_finalAmt">实收金额:</string>
<string name="handover_date">交班时间:</string>
<string name="handover_oper">收银员:</string>
<string name="handover_orderNum">总订单:</string>
<string name="handover_cash">现金收款:</string>
<string name="handover_wechat">微信收款:</string>
<string name="handover_alipay">支付宝收款:</string>
<string name="handover_bank">银行卡收款:</string>
<string name="handover_vip">储值卡收款:</string>
<!--<string name="handover_vip">储值卡收款</string>-->
</resources>
......@@ -17,9 +17,9 @@
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="vicescreen_textview_stlye">
......@@ -240,19 +240,30 @@
</style>
<style name="button_positive" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_red_button_background</item>
<item name="android:background">@drawable/red_border_allradius</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_noradius" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_red_button_background_noradius</item>
<item name="android:background">@drawable/selector_gradient_red_button_background_noradius
</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_allradius" parent="android:ButtonBar">
<item name="android:background">@drawable/red_border_allradius</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_bg_gray" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_gray_button_background</item>
<item name="android:textColor">@color/blue</item>
......@@ -260,13 +271,17 @@
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="button_positive_bg_gray_noradius" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_gray_button_background_noradius</item>
<item name="android:background">
@drawable/selector_gradient_gray_button_background_noradius
</item>
<item name="android:textColor">@color/blue</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
</style>
<style name="xuline_margin">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
......@@ -299,6 +314,12 @@
<item name="android:textColorHint">@color/hint</item>
</style>
<style name="Base.Widget.Design.TabLayout" parent="android:Widget">
<item name="tabBackground">@color/white_caocao</item>
<item name="tabIndicatorColor">#FFF</item>
<item name="tabIndicatorHeight">0dp</item>
</style>
<style name="button" parent="view_base">
<item name=" android:background">@drawable/red_border</item>
<item name=" android:saveEnabled">false</item>
......@@ -316,4 +337,24 @@
<item name=" android:textColor">@color/gary</item>
<item name="android:gravity">center|left</item>
</style>
<style name="dialog_edit">
<item name="android:padding">@dimen/dialog_padding</item>
<item name="android:saveEnabled">false</item>
<item name="android:background">@drawable/selector_white_background_stroke</item>
<item name="android:layout_width">0dp</item>
<item name="android:textSize">@dimen/small_text_size</item>
</style>
<style name="textView_body">
<item name="android:padding">@dimen/all_padding</item>
<item name="android:textSize">@dimen/all_text_size</item>
<item name="android:textColor">@color/black_baozheng</item>
</style>
<style name="textView_body_small">
<item name="android:padding">@dimen/dp_4</item>
<item name="android:textSize">@dimen/all_text_size_small</item>
<item name="android:textColor">@color/black_baozheng</item>
</style>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment