Commit 60dc818c authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

parents ff2c838c 4fe88f23
...@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean; ...@@ -23,6 +23,7 @@ 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.StoreAddressJsonBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean; import com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity; 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.ui.splash.SplashActivity;
import com.xingdata.zzdpos.view.PopupWindowDownList; import com.xingdata.zzdpos.view.PopupWindowDownList;
...@@ -137,7 +138,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin ...@@ -137,7 +138,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
promptDialog.dismiss(); promptDialog.dismiss();
//如果sn已经绑定款台,则直接跳转主页 //如果sn已经绑定款台,则直接跳转主页
if (loginReturnBean.getBindSN()) { if (loginReturnBean.getBindSN()) {
startActivity(new Intent(LoginActivity.this, MainActivity.class)); startActivity(new Intent(LoginActivity.this, IntegralActivity.class));
LoginActivity.this.finish(); LoginActivity.this.finish();
return; return;
} }
......
...@@ -8,6 +8,8 @@ import com.xingdata.zzdpos.model.Category; ...@@ -8,6 +8,8 @@ import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound; import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Ubound; import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; 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 java.util.List;
...@@ -19,7 +21,8 @@ import io.reactivex.functions.Function; ...@@ -19,7 +21,8 @@ import io.reactivex.functions.Function;
public class IntegralPresenter extends IntegralContract.Presenter { public class IntegralPresenter extends IntegralContract.Presenter {
private int number = 1; private int number = 1;
public IntegralIndexFragment integralIndexFragment = new IntegralIndexFragment();
public IntegralGetFragment integralGetFragment = new IntegralGetFragment();
@Override @Override
public void onAttached() { public void onAttached() {
......
...@@ -35,9 +35,9 @@ public class IntegralAdapter extends BaseAdapter<Gbound, ItemIntegralBinding> { ...@@ -35,9 +35,9 @@ public class IntegralAdapter extends BaseAdapter<Gbound, ItemIntegralBinding> {
mViewBinding.tvGet.setText(item.getTruleName()); mViewBinding.tvGet.setText(item.getTruleName());
//开通启用状态 0:正常 1 暂停 默认 0 //开通启用状态 0:正常 1 暂停 默认 0
if (item.getBoundGetStatus() == 0) { if (item.getBoundGetStatus() == 0) {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_open); mViewBinding.tvStatus.setText("启用");
} else { } else {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_close); mViewBinding.tvStatus.setText("未启用");
} }
} }
......
...@@ -2,8 +2,6 @@ package com.xingdata.zzdpos.ui.marketing.integral.adapter; ...@@ -2,8 +2,6 @@ package com.xingdata.zzdpos.ui.marketing.integral.adapter;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter; import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemIntegralBinding; import com.xingdata.zzdpos.databinding.ItemIntegralBinding;
import com.xingdata.zzdpos.model.Ubound; import com.xingdata.zzdpos.model.Ubound;
...@@ -22,6 +20,11 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin ...@@ -22,6 +20,11 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
@Override @Override
protected void convert(ItemIntegralBinding mViewBinding, Ubound item) { protected void convert(ItemIntegralBinding mViewBinding, Ubound item) {
mViewBinding.tvVipTitle.setText("积分面值");
mViewBinding.tvSourceTitle.setText("兑换规则");
mViewBinding.tvVip.setText(item.getBoundValAmt() + "个积分=1元"); mViewBinding.tvVip.setText(item.getBoundValAmt() + "个积分=1元");
//兑换规则 //兑换规则
if (item.getBoundOrderAmt() != null && item.getBoundUseNum() != null) { if (item.getBoundOrderAmt() != null && item.getBoundUseNum() != null) {
...@@ -33,9 +36,9 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin ...@@ -33,9 +36,9 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
if (item.getBoundUseStatus() != null) { if (item.getBoundUseStatus() != null) {
//开通启用状态 0:正常 1 暂停 默认 0 //开通启用状态 0:正常 1 暂停 默认 0
if (item.getBoundUseStatus() == 0) { if (item.getBoundUseStatus() == 0) {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_open); mViewBinding.tvStatus.setText("启用");
} else { } else {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_close); mViewBinding.tvStatus.setText("未启用");
} }
} }
......
...@@ -79,94 +79,7 @@ public class IntegralGetDialog extends BaseDialog<IntegralPresenter, ...@@ -79,94 +79,7 @@ public class IntegralGetDialog extends BaseDialog<IntegralPresenter,
setCancelable(false); setCancelable(false);
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;
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();
}
} }
......
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.settle; package com.xingdata.zzdpos.ui.settle;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
...@@ -9,6 +10,7 @@ import com.xingdata.zzdpos.model.Saleorder; ...@@ -9,6 +10,7 @@ import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Ticket; import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip; import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; 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.CashPayFragment;
import com.xingdata.zzdpos.ui.settle.fragment.PayResultFragment; import com.xingdata.zzdpos.ui.settle.fragment.PayResultFragment;
import com.xingdata.zzdpos.ui.settle.fragment.SettleFragment; import com.xingdata.zzdpos.ui.settle.fragment.SettleFragment;
...@@ -121,7 +123,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -121,7 +123,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
@Override @Override
public void backToMainActivity() { public void backToMainActivity() {
//TODO 返回主页面 ActivityUtils.startActivity(this, MainActivity.class);
} }
} }
...@@ -18,41 +18,41 @@ public class PayAdapter extends BaseAdapter<Pay, ItemPayBinding> { ...@@ -18,41 +18,41 @@ public class PayAdapter extends BaseAdapter<Pay, ItemPayBinding> {
@Override @Override
protected void convert(ItemPayBinding mViewBinding, Pay item) { protected void convert(ItemPayBinding mViewBinding, Pay item) {
// int resLogo, resBackground; int resLogo, resBackground;
// switch (item.getPayType()) { switch (item.getPayType()) {
// case C.PAY_CHANNEL.CASH: case C.PAY_CHANNEL.CASH:
// resLogo = R.mipmap.pay_cash; resLogo = R.mipmap.pay_cash;
// resBackground = R.color.red_diaochan; resBackground = R.color.red_diaochan;
// break; break;
// case C.PAY_CHANNEL.WECHAT: case C.PAY_CHANNEL.WECHAT:
// resLogo = R.mipmap.pay_wechat; resLogo = R.mipmap.pay_wechat;
// resBackground = R.color.green_kongrun; resBackground = R.color.green_kongrun;
// break; break;
// case C.PAY_CHANNEL.ALI: case C.PAY_CHANNEL.ALI:
// resLogo = R.mipmap.pay_alipay; resLogo = R.mipmap.pay_alipay;
// resBackground = R.color.blue_yuefei; resBackground = R.color.blue_yuefei;
// break; break;
// case C.PAY_CHANNEL.BANK: case C.PAY_CHANNEL.BANK:
// resLogo = R.mipmap.pay_card; resLogo = R.mipmap.pay_card;
// resBackground = R.color.cyan_liubei; resBackground = R.color.cyan_liubei;
// break; break;
// case C.PAY_CHANNEL.CARD: case C.PAY_CHANNEL.CARD:
// resLogo = R.mipmap.pay_membershipcard; resLogo = R.mipmap.pay_membershipcard;
// resBackground = R.color.yellow_huangxin; resBackground = R.color.yellow_huangxin;
// break; break;
// case C.PAY_CHANNEL.TALLY: case C.PAY_CHANNEL.TALLY:
// resLogo = R.mipmap.pay_credit; resLogo = R.mipmap.pay_credit;
// resBackground = R.color.purple_yanqing; resBackground = R.color.purple_yanqing;
// break; break;
// default: default:
// resLogo = R.mipmap.pay_cash; resLogo = R.mipmap.pay_cash;
// resBackground = R.color.red_diaochan; resBackground = R.color.red_diaochan;
// break; break;
// } }
// mViewBinding.ivLogo.setImageResource(resLogo); mViewBinding.ivLogo.setImageResource(resLogo);
//
// GenericDraweeHierarchy hierarchy = mViewBinding.ivBackground.getHierarchy(); GenericDraweeHierarchy hierarchy = mViewBinding.ivBackground.getHierarchy();
// hierarchy.setBackgroundImage(mContext.getResources().getDrawable(resBackground)); hierarchy.setBackgroundImage(mContext.getResources().getDrawable(resBackground));
// mViewBinding.ivBackground.setHierarchy(hierarchy); mViewBinding.ivBackground.setHierarchy(hierarchy);
} }
} }
...@@ -59,7 +59,7 @@ public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCa ...@@ -59,7 +59,7 @@ public class CashPayFragment extends BaseFragment<SettlePresenter, FragmentPayCa
* @param payAmt 实付价格 * @param payAmt 实付价格
*/ */
private void clickSettle(Long payAmt) { private void clickSettle(Long payAmt) {
if (payAmt - mOrderAmt > 0) { if (payAmt - mOrderAmt >= 0) {
mPresenter.payInCash(payAmt, payAmt - mOrderAmt); mPresenter.payInCash(payAmt, payAmt - mOrderAmt);
} }
} }
......
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> {
}
}
...@@ -10,197 +10,18 @@ ...@@ -10,197 +10,18 @@
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/white">
tools:context="com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity">
<include <FrameLayout
android:id="@+id/ic_title" android:id="@+id/frg"
layout="@layout/title"/>
<LinearLayout
android:id="@+id/btn_add"
android:layout_width="0dp"
android:layout_height="0dp"
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"
app:layout_constraintVertical_weight="@integer/all_top_weight">
<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_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:orientation="vertical"
android:padding="@dimen/padding_big"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu" app:layout_constraintTop_toTopOf="parent"></FrameLayout>
app:layout_constraintVertical_weight="22">
<LinearLayout
android:id="@+id/ll_get"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<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/white"
android:orientation="vertical"
android:padding="@dimen/cl_padding"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="积分面值"
android:textSize="@dimen/et_textsize"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="兑换规则"
android:textSize="@dimen/et_textsize"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="备注"
android:textSize="@dimen/et_textsize"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="状态 "
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_height"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/vip_line"
android:paddingBottom="@dimen/all_padding"/>
<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> </android.support.constraint.ConstraintLayout>
......
...@@ -571,5 +571,15 @@ ...@@ -571,5 +571,15 @@
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </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> </LinearLayout>
</layout> </layout>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment"> tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline <android.support.constraint.Guideline
android:id="@+id/guideline" android:id="@+id/guideline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
<?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
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment"> tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline <android.support.constraint.Guideline
android:id="@+id/guideline" android:id="@+id/guideline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment"> tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline <android.support.constraint.Guideline
android:id="@+id/guideline" android:id="@+id/guideline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout> <layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cv_item" android:id="@+id/cv_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:layout_marginTop="@dimen/all_padding"
android:paddingTop="@dimen/all_padding" android:background="@color/gray_zhouyu"
android:paddingBottom="@dimen/all_padding"
android:orientation="horizontal"> 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 <TextView
android:id="@+id/tv_vip" android:id="@+id/tv_vip"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3" android:layout_weight="3"
android:text="适用会员" android:gravity="right"
android:text="金牌会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> 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 <TextView
android:id="@+id/tv_source" android:id="@+id/tv_source_title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="5" android:layout_weight="1"
android:text="来源品类" android:text="来源品类"
android:textSize="@dimen/et_textsize"/> android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"
/>
<TextView <TextView
android:id="@+id/tv_get" android:id="@+id/tv_source"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3" android:layout_weight="3"
android:text="获取规则" android:gravity="right"
android:singleLine="true"
android:text="金牌会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<ImageView <LinearLayout
android:id="@+id/tv_status" 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_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:src="@mipmap/integral_open" 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"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </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> </layout>
\ No newline at end of file
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageButton
android:id="@+id/iv_back" android:id="@+id/iv_back"
android:layout_width="@dimen/title_height" android:layout_width="?attr/actionBarSize"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:gravity="center" android:background="@color/transparent"
android:onClick="@{onClickListener}" android:onClick="@{onClickListener}"
android:padding="@dimen/all_margin" android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"/> android:src="@mipmap/back_black"/>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:text="标题" android:text="标题"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title" /> android:textSize="@dimen/text_secondary_title"/>
</RelativeLayout> </RelativeLayout>
......
...@@ -12,18 +12,19 @@ ...@@ -12,18 +12,19 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/title_height" android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline" android:background="@drawable/singleline"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageButton
android:id="@+id/iv_back" android:id="@+id/iv_back"
android:layout_width="@dimen/title_height" android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/transparent"
android:gravity="center" android:gravity="center"
android:onClick="@{onClickListener}" android:onClick="@{onClickListener}"
android:padding="16dp" android:padding="@dimen/all_margin"
android:src="@mipmap/back_white"/> android:src="@mipmap/back_white"/>
<TextView <TextView
......
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