Commit c0fd2146 authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/com/xingdata/zzdpos/ui/login/LoginActivity.java
parents e7875d70 14e44b61
......@@ -19,7 +19,7 @@
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/main_title"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
<activity
android:name=".ui.splash.SplashActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......@@ -30,6 +30,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.login.LoginActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......@@ -69,6 +70,10 @@
<activity android:name=".ui.help.HelpActivity" />
<activity android:name=".ui.feedback.FeedBackActivity" />
<activity android:name=".ui.statistics.StatisticsActivity"></activity>
<activity
android:name=".ui.vip.VipActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
</application>
</manifest>
\ No newline at end of file
......@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.model;
import com.alibaba.fastjson.annotation.JSONField;
import com.bigkoo.pickerview.model.IPickerViewData;
import com.xingdata.zzdpos.base.BaseBean;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment;
/**
* Created by Administrator on 2017/11/27.
......@@ -132,15 +133,15 @@ public class Category implements BaseBean, IPickerViewData {
@Override
public String getPickerViewText() {
switch (nowCategory) {
// case IntegralGetDialog.ONE_CATEGORY: {
// return getSpuClaName() + "";
// }
// case IntegralGetDialog.TWO_CATEGORY: {
// return getSpuGrpName() + "";
// }
// case IntegralGetDialog.THREE_CATEGORY: {
// return getSpuCateName() + "";
// }
case IntegralGetFragment.ONE_CATEGORY: {
return getSpuClaName() + "";
}
case IntegralGetFragment.TWO_CATEGORY: {
return getSpuGrpName() + "";
}
case IntegralGetFragment.THREE_CATEGORY: {
return getSpuCateName() + "";
}
}
return "";
......
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;
......@@ -14,6 +16,7 @@ import com.xingdata.zzdpos.base.BaseFragment;
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.ui.statistics.StatisticsActivity;
......@@ -52,7 +55,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
public void onItemClick(BaseQuickAdapter adapter, View view, int 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://充值
......
......@@ -66,6 +66,7 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
@Override
public void addSucc(LoadingDialog loadingDialog) {
pop();
mPresenter.query(1, mPresenter.integralIndexFragment.NORMAL_TYPE, loadingDialog);
}
......@@ -82,6 +83,7 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
@Override
public void exchangeUpdateSucc(Ubound ubound, LoadingDialog loadingDialog) {
pop();
mPresenter.exchangeQuery(loadingDialog);
}
......
......@@ -8,6 +8,7 @@ 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.IntegralExchangeFragment;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralIndexFragment;
......@@ -23,6 +24,7 @@ public class IntegralPresenter extends IntegralContract.Presenter {
private int number = 1;
public IntegralIndexFragment integralIndexFragment = new IntegralIndexFragment();
public IntegralGetFragment integralGetFragment = new IntegralGetFragment();
public IntegralExchangeFragment integralExchangeFragment = new IntegralExchangeFragment();
@Override
public void onAttached() {
......
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.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.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 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.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;
import com.xingdata.zzdpos.util.OnClickListener;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public class IntegralExchangeFragment extends BaseFragment<IntegralPresenter,
DialogIntegralExchangeSettingBinding> {
Ubound ubound;
@Override
public int getLayoutId() {
return R.layout.dialog_integral_exchange_setting;
}
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("积分规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
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;
case R.id.btn_ok: {
if (isNullAndSet()) {
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity());
ubound.setUpdateTime(null);
ubound.setCreateTime(null);
mPresenter.exchangeUpdate(ubound, loadingDialog);
} else {
ToastUtils.showLong("输入数据不能null");
}
}
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;
}
/**
* 判断用户输入数据是否为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();
// }
}
......@@ -55,7 +55,7 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
//进度对话框
LoadingDialog loadingDialog;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private int nowShopTypeId = 1;
private int nowShopTypeId = 0;
@Override
public int getLayoutId() {
......@@ -64,6 +64,13 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("积分规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
mViewBinding.setOnClickListener(
new OnClickListener() {
@Override
......@@ -118,7 +125,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
if (nowShopTypeId >= 1) {
mPresenter.initData(getCategory(v.getId()), TWO_CATEGORY);
mViewBinding.tvCategorySelectThree.setText("");
nowShopTypeId = 2;
} else {
ToastUtils.showLong("请先选择第一类品类");
}
......@@ -127,7 +133,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
case R.id.tv_category_select_three: {
if (nowShopTypeId >= 2) {
mPresenter.initData(getCategory(v.getId()), THREE_CATEGORY);
nowShopTypeId = 3;
} else {
ToastUtils.showLong("请先选择第一二类品类");
}
......@@ -349,18 +354,21 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
//返回的分别是三个级别的选中位置
switch (nowList) {
case ONE_CATEGORY: {
nowShopTypeId=1;
mViewBinding.tvCategorySelectOne.setText(listCategory.get(options1)
.getSpuClaName());
spuCateIdTwo = listCategory.get(options1).getSpuCateId();
}
break;
case TWO_CATEGORY: {
nowShopTypeId=2;
mViewBinding.tvCategorySelectTwo.setText(listCategory.get(options1)
.getSpuGrpName());
spuCateIdThree = listCategory.get(options1).getSpuCateId();
}
break;
case THREE_CATEGORY: {
nowShopTypeId=3;
mViewBinding.tvCategorySelectThree.setText(listCategory.get(options1)
.getSpuCateName());
......
......@@ -20,7 +20,6 @@ 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;
......@@ -80,6 +79,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
mViewBinding.setOnClickListener(v -> {
switch (v.getId()) {
case R.id.btn_add: {
mPresenter.integralGetFragment = new IntegralGetFragment();
mPresenter.integralGetFragment.setNowType(1);
start(mPresenter.integralGetFragment);
// integralGetDialog = new IntegralGetDialog();
......@@ -197,6 +197,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
if ((System.currentTimeMillis() - mExitTime) > 1000) {
// integralGetDialog = new IntegralGetDialog();
loadingDialog.show((BaseActivity) getActivity());
mPresenter.integralGetFragment = new IntegralGetFragment();
mPresenter.integralGetFragment.setData(gbound, loadingDialog);
start(mPresenter.integralGetFragment);
// integralGetDialog.show((BaseActivity) getActivity());
......@@ -213,9 +214,12 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
*/
private void exchangeClickProduct(Ubound gbound) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
IntegralExchangeDialog integralExchangeDialog = new IntegralExchangeDialog();
integralExchangeDialog.setData(gbound);
integralExchangeDialog.show((BaseActivity) getActivity());
mPresenter.integralExchangeFragment = new IntegralExchangeFragment();
mPresenter.integralExchangeFragment.setData(gbound);
start(mPresenter.integralExchangeFragment);
// IntegralExchangeDialog integralExchangeDialog = new IntegralExchangeDialog();
// integralExchangeDialog.setData(gbound);
// integralExchangeDialog.show((BaseActivity) getActivity());
mExitTime = System.currentTimeMillis();
} else {
ToastUtils.showLong("您操作太快了");
......
package com.xingdata.zzdpos.ui.vip;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityVipBinding;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.vip.fragment.VipInfoFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipLevleFragment;
public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding> implements VipContract.View {
private VipInfoFragment vipInfoFragment = new VipInfoFragment();
private VipLevleFragment vipLevleFragment = new VipLevleFragment();
@Override
public int getLayoutId() {
return R.layout.activity_vip;
}
@Override
public void initView() {
loadRootFragment(R.id.vip_level_frame, vipLevleFragment, false, false);
}
@Override
public Pager<Vip> getVipLevelSus() {
return null;
}
@Override
public Pager<Level> getVipListSus() {
return null;
}
@Override
public String getVipNumberSus() {
return null;
}
}
package com.xingdata.zzdpos.ui.vip;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Vip;
interface VipContract {
interface View extends BaseView {
Pager<Vip> getVipLevelSus();
Pager<Level> getVipListSus();
String getVipNumberSus();
}
abstract class Presenter extends BasePresenter<VipContract.View> {
public abstract void getVipList(int levelId, int pageNumber);
public abstract void getVipLevel();
public abstract void getVipNumber();
}
}
\ No newline at end of file
package com.xingdata.zzdpos.ui.vip;
public class VipPresenter extends VipContract.Presenter {
@Override
public void onAttached() {
}
@Override
public void getVipList(int levelId, int pageNumber) {
}
@Override
public void getVipLevel() {
}
@Override
public void getVipNumber() {
}
}
package com.xingdata.zzdpos.ui.vip.fragment;
/**
* Created by JM_DEV on 2017/12/21.
*/
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentViplevelTitleBinding;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
/**
* 会员信息界面
*/
public class VipInfoFragment extends BaseFragment<VipPresenter, FragmentViplevelTitleBinding> {
@Override
public int getLayoutId() {
return R.layout.fragment_viplevel_title;
}
@Override
public void initView() {
// RadioButton radioButton = new RadioButton(getActivity());
// radioButton.setText("AAAAAAAAAAAAAAA");
// mViewBinding.vipLevelRadioGroup.addView(radioButton);
}
}
package com.xingdata.zzdpos.ui.vip.fragment;
/**
* Created by JM_DEV on 2017/12/21.
*/
import android.annotation.SuppressLint;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.Gravity;
import android.widget.GridView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentViplevelTitleBinding;
import com.xingdata.zzdpos.ui.vip.VipActivity;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
/**
* 会员等级列表
*/
public class VipLevleFragment extends BaseFragment<VipPresenter, FragmentViplevelTitleBinding> {
@Override
public int getLayoutId() {
return R.layout.fragment_viplevel_title;
}
@Override
public void initView() {
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
layoutParams.height = 120;
layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
for (int i = 0; i < 5; i++) {
mViewBinding.vipLevelRadioGroup.addView(addRadioButton(layoutParams));
}
setRadioButtonChecked(true, ((RadioButton) mViewBinding.vipLevelRadioGroup.getChildAt(0)));
mViewBinding.vipLevelRadioGroup.setOnCheckedChangeListener((radioGroup, n) -> {
for (int i = 0; i < mViewBinding.vipLevelRadioGroup.getChildCount(); i++) {
//动态设置按钮颜色
setRadioButtonChecked(i == n - 1, ((RadioButton) radioGroup.getChildAt(i)));
}
});
}
/**
* 设置按钮选中
*
* @param b
* @param button
*/
private void setRadioButtonChecked(boolean b, RadioButton button) {
button.getPaint().setFakeBoldText(b);//字体加粗
if (b) {
button.setTextSize(17);
} else {
button.setTextSize(15);
}
}
@SuppressLint("ResourceAsColor")
private RadioButton addRadioButton(LinearLayout.LayoutParams layoutParams) {
RadioButton radioButton = new RadioButton(getActivity());
radioButton.setTextSize(15);
radioButton.setText("金牌会员");
setRadioButtonChecked(false, radioButton);
radioButton.setGravity(Gravity.CENTER);
radioButton.setButtonDrawable(null);
radioButton.getPaint().setFakeBoldText(true);
radioButton.setBackgroundResource(R.drawable.checkbox_viplevel_bg);
radioButton.setTextColor(R.color.black_baozheng);
radioButton.setLayoutParams(layoutParams);
return radioButton;
}
}
package com.xingdata.zzdpos.ui.vip.fragment;
/**
* Created by JM_DEV on 2017/12/21.
*/
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentViplevelTitleBinding;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
/**
* 会员列表
*/
public class VipListFragment extends BaseFragment<VipPresenter, FragmentViplevelTitleBinding> {
@Override
public int getLayoutId() {
return R.layout.fragment_viplevel_title;
}
@Override
public void initView() {
// RadioButton radioButton = new RadioButton(getActivity());
// radioButton.setText("AAAAAAAAAAAAAAA");
// mViewBinding.vipLevelRadioGroup.addView(radioButton);
}
}
package com.xingdata.zzdpos.ui.vip.fragment;
/**
* Created by JM_DEV on 2017/12/21.
*/
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentViplevelTitleBinding;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
/**
* 会员消费充值记录
*/
public class VipRecordFragment extends BaseFragment<VipPresenter, FragmentViplevelTitleBinding> {
@Override
public int getLayoutId() {
return R.layout.fragment_viplevel_title;
}
@Override
public void initView() {
// RadioButton radioButton = new RadioButton(getActivity());
// radioButton.setText("AAAAAAAAAAAAAAA");
// mViewBinding.vipLevelRadioGroup.addView(radioButton);
}
}
......@@ -55,7 +55,7 @@ public final class SystemUtil {
}
}
// return deviceSN;
return "548496";
return "92209325";
}
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/vip_level_check_bg" android:state_checked="true" />
<item android:drawable="@mipmap/vip_level_bg" android:state_checked="false" />
</selector>
\ 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:background="@color/bg"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<include
layout="@layout/title_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageView
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@mipmap/swipe_card_bg" />
<ImageView
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@mipmap/scan_bg" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line1" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="@dimen/view_line_L5"
android:background="@color/line1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="本店会员" />
<TextView
style="@style/default_blacktext_smallstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="今日新增" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="@style/default_blacktext_bigstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="150"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
style="@style/default_blacktext_bigstyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="10"
android:textSize="22sp"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="@dimen/view_line_L5"
android:background="@color/line1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/all_margin_left"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/vip_level_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"></FrameLayout>
<FrameLayout
android:id="@+id/vip_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"></FrameLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -9,226 +9,264 @@
</data>
<LinearLayout
<RelativeLayout
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>
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<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:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/gray_zhouyu"
android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding"
android:text="基本信息"
android:textColor="@color/black_baozheng"
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"
>
<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:orientation="horizontal"
android:padding="@dimen/all_padding">
android:background="@color/white"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<TextView
android:id="@+id/tv_status"
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:paddingLeft="@dimen/all_padding"
android:text="启用状态:"
android:textColor="@color/black_baozheng"
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
<RadioGroup
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"/>
android:layout_weight="5"
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>
<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"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<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:id="@+id/ll_all"
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">
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
>
<TextView
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
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"/>
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<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_baozheng"
android:textSize="@dimen/et_textsize"/>
<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="3"
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="2"
android:text=" 个积分等于1元"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<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"/>
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/gray_zhouyu"
android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding"
android:text="兑换条件"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_integral_exchange_count"
style="@style/dialog_edit"
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
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:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="left"
android:paddingLeft="@dimen/all_padding"
android:text="订单实收满 "
android:textColor="@color/black_baozheng"
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="4"
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="1"
android:text="元"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="个积分"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="left"
android:paddingLeft="@dimen/all_padding"
android:text="可以使用 "
android:textColor="@color/black_baozheng"
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="4"
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="1"
android:text="个积分"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"></View>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/btn_ok"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="@dimen/all_margin"
android:background="@color/red_guanyu"
android:onClick="@{OnClickListener}"
android:text="确定"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</RelativeLayout>
</layout>
\ No newline at end of file
......@@ -24,562 +24,642 @@
type="String"/>
</data>
<LinearLayout
<RelativeLayout
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>
android:layout_height="match_parent">
<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>
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">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<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:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/gray_zhouyu"
android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding"
android:text="基本信息"
android:textColor="@color/black_baozheng"
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">
android:background="@color/white"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding"
>
<TextView
android:id="@+id/tv_rules_name"
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"/>
android:paddingLeft="@dimen/all_padding"
android:text="规则名称:"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/et_integral_role_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="元一个积分"
android:textColor="@color/black"
android:focusable="true"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<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">
android:background="@color/white"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding"
>
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="有效期限:"
android:paddingLeft="@dimen/all_padding"
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"/>
android:textSize="@dimen/et_textsize"/>
<TextView
<RadioGroup
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="个月"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
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>
</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">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<TextView
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/gray_zhouyu"
android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding"
android:text="规则设置"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
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"/>
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<TextView
android:id="@+id/tv_category_select_one"
style="@style/dialog_edit"
android:id="@+id/tv_vip_level"
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:paddingLeft="@dimen/all_padding"
android:text="会员等级:"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_category_select_two"
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_marginLeft="@dimen/all_padding"
android:layout_weight="2"
android:layout_weight="4"
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_three"
style="@style/dialog_edit"
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_marginLeft="@dimen/all_padding"
android:layout_weight="2"
android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end"
android:layout_weight="4"
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:id="@+id/ns_vip_level"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textSize="@dimen/et_textsize"/>
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@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:paddingLeft="@dimen/all_padding"
android:text="获取方式:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
android:textSize="@dimen/et_textsize"/>
<EditText
android:id="@+id/et_integral_category_weight"
style="@style/dialog_edit"
<RadioGroup
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"/>
android:layout_weight="5"
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_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="通用 "
android:textColor="@color/black_baozheng"
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_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="品类定义 "
android:textColor="@color/black_baozheng"
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_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="商品定义 "
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<TextView
android:layout_width="0dp"
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></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"
android:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="元一个积分"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<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_baozheng"
android:textSize="@dimen/et_textsize"/>
<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="3"
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="2"
android:text="元一个积分"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding"
>
<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_baozheng"
android:textSize="@dimen/et_textsize"/>
<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="3"
android:digits="1234567890"
android:ems="2"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="2"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="个月"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<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:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<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_baozheng"
android:textSize="@dimen/et_textsize"/>
<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="1.5"
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="1.5"
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="1.5"
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="4.5"
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="0.5"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<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_baozheng"
android:textSize="@dimen/et_textsize"/>
<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="3"
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="2"
android:text="元一个积分"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gary1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding"
>
<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_baozheng"
android:textSize="@dimen/et_textsize"/>
<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="3"
android:digits="1234567890"
android:ems="2"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="2"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="个月"
android:textColor="@color/black_baozheng"
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:paddingBottom="@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:paddingLeft="@dimen/all_padding"
android:text="有效期限:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<EditText
android:id="@+id/et_integral_category_time_limit"
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:layout_weight="3"
android:digits="1234567890"
android:ems="5"
android:ems="2"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:maxEms="2"
android:maxLength="2"
android:saveEnabled="false"
android:textColor="@color/black"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:layout_weight="2"
android:text="个月"
android:textColor="@color/black"
android:textColor="@color/black_baozheng"
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"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"></View>
<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:layout_alignParentBottom="true"
android:layout_margin="@dimen/all_margin"
android:background="@color/red_guanyu"
android:text="添加"
android:textColor="@color/white"
android:onClick="@{OnClickListener}"
android:text="确定"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</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="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<RadioGroup
android:gravity="center"
android:id="@+id/vip_level_RadioGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</RadioGroup>
</LinearLayout>
</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="wrap_content"
android:background="@color/bg"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="@mipmap/go_back" />
<EditText
style="@style/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:layout_weight="1"
android:background="@color/listview_bg"
android:hint="请输入手机号或会员姓名" />
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -77,6 +77,8 @@
<color name="blue2">#19346b</color>
<color name="blue3">#4faaff</color>
<color name="darkgray">#323232</color>
<color name="line1">#e6e6e6</color>
<color name="grey1">#E2E2E2</color>
......
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