Commit b50ebd43 authored by zhang_z's avatar zhang_z

Merge remote-tracking branch 'origin/master'

parents 89089164 dbc38ad5
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/main_title" android:label="@string/main_title"
android:launchMode="singleTask" android:launchMode="singleTask"
android:windowSoftInputMode="adjustUnspecified|stateHidden"></activity> android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
<activity <activity
android:name=".ui.splash.SplashActivity" android:name=".ui.splash.SplashActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name=".ui.login.LoginActivity" android:name=".ui.login.LoginActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" /> android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity <activity
android:name=".ui.exception.ErrorDialogActivity" android:name=".ui.exception.ErrorDialogActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
...@@ -57,6 +57,11 @@ ...@@ -57,6 +57,11 @@
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_ticket" android:label="@string/title_activity_ticket"
android:theme="@style/AppTheme" /> android:theme="@style/AppTheme" />
<activity
android:name=".ui.sendTicke.SendTicketActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_ticket"
android:theme="@style/AppTheme" />
<activity <activity
android:name=".ui.settle.SettleActivity" android:name=".ui.settle.SettleActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
...@@ -68,7 +73,12 @@ ...@@ -68,7 +73,12 @@
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustUnspecified|stateHidden" /> android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".ui.help.HelpActivity" /> <activity android:name=".ui.help.HelpActivity" />
<activity android:name=".ui.feedback.FeedBackActivity"></activity> <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> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -19,6 +19,8 @@ public class C { ...@@ -19,6 +19,8 @@ public class C {
public static final int MENU_UPDATE = 109; public static final int MENU_UPDATE = 109;
public static final int MENU_HELP = 110; public static final int MENU_HELP = 110;
public static final int MENU_EXIT = 111; public static final int MENU_EXIT = 111;
public static final int MENU_STATISTICS_ORDER = 1051;
public static final int MENU_STATISTICS_MS = 1052;
} }
......
...@@ -69,7 +69,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind ...@@ -69,7 +69,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
} }
protected void seConfirmEnable( boolean isEnable){ protected void seConfirmEnable(boolean isEnable) {
mBaseBinding.btnConfirm.setEnabled(isEnable); mBaseBinding.btnConfirm.setEnabled(isEnable);
} }
...@@ -143,7 +143,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind ...@@ -143,7 +143,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
if (!isEasy()) { if (!isEasy()) {
WindowManager.LayoutParams attributes = getDialog().getWindow().getAttributes(); WindowManager.LayoutParams attributes = getDialog().getWindow().getAttributes();
attributes.width = ScreenUtils.getScreenWidth() * 45 / 100; attributes.width = ScreenUtils.getScreenWidth() * 95 / 100;
attributes.height = -2; attributes.height = -2;
getDialog().getWindow().setAttributes(attributes); getDialog().getWindow().setAttributes(attributes);
} }
......
...@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.model; ...@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.model;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.bigkoo.pickerview.model.IPickerViewData; import com.bigkoo.pickerview.model.IPickerViewData;
import com.xingdata.zzdpos.base.BaseBean; import com.xingdata.zzdpos.base.BaseBean;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment;
/** /**
* Created by Administrator on 2017/11/27. * Created by Administrator on 2017/11/27.
...@@ -132,15 +133,15 @@ public class Category implements BaseBean, IPickerViewData { ...@@ -132,15 +133,15 @@ public class Category implements BaseBean, IPickerViewData {
@Override @Override
public String getPickerViewText() { public String getPickerViewText() {
switch (nowCategory) { switch (nowCategory) {
// case IntegralGetDialog.ONE_CATEGORY: { case IntegralGetFragment.ONE_CATEGORY: {
// return getSpuClaName() + ""; return getSpuClaName() + "";
// } }
// case IntegralGetDialog.TWO_CATEGORY: { case IntegralGetFragment.TWO_CATEGORY: {
// return getSpuGrpName() + ""; return getSpuGrpName() + "";
// } }
// case IntegralGetDialog.THREE_CATEGORY: { case IntegralGetFragment.THREE_CATEGORY: {
// return getSpuCateName() + ""; return getSpuCateName() + "";
// } }
} }
return ""; return "";
......
...@@ -23,6 +23,8 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean; ...@@ -23,6 +23,8 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean; import com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean;
import com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean; import com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity; import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketActivity;
import com.xingdata.zzdpos.ui.payment.PaymentActivity;
import com.xingdata.zzdpos.ui.splash.SplashActivity; import com.xingdata.zzdpos.ui.splash.SplashActivity;
import com.xingdata.zzdpos.view.PopupWindowDownList; import com.xingdata.zzdpos.view.PopupWindowDownList;
......
...@@ -8,6 +8,7 @@ import android.support.v4.app.Fragment; ...@@ -8,6 +8,7 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentPagerAdapter;
import android.view.View; import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityMainBinding; import com.xingdata.zzdpos.databinding.ActivityMainBinding;
...@@ -33,7 +34,7 @@ import io.reactivex.schedulers.Schedulers; ...@@ -33,7 +34,7 @@ import io.reactivex.schedulers.Schedulers;
public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBinding> implements MainContract.View { public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBinding> implements MainContract.View {
private int[] titleInts = {R.string.menu_cashier, R.string.menu_service, R.string.menu_myself}; private int[] titleInts = {R.string.menu_cashier, R.string.menu_service, R.string.menu_myself};
private int[] iconList = {R.mipmap.icon_menu_cashier_1, R.mipmap.icon_menu_service_0, R.mipmap.icon_menu_myself_0}; private int[] iconList = {R.mipmap.icon_menu_cashier_1, R.mipmap.icon_menu_service_0, R.mipmap.icon_menu_myself_0};
private FragmentPagerAdapter mFragmentPagerAdapter; private FragmentViewAdapter mFragmentPagerAdapter;
// private List<View> views=new ArrayList<>(); // private List<View> views=new ArrayList<>();
private List<ItemMenuBottomBinding> itemMenuBottomBindings = new ArrayList<>(); private List<ItemMenuBottomBinding> itemMenuBottomBindings = new ArrayList<>();
private HandoverDialog mHandoverDialog = new HandoverDialog(); private HandoverDialog mHandoverDialog = new HandoverDialog();
...@@ -134,6 +135,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -134,6 +135,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
} }
@Override
public void handoverOk() {
mHandoverDialog.dismiss();
ActivityUtils.finishAllActivities();
}
@Override @Override
public void showHandoverDialog() { public void showHandoverDialog() {
mHandoverDialog.show(this); mHandoverDialog.show(this);
......
...@@ -7,10 +7,10 @@ import com.xingdata.zzdpos.base.BaseView; ...@@ -7,10 +7,10 @@ import com.xingdata.zzdpos.base.BaseView;
interface MainContract { interface MainContract {
interface View extends BaseView { interface View extends BaseView {
// /** /**
// * 交班确认 * 交班确认
// */ */
// void handoverOk(); void handoverOk();
// //
// /** // /**
// * 显示修改密码页面 // * 显示修改密码页面
...@@ -270,10 +270,10 @@ interface MainContract { ...@@ -270,10 +270,10 @@ interface MainContract {
// */ // */
// public abstract void clickChangePassword(); // public abstract void clickChangePassword();
// //
// /** /**
// * 菜单EXIT页面 - 点击交班 打开交班报表页面 * 菜单EXIT页面 - 点击交班 打开交班报表页面
// */ */
// public abstract void clickHandover(); public abstract void clickHandover();
// //
// //
// /** // /**
...@@ -527,10 +527,10 @@ interface MainContract { ...@@ -527,10 +527,10 @@ interface MainContract {
// */ // */
// public abstract void clickFeedOk(Feed feed); // public abstract void clickFeedOk(Feed feed);
// //
// /** /**
// * 注销 * 注销
// */ */
// public abstract void logout(); public abstract void logout();
// //
// //
// /** // /**
......
...@@ -12,6 +12,7 @@ import com.blankj.utilcode.util.StringUtils; ...@@ -12,6 +12,7 @@ import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.TimeUtils; import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.api.print.ZX_PrintPOS; import com.xingdata.api.print.ZX_PrintPOS;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.db.DBFactory; import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.HandoverInfo; import com.xingdata.zzdpos.model.HandoverInfo;
import com.xingdata.zzdpos.ui.login.LoginPresenter; import com.xingdata.zzdpos.ui.login.LoginPresenter;
...@@ -29,7 +30,8 @@ import io.reactivex.functions.Function; ...@@ -29,7 +30,8 @@ import io.reactivex.functions.Function;
public class MainPresenter extends MainContract.Presenter { public class MainPresenter extends MainContract.Presenter {
public static HandoverInfo handoverInfo; public static HandoverInfo handoverInfo;
//
//
// /** // /**
// * 当前的使用的支付方式 // * 当前的使用的支付方式
// */ // */
...@@ -116,7 +118,7 @@ public class MainPresenter extends MainContract.Presenter { ...@@ -116,7 +118,7 @@ public class MainPresenter extends MainContract.Presenter {
// this.getMsList(); // this.getMsList();
} }
// @Override // @Override
// public void clickLock() { // public void clickLock() {
// mView.goLockActivity(); // mView.goLockActivity();
// } // }
...@@ -131,12 +133,12 @@ public class MainPresenter extends MainContract.Presenter { ...@@ -131,12 +133,12 @@ public class MainPresenter extends MainContract.Presenter {
// mView.showChangePasswordDialog(); // mView.showChangePasswordDialog();
// } // }
// //
// @Override @Override
// public void clickHandover() { public void clickHandover() {
// mView.showHandoverDialog(); mView.showHandoverDialog();
// } }
//
// //
// @Override // @Override
// public void clickFeedback() { // public void clickFeedback() {
// mView.showFeedbackDialog(); // mView.showFeedbackDialog();
...@@ -933,11 +935,11 @@ public class MainPresenter extends MainContract.Presenter { ...@@ -933,11 +935,11 @@ public class MainPresenter extends MainContract.Presenter {
@Override @Override
public void clickHandoverOk() { public void clickHandoverOk() {
// logout(); logout();
// mView.handoverOk(); mView.handoverOk();
} }
// @Override // @Override
// public void clickFeedOk(Feed feed) { // public void clickFeedOk(Feed feed) {
// ApiFactory.Feed.addFeed(feed) // ApiFactory.Feed.addFeed(feed)
// .subscribe(object -> { // .subscribe(object -> {
...@@ -946,14 +948,14 @@ public class MainPresenter extends MainContract.Presenter { ...@@ -946,14 +948,14 @@ public class MainPresenter extends MainContract.Presenter {
// }); // });
// } // }
// //
// @Override @Override
// public void logout() { public void logout() {
// ApiFactory.Test.logout() ApiFactory.Test.logout()
// .subscribe(object -> { .subscribe(object -> {
// }, throwable -> { }, throwable -> {
// ToastUtils.showShort(throwable.getMessage()); ToastUtils.showShort(throwable.getMessage());
// }); });
// } }
// //
// @Override // @Override
// public void searchBarHasFocus(boolean isHas) { // public void searchBarHasFocus(boolean isHas) {
......
...@@ -24,7 +24,7 @@ public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBind ...@@ -24,7 +24,7 @@ public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBind
@Override @Override
public int getTitle() { public int getTitle() {
return R.string.handover_title; return R.string.handover_hint;
} }
@Override @Override
......
package com.xingdata.zzdpos.ui.main.fragment; package com.xingdata.zzdpos.ui.main.fragment;
import android.content.Intent;
import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.GridLayoutManager;
import android.view.View; import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
...@@ -14,8 +16,10 @@ import com.xingdata.zzdpos.base.BaseFragment; ...@@ -14,8 +16,10 @@ import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentCasherBinding; import com.xingdata.zzdpos.databinding.FragmentCasherBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter; import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter; 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.payment.PaymentActivity;
import com.xingdata.zzdpos.ui.splash.SplashActivity; import com.xingdata.zzdpos.ui.splash.SplashActivity;
import com.xingdata.zzdpos.ui.statistics.StatisticsActivity;
import com.xingdata.zzdpos.util.MyMenuItemDecoration; import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
...@@ -51,7 +55,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi ...@@ -51,7 +55,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
switch ((int) adapter.getData().get(position)) { switch ((int) adapter.getData().get(position)) {
case C.MENU.MENU_VIP://会员 case C.MENU.MENU_VIP://会员
ActivityUtils.startActivity(new Intent(getActivity(),VipActivity.class));
break; break;
case C.MENU.MENU_RECHARGE://充值 case C.MENU.MENU_RECHARGE://充值
...@@ -63,7 +67,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi ...@@ -63,7 +67,7 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
break; break;
case C.MENU.MENU_STATISTICS://统计 case C.MENU.MENU_STATISTICS://统计
ActivityUtils.startActivity(getActivity(), StatisticsActivity.class);
break; break;
case C.MENU.MENU_MANAGER://管理 case C.MENU.MENU_MANAGER://管理
...@@ -84,6 +88,12 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi ...@@ -84,6 +88,12 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
ActivityUtils.startActivity(getActivity(), SplashActivity.class); ActivityUtils.startActivity(getActivity(), SplashActivity.class);
} }
}); });
mViewBinding.btnHandover.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
mPresenter.clickHandover();
}
});
} }
} }
...@@ -62,7 +62,7 @@ public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBi ...@@ -62,7 +62,7 @@ public class MyselfFragment extends BaseFragment<MainPresenter, FragmentMyselfBi
ActivityUtils.startActivity(getActivity(), HelpActivity.class); ActivityUtils.startActivity(getActivity(), HelpActivity.class);
break; break;
case C.MENU.MENU_EXIT://退出 case C.MENU.MENU_EXIT://退出
mPresenter.clickHandover();
break; break;
} }
......
package com.xingdata.zzdpos.ui.marketing.integral; package com.xingdata.zzdpos.ui.marketing.integral;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.LogUtils; import com.blankj.utilcode.util.LogUtils;
...@@ -17,26 +15,12 @@ import com.xingdata.zzdpos.model.Pager; ...@@ -17,26 +15,12 @@ import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Ubound; import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.dialog.PromptDialog; import com.xingdata.zzdpos.ui.dialog.PromptDialog;
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.ui.marketing.integral.dialog.IntegralGetDialog;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List; import java.util.List;
public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIntegralBinding> public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIntegralBinding>
implements IntegralContract.View { implements IntegralContract.View {
IntegralGetDialog integralGetDialog;
IntegralAdapter integralAdapter;
IntegralExchangeAdapter integralExchangeAdapter;
private Boolean isLoadMore = false;
public static final int NORMAL_TYPE = 1;
public static final int LOADMORE_TYPE = 2;
public static final int REFRESH_TYPE = 3;
LoadingDialog loadingDialog = new LoadingDialog();
private long mExitTime;//控制快速点击
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -45,81 +29,13 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn ...@@ -45,81 +29,13 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
@Override @Override
public void initView() { public void initView() {
integralAdapter = new IntegralAdapter(R.layout.item_integral, new ArrayList<>()); loadRootFragment(R.id.frg, mPresenter.integralIndexFragment);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvMessage.setLayoutManager(linearLayoutManager);
mViewBinding.rvMessage.setAdapter(integralAdapter);
List<Ubound> list = new ArrayList<>();
Ubound ubound = new Ubound();
ubound.setBoundValAmt(1000l);
ubound.setBoundUseStatus((byte) 0);
ubound.setBoundOrderAmt(10l);
ubound.setBoundUseNum(10000l);
list.add(ubound);
integralExchangeAdapter = new IntegralExchangeAdapter(R.layout.item_integral, list);
LinearLayoutManager linearLayoutManager1 = new LinearLayoutManager(this);
linearLayoutManager1.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvExchangeMessage.setLayoutManager(linearLayoutManager1);
mViewBinding.rvExchangeMessage.setAdapter(integralExchangeAdapter);
mViewBinding.icTitle.tvTitle.setText("积分规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.finishActivity(IntegralActivity.class);
}
});
mViewBinding.setOnClickListener(v -> {
switch (v.getId()) {
case R.id.btn_add: {
integralGetDialog = new IntegralGetDialog();
integralGetDialog.setNowType(1);
integralGetDialog.show(IntegralActivity.this);
}
break;
case R.id.rb_get: {
mViewBinding.rbGet.getPaint().setFakeBoldText(true);
mViewBinding.rbExchange.getPaint().setFakeBoldText(false);
showView(v.getId());
mPresenter.query(1, NORMAL_TYPE, null);
}
break;
case R.id.rb_exchange: {
mViewBinding.rbGet.getPaint().setFakeBoldText(false);
mViewBinding.rbExchange.getPaint().setFakeBoldText(true);
showView(v.getId());
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show(this);
mPresenter.exchangeQuery(loadingDialog);
}
break;
default: {
}
break;
}
});
//set Presenter listener
mViewBinding.srlProduct.setOnRefreshListener(this::refreshProduct);
integralAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rvMessage);
integralAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
(integralAdapter.getData().get(position)));
integralExchangeAdapter.setOnItemClickListener((adapter, view, position) ->
exchangeClickProduct(integralExchangeAdapter.getData().get(position)));
mPresenter.query(1, NORMAL_TYPE, null);
} }
@Override @Override
public void initComplete(List<Category> list, int nowCategory) { public void initComplete(List<Category> list, int nowCategory) {
if (list.size() <= 0) { mPresenter.integralIndexFragment.initComplete(list, nowCategory);
return;
}
integralGetDialog.setCategoryDate(list, nowCategory);
} }
@Override @Override
...@@ -144,139 +60,31 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn ...@@ -144,139 +60,31 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
@Override @Override
public void querySucc(@Nullable Pager<Gbound> pager, Boolean isLoadMore, int queryType, public void querySucc(@Nullable Pager<Gbound> pager, Boolean isLoadMore, int queryType,
LoadingDialog loadingDialog) { LoadingDialog loadingDialog) {
if (loadingDialog != null) { mPresenter.integralIndexFragment.querySucc(pager, isLoadMore, queryType, loadingDialog);
loadingDialog.dismiss();
}
this.isLoadMore = isLoadMore;
if (pager == null || pager.getList() == null || pager.getList().size() <= 0) {
integralAdapter.setEmptyView(getEmptyView("没有规则"));
}
if (pager.getList() != null) {
switch (queryType) {
case NORMAL_TYPE: {
//正常请求
integralAdapter.setNewData(pager.getList());
}
break;
case LOADMORE_TYPE: {
//加载更多
integralAdapter.addData(pager.getList());
}
break;
case REFRESH_TYPE: {
//刷新请求
integralAdapter.setNewData(pager.getList());
}
break;
}
}
integralAdapter.setEnableLoadMore(false);
mViewBinding.srlProduct.setRefreshing(false);
} }
@Override @Override
public void addSucc(LoadingDialog loadingDialog) { public void addSucc(LoadingDialog loadingDialog) {
mPresenter.query(1, NORMAL_TYPE, loadingDialog); pop();
mPresenter.query(1, mPresenter.integralIndexFragment.NORMAL_TYPE, loadingDialog);
} }
@Override @Override
public void updateSucc(LoadingDialog loadingDialog) { public void updateSucc(LoadingDialog loadingDialog) {
mPresenter.query(1, NORMAL_TYPE, loadingDialog); pop();
mPresenter.query(1, mPresenter.integralIndexFragment.NORMAL_TYPE, loadingDialog);
} }
@Override @Override
public void exchangeQuerySucc(Pager<Ubound> uboundPager, LoadingDialog loadingDialog) { public void exchangeQuerySucc(Pager<Ubound> uboundPager, LoadingDialog loadingDialog) {
if (loadingDialog != null) { mPresenter.integralIndexFragment.exchangeQuerySucc(uboundPager, loadingDialog);
loadingDialog.dismiss();
}
if (uboundPager != null && uboundPager.getList() != null) {
// if (uboundPager.getList().size() <= 0) {
// Ubound ubound = new Ubound();
// ubound.setBoundValAmt(1000l);
// ubound.setBoundUseStatus((byte) 0);
// ubound.setBoundOrderAmt(9900l);
// ubound.setBoundUseNum(10L);
// uboundPager.getList().add(ubound);
// }
integralExchangeAdapter.setNewData(uboundPager.getList());
}
} }
@Override @Override
public void exchangeUpdateSucc(Ubound ubound, LoadingDialog loadingDialog) { public void exchangeUpdateSucc(Ubound ubound, LoadingDialog loadingDialog) {
pop();
mPresenter.exchangeQuery(loadingDialog); mPresenter.exchangeQuery(loadingDialog);
} }
/**
* 刷新商品
*/
private void refreshProduct() {
integralAdapter.setEnableLoadMore(false);
mPresenter.query(1, REFRESH_TYPE, null);
}
/**
* 加载更多商品
*/
private void loadMoreProduct() {
mViewBinding.srlProduct.setRefreshing(false);
if (isLoadMore) {
mPresenter.query(-1, LOADMORE_TYPE, null);
}
}
/**
* 积分获取页面点击item
*/
private void clickProduct(Gbound gbound) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
integralGetDialog = new IntegralGetDialog();
loadingDialog.show(this);
integralGetDialog.setData(gbound, loadingDialog);
integralGetDialog.show(this);
mExitTime = System.currentTimeMillis();
} else {
ToastUtils.showLong("您操作太快了");
}
}
/**
* 积分兑换页面点击item
*/
private void exchangeClickProduct(Ubound gbound) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
IntegralExchangeDialog integralExchangeDialog = new IntegralExchangeDialog();
integralExchangeDialog.setData(gbound);
integralExchangeDialog.show(this);
mExitTime = System.currentTimeMillis();
} else {
ToastUtils.showLong("您操作太快了");
}
}
private View getEmptyView(String str) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(str);
return view;
}
private void showView(int id) {
switch (id) {
case R.id.rb_get: {
mViewBinding.llGet.setVisibility(View.VISIBLE);
mViewBinding.llExchange.setVisibility(View.GONE);
}
break;
case R.id.rb_exchange: {
mViewBinding.llGet.setVisibility(View.GONE);
mViewBinding.llExchange.setVisibility(View.VISIBLE);
}
break;
}
}
} }
...@@ -8,6 +8,9 @@ import com.xingdata.zzdpos.model.Category; ...@@ -8,6 +8,9 @@ import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound; import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Ubound; import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralExchangeFragment;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment;
import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralIndexFragment;
import java.util.List; import java.util.List;
...@@ -19,7 +22,9 @@ import io.reactivex.functions.Function; ...@@ -19,7 +22,9 @@ import io.reactivex.functions.Function;
public class IntegralPresenter extends IntegralContract.Presenter { public class IntegralPresenter extends IntegralContract.Presenter {
private int number = 1; private int number = 1;
public IntegralIndexFragment integralIndexFragment = new IntegralIndexFragment();
public IntegralGetFragment integralGetFragment = new IntegralGetFragment();
public IntegralExchangeFragment integralExchangeFragment = new IntegralExchangeFragment();
@Override @Override
public void onAttached() { public void onAttached() {
......
...@@ -35,9 +35,9 @@ public class IntegralAdapter extends BaseAdapter<Gbound, ItemIntegralBinding> { ...@@ -35,9 +35,9 @@ public class IntegralAdapter extends BaseAdapter<Gbound, ItemIntegralBinding> {
mViewBinding.tvGet.setText(item.getTruleName()); mViewBinding.tvGet.setText(item.getTruleName());
//开通启用状态 0:正常 1 暂停 默认 0 //开通启用状态 0:正常 1 暂停 默认 0
if (item.getBoundGetStatus() == 0) { if (item.getBoundGetStatus() == 0) {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_open); mViewBinding.tvStatus.setText("启用");
} else { } else {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_close); mViewBinding.tvStatus.setText("未启用");
} }
} }
......
...@@ -2,8 +2,6 @@ package com.xingdata.zzdpos.ui.marketing.integral.adapter; ...@@ -2,8 +2,6 @@ package com.xingdata.zzdpos.ui.marketing.integral.adapter;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter; import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemIntegralBinding; import com.xingdata.zzdpos.databinding.ItemIntegralBinding;
import com.xingdata.zzdpos.model.Ubound; import com.xingdata.zzdpos.model.Ubound;
...@@ -22,6 +20,11 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin ...@@ -22,6 +20,11 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
@Override @Override
protected void convert(ItemIntegralBinding mViewBinding, Ubound item) { protected void convert(ItemIntegralBinding mViewBinding, Ubound item) {
mViewBinding.tvVipTitle.setText("积分面值");
mViewBinding.tvSourceTitle.setText("兑换规则");
mViewBinding.tvVip.setText(item.getBoundValAmt() + "个积分=1元"); mViewBinding.tvVip.setText(item.getBoundValAmt() + "个积分=1元");
//兑换规则 //兑换规则
if (item.getBoundOrderAmt() != null && item.getBoundUseNum() != null) { if (item.getBoundOrderAmt() != null && item.getBoundUseNum() != null) {
...@@ -33,9 +36,9 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin ...@@ -33,9 +36,9 @@ public class IntegralExchangeAdapter extends BaseAdapter<Ubound, ItemIntegralBin
if (item.getBoundUseStatus() != null) { if (item.getBoundUseStatus() != null) {
//开通启用状态 0:正常 1 暂停 默认 0 //开通启用状态 0:正常 1 暂停 默认 0
if (item.getBoundUseStatus() == 0) { if (item.getBoundUseStatus() == 0) {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_open); mViewBinding.tvStatus.setText("启用");
} else { } else {
mViewBinding.tvStatus.setImageResource(R.mipmap.integral_close); mViewBinding.tvStatus.setText("未启用");
} }
} }
......
package com.xingdata.zzdpos.ui.marketing.integral.dialog; //package com.xingdata.zzdpos.ui.marketing.integral.dialog;
//
import android.annotation.SuppressLint; //import android.annotation.SuppressLint;
import android.content.Context; //import android.content.Context;
import android.text.TextUtils; //import android.text.TextUtils;
import android.view.View; //import android.view.View;
import android.view.inputmethod.InputMethodManager; //import android.view.inputmethod.InputMethodManager;
import android.widget.TextView; //import android.widget.TextView;
//
import com.blankj.utilcode.util.ToastUtils; //import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R; //import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; //import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseDialog; //import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.databinding.DialogIntegralExchangeSettingBinding; //import com.xingdata.zzdpos.databinding.DialogIntegralExchangeSettingBinding;
import com.xingdata.zzdpos.model.Ubound; //import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; //import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter; //import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.util.ConvertUtil; //import com.xingdata.zzdpos.util.ConvertUtil;
//
/** ///**
* 积分兑换设置界面 // * 积分兑换设置界面
*/ // */
public class IntegralExchangeDialog extends BaseDialog<IntegralPresenter, //public class IntegralExchangeDialog extends BaseDialog<IntegralPresenter,
DialogIntegralExchangeSettingBinding> { // DialogIntegralExchangeSettingBinding> {
Ubound ubound; // Ubound ubound;
//
@Override // @Override
public int getLayoutId() { // public int getLayoutId() {
return R.layout.dialog_integral_exchange_setting; // return R.layout.dialog_integral_exchange_setting;
} // }
//
@Override // @Override
protected boolean isShowTitle() { // protected boolean isShowTitle() {
return true; // return true;
} // }
//
@Override // @Override
public int getTitle() { // public int getTitle() {
return R.string.integral_exchange_title; // return R.string.integral_exchange_title;
} // }
//
@SuppressLint("SetTextI18n") // @SuppressLint("SetTextI18n")
@Override // @Override
public void initView() { // public void initView() {
setCancelable(false); // setCancelable(false);
mViewBinding.setOnClickListener(view -> { // mViewBinding.setOnClickListener(view -> {
hintKbTwo(); // hintKbTwo();
switch (view.getId()) { // switch (view.getId()) {
case R.id.rd_suspendeds: { // case R.id.rd_suspendeds: {
//暂停 // //暂停
ubound.setBoundUseStatus((byte) 1); // ubound.setBoundUseStatus((byte) 1);
} // }
break; // break;
case R.id.rd_starts: { // case R.id.rd_starts: {
//启用 // //启用
ubound.setBoundUseStatus((byte) 0); // ubound.setBoundUseStatus((byte) 0);
} // }
break; // break;
} // }
}); // });
initUiData(); // initUiData();
} // }
//
private void initUiData() { // private void initUiData() {
if (ubound != null) { // if (ubound != null) {
if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 0) { // if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 0) {
mViewBinding.rdStarts.setChecked(true); // mViewBinding.rdStarts.setChecked(true);
} else if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 1) { // } else if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 1) {
mViewBinding.rdSuspendeds.setChecked(true); // mViewBinding.rdSuspendeds.setChecked(true);
} // }
if (ubound.getBoundValAmt() != null) { // if (ubound.getBoundValAmt() != null) {
mViewBinding.etIntegralExchangeRuleCountMoney.setText(ubound.getBoundValAmt() + ""); // mViewBinding.etIntegralExchangeRuleCountMoney.setText(ubound.getBoundValAmt() + "");
} // }
if (ubound.getBoundOrderAmt() != null) { // if (ubound.getBoundOrderAmt() != null) {
mViewBinding.etIntegralExchangeMoney.setText(ConvertUtil.fenToYuanNoPoint(ubound // mViewBinding.etIntegralExchangeMoney.setText(ConvertUtil.fenToYuanNoPoint(ubound
.getBoundOrderAmt())); // .getBoundOrderAmt()));
} // }
if (ubound.getBoundUseNum() != null) { // if (ubound.getBoundUseNum() != null) {
mViewBinding.etIntegralExchangeCount.setText(ubound.getBoundUseNum() + ""); // mViewBinding.etIntegralExchangeCount.setText(ubound.getBoundUseNum() + "");
} // }
} // }
} // }
//
public void setData(Ubound ubound) { // public void setData(Ubound ubound) {
this.ubound = ubound; // this.ubound = ubound;
} // }
//
@Override // @Override
public void onConfirmClick(View view) { // public void onConfirmClick(View view) {
super.onConfirmClick(view); // super.onConfirmClick(view);
if (isNullAndSet()) { // if (isNullAndSet()) {
LoadingDialog loadingDialog = new LoadingDialog(); // LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity()); // loadingDialog.show((BaseActivity) getActivity());
ubound.setUpdateTime(null); // ubound.setUpdateTime(null);
ubound.setCreateTime(null); // ubound.setCreateTime(null);
mPresenter.exchangeUpdate(ubound, loadingDialog); // mPresenter.exchangeUpdate(ubound, loadingDialog);
this.dismiss(); // this.dismiss();
} else { // } else {
ToastUtils.showLong("输入数据不能null"); // ToastUtils.showLong("输入数据不能null");
} // }
//
} // }
//
//
/** // /**
* 判断用户输入数据是否为null // * 判断用户输入数据是否为null
* // *
* @return 输入为null返回false 反之返回true // * @return 输入为null返回false 反之返回true
*/ // */
private boolean isNullAndSet() { // private boolean isNullAndSet() {
if (ubound == null || ubound.getBoundUseStatus() == null) { // if (ubound == null || ubound.getBoundUseStatus() == null) {
return false; // return false;
} // }
if (TextUtils.isEmpty(mViewBinding.etIntegralExchangeRuleCountMoney.getText().toString()) // if (TextUtils.isEmpty(mViewBinding.etIntegralExchangeRuleCountMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralExchangeMoney.getText().toString()) // || TextUtils.isEmpty(mViewBinding.etIntegralExchangeMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralExchangeCount.getText().toString // || TextUtils.isEmpty(mViewBinding.etIntegralExchangeCount.getText().toString
())) { // ())) {
return false; // return false;
} // }
ubound.setBoundValAmt(Long.parseLong(mViewBinding.etIntegralExchangeRuleCountMoney // ubound.setBoundValAmt(Long.parseLong(mViewBinding.etIntegralExchangeRuleCountMoney
.getText().toString())); // .getText().toString()));
ubound.setBoundOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralExchangeMoney // ubound.setBoundOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralExchangeMoney
.getText().toString())); // .getText().toString()));
ubound.setBoundUseNum(Long.parseLong(mViewBinding.etIntegralExchangeCount.getText() // ubound.setBoundUseNum(Long.parseLong(mViewBinding.etIntegralExchangeCount.getText()
.toString())); // .toString()));
return true; // return true;
} // }
//
//
/** // /**
* 显示软键盘,Dialog使用 // * 显示软键盘,Dialog使用
*/ // */
public void hintKbTwo() { // public void hintKbTwo() {
View view = getDialog().getCurrentFocus(); // View view = getDialog().getCurrentFocus();
if (view == null) { // if (view == null) {
return; // return;
} // }
if (view instanceof TextView) { // if (view instanceof TextView) {
InputMethodManager mInputMethodManager = (InputMethodManager) getContext() // InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE); // .getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager // mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.RESULT_UNCHANGED_SHOWN); // .RESULT_UNCHANGED_SHOWN);
} // }
} // }
//
@Override // @Override
public void dismiss() { // public void dismiss() {
hintKbTwo(); // hintKbTwo();
super.dismiss(); // super.dismiss();
} // }
//
} //}
package com.xingdata.zzdpos.ui.marketing.integral.dialog; //package com.xingdata.zzdpos.ui.marketing.integral.dialog;
//
import android.annotation.SuppressLint; //import android.annotation.SuppressLint;
import android.content.Context; //import android.content.Context;
import android.text.TextUtils; //import android.text.TextUtils;
import android.view.View; //import android.view.View;
import android.view.inputmethod.InputMethodManager; //import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView; //import android.widget.ImageView;
import android.widget.TextView; //import android.widget.TextView;
//
import com.bigkoo.pickerview.OptionsPickerView; //import com.bigkoo.pickerview.OptionsPickerView;
import com.bigkoo.pickerview.listener.CustomListener; //import com.bigkoo.pickerview.listener.CustomListener;
import com.blankj.utilcode.util.LogUtils; //import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils; //import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.App; //import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.R; //import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; //import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseDialog; //import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding; //import com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding;
import com.xingdata.zzdpos.model.Category; //import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound; //import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Level; //import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; //import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter; //import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.util.ConvertUtil; //import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener; //import com.xingdata.zzdpos.util.OnClickListener;
//
import java.util.ArrayList; //import java.util.ArrayList;
import java.util.List; //import java.util.List;
//
import io.realm.Realm; //import io.realm.Realm;
import io.realm.RealmResults; //import io.realm.RealmResults;
//
/** ///**
* 积分获取设置界面 // * 积分获取设置界面
*/ // */
public class IntegralGetDialog extends BaseDialog<IntegralPresenter, //public class IntegralGetDialog extends BaseDialog<IntegralPresenter,
DialogIntegralGetSettingBinding> { // DialogIntegralGetSettingBinding> {
//区分请求类型 正常 加载更多,下拉刷新 // //区分请求类型 正常 加载更多,下拉刷新
public static final int ONE_CATEGORY = 1; // public static final int ONE_CATEGORY = 1;
public static final int TWO_CATEGORY = 2; // public static final int TWO_CATEGORY = 2;
public static final int THREE_CATEGORY = 3; // public static final int THREE_CATEGORY = 3;
//请求商品类别使用的id // //请求商品类别使用的id
private long spuCateIdTwo = -1; // private long spuCateIdTwo = -1;
private long spuCateIdThree = -1; // private long spuCateIdThree = -1;
private OptionsPickerView pvCustomOptions; // private OptionsPickerView pvCustomOptions;
private List<Category> listCategory = new ArrayList<>(); // private List<Category> listCategory = new ArrayList<>();
//积分获取提交给服务器对象 // //积分获取提交给服务器对象
private Gbound gbound = new Gbound(); // private Gbound gbound = new Gbound();
//ui显示用 // //ui显示用
private Gbound ShowGbound = new Gbound(); // private Gbound ShowGbound = new Gbound();
//商品品类提交服务器对象 // //商品品类提交服务器对象
private Category category = new Category(); // private Category category = new Category();
//当前为修改还是新增 0为修改1为新增 // //当前为修改还是新增 0为修改1为新增
private int nowType = -1; // private int nowType = -1;
//进度对话框 // //进度对话框
LoadingDialog loadingDialog; // LoadingDialog loadingDialog;
//当前点击商品类型空间id,防止直接点击商品第二三种类型 // //当前点击商品类型空间id,防止直接点击商品第二三种类型
private int nowShopTypeId = 1; // private int nowShopTypeId = 1;
//
@Override // @Override
public int getLayoutId() { // public int getLayoutId() {
return R.layout.dialog_integral_get_setting; // return R.layout.dialog_integral_get_setting;
} // }
//
@Override // @Override
protected boolean isShowTitle() { // protected boolean isShowTitle() {
return true; // return true;
} // }
//
@Override // @Override
public int getTitle() { // public int getTitle() {
return R.string.integral_get_title; // return R.string.integral_get_title;
} // }
//
@SuppressLint("SetTextI18n") // @SuppressLint("SetTextI18n")
@Override // @Override
public void initView() { // public void initView() {
//
setCancelable(false); // setCancelable(false);
//
mViewBinding.setOnClickListener( //
new OnClickListener() { //
@Override // }
protected void myOnClickListener(View v) { //
hintKbTwo(); //
switch (v.getId()) { // private void setShopTypeClick(Boolean b) {
case R.id.rd_suspendeds: { // mViewBinding.rdGettypeAll.setEnabled(b);
//暂停 // mViewBinding.rdGettypeShop.setEnabled(b);
gbound.setBoundGetStatus(1); // mViewBinding.rdGettypeCategory.setEnabled(b);
} // if (b) {
break; // mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.GONE);
case R.id.rd_starts: { // mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.GONE);
//启用 // mViewBinding.tvCategorySelectOne.setVisibility(View.VISIBLE);
gbound.setBoundGetStatus(0); // mViewBinding.tvCategorySelectTwo.setVisibility(View.VISIBLE);
} // mViewBinding.tvCategorySelectThree.setVisibility(View.VISIBLE);
break; // mViewBinding.tvVipLevelSelect.setVisibility(View.VISIBLE);
case R.id.rd_gettype_all: { // } else {
//通用 // mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.VISIBLE);
showView(v.getId()); // mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.VISIBLE);
gbound.setVipGboundType((byte) 0); // mViewBinding.tvCategorySelectOne.setVisibility(View.GONE);
} // mViewBinding.tvCategorySelectTwo.setVisibility(View.GONE);
break; // mViewBinding.tvCategorySelectThree.setVisibility(View.GONE);
case R.id.rd_gettype_category: { // mViewBinding.tvVipLevelSelect.setVisibility(View.GONE);
//品类定义 // }
showView(v.getId()); // }
gbound.setVipGboundType((byte) 1); //
} // private void updateUi() {
break; // if (ShowGbound != null && ShowGbound.getTruleName() != null && !(ShowGbound.getTruleName
case R.id.rd_gettype_shop: { // ().equals("")
//商品定义 // )) {
showView(v.getId()); // mViewBinding.tvRulesName.setText(ShowGbound.getTruleName());
gbound.setVipGboundType((byte) 2); // //开通启用状态 0:正常 1 暂停 默认 0
} // if (ShowGbound.getBoundGetStatus() == 0) {
break; // mViewBinding.rdStarts
case R.id.tv_vip_level_select: { // .setChecked(true);
Realm realm = Realm.getInstance(App.instance.mRealmConfig); // } else if (ShowGbound.getBoundGetStatus() == 1) {
RealmResults<Level> realmResult = realm.where(Level.class) // mViewBinding.rdSuspendeds.setChecked(true);
.findAll(); // }
if (realmResult != null && realmResult.size() > 0) { // mViewBinding.tvVipLevelSelectShowNoEdit.setText(ShowGbound.getVipLevelName());
initVipLevelOptionPicker(realmResult); // //积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
} // switch (ShowGbound.getVipGboundType()) {
} // case 0: {
break; // showView(R.id.rd_gettype_all);
case R.id.tv_category_select_one: { // mViewBinding.rdGettypeAll.setChecked(true);
mPresenter.initData(getCategory(v.getId()), ONE_CATEGORY); // if (ShowGbound.getTransAmt() != null) {
mViewBinding.tvCategorySelectTwo.setText(""); // mViewBinding.etIntegralWeight.setText(ConvertUtil.fenToYuanNoPoint
mViewBinding.tvCategorySelectThree.setText(""); // (ShowGbound.getTransAmt()));
// }
} // if (ShowGbound.getBoundExp() != null) {
break; // mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + "");
case R.id.tv_category_select_two: { // }
if (nowShopTypeId >= 1) { //
mPresenter.initData(getCategory(v.getId()), TWO_CATEGORY); //
mViewBinding.tvCategorySelectThree.setText(""); // }
nowShopTypeId = 2; // break;
} else { // case 1: {
ToastUtils.showLong("请先选择第一类品类"); // showView(R.id.rd_gettype_category);
} // mViewBinding.rdGettypeCategory.setChecked(true);
} // if (ShowGbound.getSpuClaName() != null) {
break; // mViewBinding.tvCategorySelectOne.setText((ShowGbound.getSpuClaName()));
case R.id.tv_category_select_three: { // mViewBinding.tvCategorySelectShowNoEdit.setText(ShowGbound.getSpuClaName
if (nowShopTypeId >= 2) { // () + "/");
mPresenter.initData(getCategory(v.getId()), THREE_CATEGORY); // }
nowShopTypeId = 3; // if (ShowGbound.getSpuGrpName() != null) {
} else { // mViewBinding.tvCategorySelectTwo.setText((ShowGbound.getSpuGrpName()));
ToastUtils.showLong("请先选择第一二类品类"); // mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
} // .tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
} // .getSpuGrpName() + "/");
break; // }
default: { // if (ShowGbound.getSpuCateName() != null) {
// mViewBinding.tvCategorySelectThree.setText((ShowGbound.getSpuCateName()));
} // mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
break; // .tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
} // .getSpuCateName());
} // }
}); //
if (nowType == 0) { // if (ShowGbound.getTransAmt() != null) {
setShopTypeClick(false); // mViewBinding.etIntegralCategoryWeight.setText(ConvertUtil
updateUi(); // .fenToYuanNoPoint(ShowGbound
} else if (nowType == 1) { // .getTransAmt()));
setShopTypeClick(true); // }
mViewBinding.rdSuspendeds.setChecked(true); // if (ShowGbound.getBoundExp() != null) {
gbound.setBoundGetStatus(1); // mViewBinding.etIntegralCategoryTimeLimit.setText(ShowGbound.getBoundExp()
gbound.setVipGboundType((byte) 0); // + "");
} // }
if (loadingDialog != null) { // }
loadingDialog.dismiss(); // break;
} // case 2: {
// showView(R.id.rd_gettype_shop);
} // mViewBinding.rdGettypeShop.setChecked(true);
// if (ShowGbound.getBoundExp() != null) {
// mViewBinding.etShopTimeLimit.setText(ShowGbound.getBoundExp() + "");
private void setShopTypeClick(Boolean b) { // }
mViewBinding.rdGettypeAll.setEnabled(b); // }
mViewBinding.rdGettypeShop.setEnabled(b); // break;
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); // * 通过用户点击品类等级 构建提交给服务器Category对象
mViewBinding.tvVipLevelSelect.setVisibility(View.VISIBLE); // *
} else { // * @param id 按钮id
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.VISIBLE); // * @return 构建好的Category对象
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.VISIBLE); // */
mViewBinding.tvCategorySelectOne.setVisibility(View.GONE); // private Category getCategory(int id) {
mViewBinding.tvCategorySelectTwo.setVisibility(View.GONE); // switch (id) {
mViewBinding.tvCategorySelectThree.setVisibility(View.GONE); // case R.id.tv_category_select_one: {
mViewBinding.tvVipLevelSelect.setVisibility(View.GONE); // category = new Category();
} // }
} // break;
// case R.id.tv_category_select_two: {
private void updateUi() { // category.setSpuCateId(spuCateIdTwo);
if (ShowGbound != null && ShowGbound.getTruleName() != null && !(ShowGbound.getTruleName // }
().equals("") // break;
)) { // case R.id.tv_category_select_three: {
mViewBinding.tvRulesName.setText(ShowGbound.getTruleName()); // category.setSpuCateId(spuCateIdThree);
//开通启用状态 0:正常 1 暂停 默认 0 // }
if (ShowGbound.getBoundGetStatus() == 0) { // break;
mViewBinding.rdStarts // }
.setChecked(true); // return category;
} else if (ShowGbound.getBoundGetStatus() == 1) { //
mViewBinding.rdSuspendeds.setChecked(true); // }
} //
mViewBinding.tvVipLevelSelectShowNoEdit.setText(ShowGbound.getVipLevelName()); // /**
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分 // * 初始化会员等级选择对话框
switch (ShowGbound.getVipGboundType()) { // */
case 0: { // private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局
showView(R.id.rd_gettype_all); // pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
mViewBinding.rdGettypeAll.setChecked(true); // .OnOptionsSelectListener() {
if (ShowGbound.getTransAmt() != null) { // @Override
mViewBinding.etIntegralWeight.setText(ConvertUtil.fenToYuanNoPoint // public void onOptionsSelect(int options1, int option2, int options3, View v) {
(ShowGbound.getTransAmt())); // gbound.setVipLevel(realmResult.get(options1).getVipLevel());
} // mViewBinding.tvVipLevelSelect.setText(realmResult.get(options1).getVipLevelName());
if (ShowGbound.getBoundExp() != null) { // }
mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + ""); // }).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);
break; // tvSubmit.setOnClickListener(new View.OnClickListener() {
case 1: { // @Override
showView(R.id.rd_gettype_category); // public void onClick(View v) {
mViewBinding.rdGettypeCategory.setChecked(true); // pvCustomOptions.returnData();
if (ShowGbound.getSpuClaName() != null) { // pvCustomOptions.dismiss();
mViewBinding.tvCategorySelectOne.setText((ShowGbound.getSpuClaName())); // }
mViewBinding.tvCategorySelectShowNoEdit.setText(ShowGbound.getSpuClaName // });
() + "/"); // ivCancel.setOnClickListener(new View.OnClickListener() {
} // @Override
if (ShowGbound.getSpuGrpName() != null) { // public void onClick(View v) {
mViewBinding.tvCategorySelectTwo.setText((ShowGbound.getSpuGrpName())); // pvCustomOptions.dismiss();
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding // }
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound // });
.getSpuGrpName() + "/"); // }
} // })
if (ShowGbound.getSpuCateName() != null) { // .isDialog(true)
mViewBinding.tvCategorySelectThree.setText((ShowGbound.getSpuCateName())); // .build();
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding //
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound //
.getSpuCateName()); // pvCustomOptions.setPicker(realmResult);//添加数据
} // pvCustomOptions.show();
// }
if (ShowGbound.getTransAmt() != null) { //
mViewBinding.etIntegralCategoryWeight.setText(ConvertUtil //
.fenToYuanNoPoint(ShowGbound // /**
.getTransAmt())); // * 初始化商品品类选择对话框
} // *
if (ShowGbound.getBoundExp() != null) { // * @param list 选择对话框数据
mViewBinding.etIntegralCategoryTimeLimit.setText(ShowGbound.getBoundExp() // * @param nowList 当前选中的品类索引
+ ""); // */
} // private void initCustomOptionPicker(List<Category> list, int nowList) {//条件选择器初始化,自定义布局
} // pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
break; // .OnOptionsSelectListener() {
case 2: { // @Override
showView(R.id.rd_gettype_shop); // public void onOptionsSelect(int options1, int option2, int options3, View v) {
mViewBinding.rdGettypeShop.setChecked(true); // gbound.setSpuCateId((int) Long.parseLong(list.get(options1).getSpuCateId() + ""));
if (ShowGbound.getBoundExp() != null) { // //返回的分别是三个级别的选中位置
mViewBinding.etShopTimeLimit.setText(ShowGbound.getBoundExp() + ""); // switch (nowList) {
} // case ONE_CATEGORY: {
} // mViewBinding.tvCategorySelectOne.setText(listCategory.get(options1)
break; // .getSpuClaName());
} // spuCateIdTwo = listCategory.get(options1).getSpuCateId();
// }
} // break;
} // case TWO_CATEGORY: {
// mViewBinding.tvCategorySelectTwo.setText(listCategory.get(options1)
/** // .getSpuGrpName());
* 通过用户点击品类等级 构建提交给服务器Category对象 // spuCateIdThree = listCategory.get(options1).getSpuCateId();
* // }
* @param id 按钮id // break;
* @return 构建好的Category对象 // case THREE_CATEGORY: {
*/ // mViewBinding.tvCategorySelectThree.setText(listCategory.get(options1)
private Category getCategory(int id) { // .getSpuCateName());
switch (id) { //
case R.id.tv_category_select_one: { // }
category = new Category(); // break;
} // }
break; // }
case R.id.tv_category_select_two: { // }).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
category.setSpuCateId(spuCateIdTwo); // @Override
} // public void customLayout(View v) {
break; // final TextView tvSubmit = v.findViewById(R.id.tv_finish);
case R.id.tv_category_select_three: { // ImageView ivCancel = v.findViewById(R.id.iv_cancel);
category.setSpuCateId(spuCateIdThree); // tvSubmit.setOnClickListener(new View.OnClickListener() {
} // @Override
break; // public void onClick(View v) {
} // pvCustomOptions.returnData();
return category; // pvCustomOptions.dismiss();
// }
} // });
//
/** // ivCancel.setOnClickListener(new View.OnClickListener() {
* 初始化会员等级选择对话框 // @Override
*/ // public void onClick(View v) {
private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局 // pvCustomOptions.dismiss();
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()); // .isDialog(true)
mViewBinding.tvVipLevelSelect.setText(realmResult.get(options1).getVipLevelName()); // .build();
} //
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() { //
@Override // pvCustomOptions.setPicker(list);//添加数据
public void customLayout(View v) { // pvCustomOptions.show();
final TextView tvSubmit = v.findViewById(R.id.tv_finish); // }
ImageView ivCancel = v.findViewById(R.id.iv_cancel); //
tvSubmit.setOnClickListener(new View.OnClickListener() { // /**
@Override // * 根据用户点击控制UI控件的隐藏显示
public void onClick(View v) { // *
pvCustomOptions.returnData(); // * @param id 用户点击的id
pvCustomOptions.dismiss(); // */
} //
}); // private void showView(int id) {
ivCancel.setOnClickListener(new View.OnClickListener() { // switch (id) {
@Override // case R.id.rd_gettype_all: {
public void onClick(View v) { // mViewBinding.llAll.setVisibility(View.VISIBLE);
pvCustomOptions.dismiss(); // mViewBinding.llCategory.setVisibility(View.GONE);
} // mViewBinding.llShop.setVisibility(View.GONE);
}); // }
} // break;
}) // case R.id.rd_gettype_category: {
.isDialog(true) // //品类定义
.build(); // mViewBinding.llAll.setVisibility(View.GONE);
// mViewBinding.llCategory.setVisibility(View.VISIBLE);
// mViewBinding.llShop.setVisibility(View.GONE);
pvCustomOptions.setPicker(realmResult);//添加数据 // }
pvCustomOptions.show(); // break;
} // case R.id.rd_gettype_shop: {
// //商品定义
// mViewBinding.llAll.setVisibility(View.GONE);
/** // mViewBinding.llCategory.setVisibility(View.GONE);
* 初始化商品品类选择对话框 // mViewBinding.llShop.setVisibility(View.VISIBLE);
* // }
* @param list 选择对话框数据 // break;
* @param nowList 当前选中的品类索引 // }
*/ //
private void initCustomOptionPicker(List<Category> list, int nowList) {//条件选择器初始化,自定义布局 // }
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView //
.OnOptionsSelectListener() { // @Override
@Override // public void onConfirmClick(View view) {
public void onOptionsSelect(int options1, int option2, int options3, View v) { // super.onConfirmClick(view);
gbound.setSpuCateId((int) Long.parseLong(list.get(options1).getSpuCateId() + "")); // if (isNullAndSetDate()) {
//返回的分别是三个级别的选中位置 // LoadingDialog loadingDialog = new LoadingDialog();
switch (nowList) { // loadingDialog.show((BaseActivity) getActivity());
case ONE_CATEGORY: { // if (nowType == 0) {
mViewBinding.tvCategorySelectOne.setText(listCategory.get(options1) // //修改
.getSpuClaName()); // mPresenter.update(gbound, loadingDialog);
spuCateIdTwo = listCategory.get(options1).getSpuCateId(); // LogUtils.e("修改");
} // } else if (nowType == 1) {
break; // //新增
case TWO_CATEGORY: { // mPresenter.add(gbound, loadingDialog);
mViewBinding.tvCategorySelectTwo.setText(listCategory.get(options1) // LogUtils.e("新增");
.getSpuGrpName()); // }
spuCateIdThree = listCategory.get(options1).getSpuCateId(); //
} // this.dismiss();
break; // } else {
case THREE_CATEGORY: { // ToastUtils.showLong("输入数据不能null");
mViewBinding.tvCategorySelectThree.setText(listCategory.get(options1) // }
.getSpuCateName()); //
// }
} //
break; // /**
} // * 请求成功设置数据
} // *
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() { // * @param list
@Override // * @param nowList
public void customLayout(View v) { // */
final TextView tvSubmit = v.findViewById(R.id.tv_finish); //
ImageView ivCancel = v.findViewById(R.id.iv_cancel); // public void setCategoryDate(List<Category> list, int nowList) {
tvSubmit.setOnClickListener(new View.OnClickListener() { // listCategory = list;
@Override // initCustomOptionPicker(list, nowList);
public void onClick(View v) { // }
pvCustomOptions.returnData(); //
pvCustomOptions.dismiss(); //
} // /**
}); // * 判断用户输入数据是否为null
// *
ivCancel.setOnClickListener(new View.OnClickListener() { // * @return 输入为null返回false 反之返回true
@Override // */
public void onClick(View v) { // private boolean isNullAndSetDate() {
pvCustomOptions.dismiss(); // if (gbound.getVipGboundType() == null || gbound.getVipLevel() == null) {
} // return false;
}); // }
} // switch (gbound.getVipGboundType()) {
}) // case 0: {
.isDialog(true) // if (TextUtils.isEmpty(mViewBinding.etIntegralWeight.getText().toString())
.build(); // || TextUtils.isEmpty(mViewBinding.etIntegralTimeLimit.getText().toString
// ())) {
// return false;
pvCustomOptions.setPicker(list);//添加数据 // } else {
pvCustomOptions.show(); // mViewBinding.tvRulesName.setText(mViewBinding.etIntegralWeight.getText()
} // .toString() +
// "元送一个积分");
/** // gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralWeight
* 根据用户点击控制UI控件的隐藏显示 // .getText().toString()));
* // gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralTimeLimit.getText()
* @param id 用户点击的id // .toString()));
*/ // }
// }
private void showView(int id) { // break;
switch (id) { // case 1: {
case R.id.rd_gettype_all: { // if (TextUtils.isEmpty(mViewBinding.etIntegralCategoryWeight.getText().toString())
mViewBinding.llAll.setVisibility(View.VISIBLE); // || TextUtils.isEmpty(mViewBinding.etIntegralCategoryTimeLimit.getText()
mViewBinding.llCategory.setVisibility(View.GONE); // .toString()) || gbound.getSpuCateId() == -1) {
mViewBinding.llShop.setVisibility(View.GONE); // return false;
} // } else {
break; // mViewBinding.tvRulesName.setText(mViewBinding.etIntegralCategoryWeight
case R.id.rd_gettype_category: { // .getText().toString() +
//品类定义 // "元送一个积分");
mViewBinding.llAll.setVisibility(View.GONE); // gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding
mViewBinding.llCategory.setVisibility(View.VISIBLE); // .etIntegralCategoryWeight.getText().toString()));
mViewBinding.llShop.setVisibility(View.GONE); // gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralCategoryTimeLimit
} // .getText().toString()));
break; // }
case R.id.rd_gettype_shop: { // }
//商品定义 // break;
mViewBinding.llAll.setVisibility(View.GONE); // case 2: {
mViewBinding.llCategory.setVisibility(View.GONE); // if (TextUtils.isEmpty(mViewBinding.etShopTimeLimit.getText().toString())) {
mViewBinding.llShop.setVisibility(View.VISIBLE); // return false;
} // } else {
break; // mViewBinding.tvRulesName.setText("商品定义规则");
} // gbound.setBoundExp(Byte.parseByte(mViewBinding.etShopTimeLimit.getText()
// .toString()));
} // }
// }
@Override // break;
public void onConfirmClick(View view) { // }
super.onConfirmClick(view); // gbound.setTruleName(mViewBinding.tvRulesName.getText().toString());
if (isNullAndSetDate()) { // return true;
LoadingDialog loadingDialog = new LoadingDialog(); // }
loadingDialog.show((BaseActivity) getActivity()); //
if (nowType == 0) { // /**
//修改 // * @param gbound
mPresenter.update(gbound, loadingDialog); // */
LogUtils.e("修改"); // public void setData(Gbound gbound, LoadingDialog loadingDialog) {
} else if (nowType == 1) { // this.gbound = gbound.clone();
//新增 // this.ShowGbound = gbound;
mPresenter.add(gbound, loadingDialog); // this.loadingDialog = loadingDialog;
LogUtils.e("新增"); // //置状态为修改状态
} // setNowType(0);
// }
this.dismiss(); //
} else { // public void setNowType(int nowType) {
ToastUtils.showLong("输入数据不能null"); // this.nowType = nowType;
} // }
//
} // /**
// * 显示软键盘,Dialog使用
/** // */
* 请求成功设置数据 // public void hintKbTwo() {
* // View view = getDialog().getCurrentFocus();
* @param list // if (view == null) {
* @param nowList // return;
*/ // }
// if (view instanceof TextView) {
public void setCategoryDate(List<Category> list, int nowList) { // InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
listCategory = list; // .getSystemService(Context.INPUT_METHOD_SERVICE);
initCustomOptionPicker(list, nowList); // mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
} // .RESULT_UNCHANGED_SHOWN);
// }
// }
/** //
* 判断用户输入数据是否为null // @Override
* // public void dismiss() {
* @return 输入为null返回false 反之返回true // hintKbTwo();
*/ // super.dismiss();
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();
// }
}
package com.xingdata.zzdpos.ui.marketing.integral.fragment;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bigkoo.pickerview.OptionsPickerView;
import com.bigkoo.pickerview.listener.CustomListener;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
import io.realm.Realm;
import io.realm.RealmResults;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
DialogIntegralGetSettingBinding> {
//区分请求类型 正常 加载更多,下拉刷新
public static final int ONE_CATEGORY = 1;
public static final int TWO_CATEGORY = 2;
public static final int THREE_CATEGORY = 3;
//请求商品类别使用的id
private long spuCateIdTwo = -1;
private long spuCateIdThree = -1;
private OptionsPickerView pvCustomOptions;
private List<Category> listCategory = new ArrayList<>();
//积分获取提交给服务器对象
private Gbound gbound = new Gbound();
//ui显示用
private Gbound ShowGbound = new Gbound();
//商品品类提交服务器对象
private Category category = new Category();
//当前为修改还是新增 0为修改1为新增
private int nowType = -1;
//进度对话框
LoadingDialog loadingDialog;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private int nowShopTypeId = 0;
@Override
public int getLayoutId() {
return R.layout.dialog_integral_get_setting;
}
@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
protected void myOnClickListener(View v) {
// hintKbTwo();
switch (v.getId()) {
case R.id.rd_suspendeds: {
//暂停
gbound.setBoundGetStatus(1);
}
break;
case R.id.rd_starts: {
//启用
gbound.setBoundGetStatus(0);
}
break;
case R.id.rd_gettype_all: {
//通用
showView(v.getId());
gbound.setVipGboundType((byte) 0);
}
break;
case R.id.rd_gettype_category: {
//品类定义
showView(v.getId());
gbound.setVipGboundType((byte) 1);
}
break;
case R.id.rd_gettype_shop: {
//商品定义
showView(v.getId());
gbound.setVipGboundType((byte) 2);
}
break;
case R.id.tv_vip_level_select: {
Realm realm = Realm.getInstance(App.instance.mRealmConfig);
RealmResults<Level> realmResult = realm.where(Level.class)
.findAll();
if (realmResult != null && realmResult.size() > 0) {
initVipLevelOptionPicker(realmResult);
}
}
break;
case R.id.tv_category_select_one: {
mPresenter.initData(getCategory(v.getId()), ONE_CATEGORY);
mViewBinding.tvCategorySelectTwo.setText("");
mViewBinding.tvCategorySelectThree.setText("");
}
break;
case R.id.tv_category_select_two: {
if (nowShopTypeId >= 1) {
mPresenter.initData(getCategory(v.getId()), TWO_CATEGORY);
mViewBinding.tvCategorySelectThree.setText("");
} else {
ToastUtils.showLong("请先选择第一类品类");
}
}
break;
case R.id.tv_category_select_three: {
if (nowShopTypeId >= 2) {
mPresenter.initData(getCategory(v.getId()), THREE_CATEGORY);
} else {
ToastUtils.showLong("请先选择第一二类品类");
}
}
break;
case R.id.btn_add: {
if (isNullAndSetDate()) {
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity());
if (nowType == 0) {
//修改
mPresenter.update(gbound, loadingDialog);
LogUtils.e("修改");
} else if (nowType == 1) {
//新增
mPresenter.add(gbound, loadingDialog);
LogUtils.e("新增");
}
} else {
ToastUtils.showLong("输入数据不能null");
}
}
break;
default: {
}
break;
}
}
});
if (nowType == 0) {
setShopTypeClick(false);
updateUi();
} else if (nowType == 1) {
setShopTypeClick(true);
mViewBinding.rdSuspendeds.setChecked(true);
gbound.setBoundGetStatus(1);
gbound.setVipGboundType((byte) 0);
}
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
private void setShopTypeClick(Boolean b) {
mViewBinding.rdGettypeAll.setEnabled(b);
mViewBinding.rdGettypeShop.setEnabled(b);
mViewBinding.rdGettypeCategory.setEnabled(b);
if (b) {
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.GONE);
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.GONE);
mViewBinding.tvCategorySelectOne.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectTwo.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectThree.setVisibility(View.VISIBLE);
mViewBinding.tvVipLevelSelect.setVisibility(View.VISIBLE);
} else {
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding.tvCategorySelectOne.setVisibility(View.GONE);
mViewBinding.tvCategorySelectTwo.setVisibility(View.GONE);
mViewBinding.tvCategorySelectThree.setVisibility(View.GONE);
mViewBinding.tvVipLevelSelect.setVisibility(View.GONE);
}
}
private void updateUi() {
if (ShowGbound != null && ShowGbound.getTruleName() != null && !(ShowGbound.getTruleName
().equals("")
)) {
mViewBinding.tvRulesName.setText(ShowGbound.getTruleName());
//开通启用状态 0:正常 1 暂停 默认 0
if (ShowGbound.getBoundGetStatus() == 0) {
mViewBinding.rdStarts
.setChecked(true);
} else if (ShowGbound.getBoundGetStatus() == 1) {
mViewBinding.rdSuspendeds.setChecked(true);
}
mViewBinding.tvVipLevelSelectShowNoEdit.setText(ShowGbound.getVipLevelName());
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
switch (ShowGbound.getVipGboundType()) {
case 0: {
showView(R.id.rd_gettype_all);
mViewBinding.rdGettypeAll.setChecked(true);
if (ShowGbound.getTransAmt() != null) {
mViewBinding.etIntegralWeight.setText(ConvertUtil.fenToYuanNoPoint
(ShowGbound.getTransAmt()));
}
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
}
break;
case 1: {
showView(R.id.rd_gettype_category);
mViewBinding.rdGettypeCategory.setChecked(true);
if (ShowGbound.getSpuClaName() != null) {
mViewBinding.tvCategorySelectOne.setText((ShowGbound.getSpuClaName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(ShowGbound.getSpuClaName
() + "/");
}
if (ShowGbound.getSpuGrpName() != null) {
mViewBinding.tvCategorySelectTwo.setText((ShowGbound.getSpuGrpName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.getSpuGrpName() + "/");
}
if (ShowGbound.getSpuCateName() != null) {
mViewBinding.tvCategorySelectThree.setText((ShowGbound.getSpuCateName()));
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.getSpuCateName());
}
if (ShowGbound.getTransAmt() != null) {
mViewBinding.etIntegralCategoryWeight.setText(ConvertUtil
.fenToYuanNoPoint(ShowGbound
.getTransAmt()));
}
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etIntegralCategoryTimeLimit.setText(ShowGbound.getBoundExp()
+ "");
}
}
break;
case 2: {
showView(R.id.rd_gettype_shop);
mViewBinding.rdGettypeShop.setChecked(true);
if (ShowGbound.getBoundExp() != null) {
mViewBinding.etShopTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
}
break;
}
}
}
/**
* 通过用户点击品类等级 构建提交给服务器Category对象
*
* @param id 按钮id
* @return 构建好的Category对象
*/
private Category getCategory(int id) {
switch (id) {
case R.id.tv_category_select_one: {
category = new Category();
}
break;
case R.id.tv_category_select_two: {
category.setSpuCateId(spuCateIdTwo);
}
break;
case R.id.tv_category_select_three: {
category.setSpuCateId(spuCateIdThree);
}
break;
}
return category;
}
/**
* 初始化会员等级选择对话框
*/
private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound.setVipLevel(realmResult.get(options1).getVipLevel());
mViewBinding.tvVipLevelSelect.setText(realmResult.get(options1).getVipLevelName());
}
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
public void customLayout(View v) {
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.returnData();
pvCustomOptions.dismiss();
}
});
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.dismiss();
}
});
}
})
.isDialog(true)
.build();
pvCustomOptions.setPicker(realmResult);//添加数据
pvCustomOptions.show();
}
/**
* 初始化商品品类选择对话框
*
* @param list 选择对话框数据
* @param nowList 当前选中的品类索引
*/
private void initCustomOptionPicker(List<Category> list, int nowList) {//条件选择器初始化,自定义布局
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound.setSpuCateId((int) Long.parseLong(list.get(options1).getSpuCateId() + ""));
//返回的分别是三个级别的选中位置
switch (nowList) {
case ONE_CATEGORY: {
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());
}
break;
}
}
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
public void customLayout(View v) {
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.returnData();
pvCustomOptions.dismiss();
}
});
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pvCustomOptions.dismiss();
}
});
}
})
.isDialog(true)
.build();
pvCustomOptions.setPicker(list);//添加数据
pvCustomOptions.show();
}
/**
* 根据用户点击控制UI控件的隐藏显示
*
* @param id 用户点击的id
*/
private void showView(int id) {
switch (id) {
case R.id.rd_gettype_all: {
mViewBinding.llAll.setVisibility(View.VISIBLE);
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding.llShop.setVisibility(View.GONE);
}
break;
case R.id.rd_gettype_category: {
//品类定义
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding.llCategory.setVisibility(View.VISIBLE);
mViewBinding.llShop.setVisibility(View.GONE);
}
break;
case R.id.rd_gettype_shop: {
//商品定义
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding.llShop.setVisibility(View.VISIBLE);
}
break;
}
}
/**
* 请求成功设置数据
*
* @param list
* @param nowList
*/
public void setCategoryDate(List<Category> list, int nowList) {
listCategory = list;
initCustomOptionPicker(list, nowList);
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private boolean isNullAndSetDate() {
if (gbound.getVipGboundType() == null || gbound.getVipLevel() == null) {
return false;
}
switch (gbound.getVipGboundType()) {
case 0: {
if (TextUtils.isEmpty(mViewBinding.etIntegralWeight.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralTimeLimit.getText().toString
())) {
return false;
} else {
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralWeight.getText()
.toString() +
"元送一个积分");
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralWeight
.getText().toString()));
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralTimeLimit.getText()
.toString()));
}
}
break;
case 1: {
if (TextUtils.isEmpty(mViewBinding.etIntegralCategoryWeight.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etIntegralCategoryTimeLimit.getText()
.toString()) || gbound.getSpuCateId() == -1) {
return false;
} else {
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralCategoryWeight
.getText().toString() +
"元送一个积分");
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding
.etIntegralCategoryWeight.getText().toString()));
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralCategoryTimeLimit
.getText().toString()));
}
}
break;
case 2: {
if (TextUtils.isEmpty(mViewBinding.etShopTimeLimit.getText().toString())) {
return false;
} else {
mViewBinding.tvRulesName.setText("商品定义规则");
gbound.setBoundExp(Byte.parseByte(mViewBinding.etShopTimeLimit.getText()
.toString()));
}
}
break;
}
gbound.setTruleName(mViewBinding.tvRulesName.getText().toString());
return true;
}
/**
* @param gbound
*/
public void setData(Gbound gbound, LoadingDialog loadingDialog) {
this.gbound = gbound.clone();
this.ShowGbound = gbound;
this.loadingDialog = loadingDialog;
//置状态为修改状态
setNowType(0);
}
public void setNowType(int nowType) {
this.nowType = nowType;
}
//
// /**
// * 显示软键盘,Dialog使用
// */
// public void hintKbTwo() {
// View view = getTopFragment().getCurrentFocus();
// if (view == null) {
// return;
// }
// if (view instanceof TextView) {
// InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
// .getSystemService(Context.INPUT_METHOD_SERVICE);
// mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
// .RESULT_UNCHANGED_SHOWN);
// }
// }
// @Override
// public void dismiss() {
// hintKbTwo();
// super.dismiss();
// }
}
package com.xingdata.zzdpos.ui.marketing.integral.fragment;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentIntegralMainBinding;
import com.xingdata.zzdpos.model.Category;
import com.xingdata.zzdpos.model.Gbound;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Ubound;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralAdapter;
import com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralExchangeAdapter;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
FragmentIntegralMainBinding> {
// IntegralGetDialog integralGetDialog;
IntegralAdapter integralAdapter;
IntegralExchangeAdapter integralExchangeAdapter;
private Boolean isLoadMore = false;
public static final int NORMAL_TYPE = 1;
public static final int LOADMORE_TYPE = 2;
public static final int REFRESH_TYPE = 3;
LoadingDialog loadingDialog = new LoadingDialog();
private long mExitTime;//控制快速点击
@Override
public int getLayoutId() {
return R.layout.fragment_integral_main;
}
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("积分规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.finishActivity(IntegralActivity.class);
}
});
integralAdapter = new IntegralAdapter(R.layout.item_integral, new ArrayList<>());
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvMessage.setLayoutManager(linearLayoutManager);
mViewBinding.rvMessage.setAdapter(integralAdapter);
List<Ubound> list = new ArrayList<>();
Ubound ubound = new Ubound();
ubound.setBoundValAmt(1000l);
ubound.setBoundUseStatus((byte) 0);
ubound.setBoundOrderAmt(10l);
ubound.setBoundUseNum(10000l);
list.add(ubound);
integralExchangeAdapter = new IntegralExchangeAdapter(R.layout.item_integral, list);
LinearLayoutManager linearLayoutManager1 = new LinearLayoutManager(getActivity());
linearLayoutManager1.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvExchangeMessage.setLayoutManager(linearLayoutManager1);
mViewBinding.rvExchangeMessage.setAdapter(integralExchangeAdapter);
mViewBinding.setOnClickListener(v -> {
switch (v.getId()) {
case R.id.btn_add: {
mPresenter.integralGetFragment = new IntegralGetFragment();
mPresenter.integralGetFragment.setNowType(1);
start(mPresenter.integralGetFragment);
// integralGetDialog = new IntegralGetDialog();
// integralGetDialog.setNowType(1);
// integralGetDialog.show((BaseActivity) getActivity());
}
break;
case R.id.rb_get: {
mViewBinding.rbGet.getPaint().setFakeBoldText(true);
mViewBinding.rbExchange.getPaint().setFakeBoldText(false);
showView(v.getId());
mPresenter.query(1, NORMAL_TYPE, null);
}
break;
case R.id.rb_exchange: {
mViewBinding.rbGet.getPaint().setFakeBoldText(false);
mViewBinding.rbExchange.getPaint().setFakeBoldText(true);
showView(v.getId());
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog.show((BaseActivity) getActivity());
mPresenter.exchangeQuery(loadingDialog);
}
break;
default: {
}
break;
}
});
//set Presenter listener
mViewBinding.srlProduct.setOnRefreshListener(this::refreshProduct);
integralAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rvMessage);
integralAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
(integralAdapter.getData().get(position)));
integralExchangeAdapter.setOnItemClickListener((adapter, view, position) ->
exchangeClickProduct(integralExchangeAdapter.getData().get(position)));
mPresenter.query(1, NORMAL_TYPE, null);
}
public void initComplete(List<Category> list, int nowCategory) {
if (list.size() <= 0) {
return;
}
mPresenter.integralGetFragment.setCategoryDate(list, nowCategory);
}
public void querySucc(@Nullable Pager<Gbound> pager, Boolean isLoadMore, int queryType,
LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
this.isLoadMore = isLoadMore;
if (pager == null || pager.getList() == null || pager.getList().size() <= 0) {
integralAdapter.setEmptyView(getEmptyView("没有规则"));
}
if (pager.getList() != null) {
switch (queryType) {
case NORMAL_TYPE: {
//正常请求
integralAdapter.setNewData(pager.getList());
}
break;
case LOADMORE_TYPE: {
//加载更多
integralAdapter.addData(pager.getList());
}
break;
case REFRESH_TYPE: {
//刷新请求
integralAdapter.setNewData(pager.getList());
}
break;
}
}
integralAdapter.setEnableLoadMore(false);
mViewBinding.srlProduct.setRefreshing(false);
}
public void exchangeQuerySucc(Pager<Ubound> uboundPager, LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
if (uboundPager != null && uboundPager.getList() != null) {
integralExchangeAdapter.setNewData(uboundPager.getList());
}
}
/**
* 刷新商品
*/
private void refreshProduct() {
integralAdapter.setEnableLoadMore(false);
mPresenter.query(1, REFRESH_TYPE, null);
}
/**
* 加载更多商品
*/
private void loadMoreProduct() {
mViewBinding.srlProduct.setRefreshing(false);
if (isLoadMore) {
mPresenter.query(-1, LOADMORE_TYPE, null);
}
}
/**
* 积分获取页面点击item
*/
private void clickProduct(Gbound gbound) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
// integralGetDialog = new IntegralGetDialog();
loadingDialog.show((BaseActivity) getActivity());
mPresenter.integralGetFragment = new IntegralGetFragment();
mPresenter.integralGetFragment.setData(gbound, loadingDialog);
start(mPresenter.integralGetFragment);
// integralGetDialog.show((BaseActivity) getActivity());
mExitTime = System.currentTimeMillis();
} else {
ToastUtils.showLong("您操作太快了");
}
}
/**
* 积分兑换页面点击item
*/
private void exchangeClickProduct(Ubound gbound) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
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("您操作太快了");
}
}
private View getEmptyView(String str) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(str);
return view;
}
private void showView(int id) {
switch (id) {
case R.id.rb_get: {
mViewBinding.llGet.setVisibility(View.VISIBLE);
mViewBinding.llExchange.setVisibility(View.GONE);
}
break;
case R.id.rb_exchange: {
mViewBinding.llGet.setVisibility(View.GONE);
mViewBinding.llExchange.setVisibility(View.VISIBLE);
}
break;
}
}
}
package com.xingdata.zzdpos.ui.marketing.ticket; package com.xingdata.zzdpos.ui.marketing.ticket;
import android.support.v7.widget.GridLayoutManager;
import android.text.Html;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.LogUtils; import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
...@@ -13,18 +8,10 @@ import com.xingdata.zzdpos.databinding.ActivityReturnTicketBinding; ...@@ -13,18 +8,10 @@ import com.xingdata.zzdpos.databinding.ActivityReturnTicketBinding;
import com.xingdata.zzdpos.model.Pager; import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Trule; import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.adapter.ReturnTicketAdapter;
import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog;
import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.ArrayList;
public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter, public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter,
ActivityReturnTicketBinding> ActivityReturnTicketBinding>
implements ReturnTicketContract.View { implements ReturnTicketContract.View {
ReturnTicketAdapter returnTicketAdapter;
LoadingDialog loadingDialog = new LoadingDialog(); LoadingDialog loadingDialog = new LoadingDialog();
@Override @Override
...@@ -34,49 +21,7 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter, ...@@ -34,49 +21,7 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter,
@Override @Override
public void initView() { public void initView() {
mViewBinding.icTitle.tvTitle.setText("优惠券规则"); loadRootFragment(R.id.frg, mPresenter.tickerIndexFragment);
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.finishActivity(ReturnTicketActivity.class);
}
});
mViewBinding.btnGroup.setText(Html.fromHtml(
getResources().
getString(R.string
.tv_ticket_count, "<font color='#1f7bdb'><big> " + "0" + " " +
"</big></font>")));
final int SPACING = mContext.getResources().getDimensionPixelOffset(R.dimen
.vip_message_item_spacing);
returnTicketAdapter = new
ReturnTicketAdapter(new ArrayList<>(), mPresenter);
mViewBinding.rcTicket.setAdapter(returnTicketAdapter);
mViewBinding.rcTicket.setLayoutManager(new
GridLayoutManager(ReturnTicketActivity.this,
4));
mViewBinding.rcTicket.addItemDecoration(new RecyclerViewUtil.GridSpacingItemDecoration(4,
SPACING, true));
mViewBinding.setOnClickListener(view ->
{
switch (view.getId()) {
case R.id.btn_add: {
mPresenter.ticketAddDialog = new TicketAddDialog();
mPresenter.ticketAddDialog.show(this);
}
break;
default: {
}
break;
}
});
} }
...@@ -89,45 +34,27 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter, ...@@ -89,45 +34,27 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter,
@Override @Override
public void addSucc(LoadingDialog loadingDialog) { public void addSucc(LoadingDialog loadingDialog) {
if (mPresenter.ticketAddDialog != null && mPresenter.ticketAddDialog.isShowing) { // if (mPresenter.ticketAddDialog != null && mPresenter.ticketAddDialog.isShowing) {
mPresenter.ticketAddDialog.dismiss(); // mPresenter.ticketAddDialog.dismiss();
} // }
pop();
mPresenter.truleQuery(loadingDialog); mPresenter.truleQuery(loadingDialog);
} }
@Override @Override
public void truleQuerySucc(Pager<Trule> trulePager, LoadingDialog loadingDialog) { public void truleQuerySucc(Pager<Trule> trulePager, LoadingDialog loadingDialog) {
closeLoading(loadingDialog); mPresenter.tickerIndexFragment.truleQuerySucc(trulePager, loadingDialog);
if (trulePager == null || trulePager.getList() == null || trulePager.getList().size() <=
0) {
mViewBinding.tvEmpty.setVisibility(View.VISIBLE);
}
if (trulePager != null && trulePager.getList() != null) {
mViewBinding.tvEmpty.setVisibility(View.GONE);
returnTicketAdapter.setNewData(trulePager.getList());
mViewBinding.btnGroup.setText(Html.fromHtml(getResources().getString(R.string
.tv_ticket_count,
"<font color='#1f7bdb'><big> " + trulePager.getList().size() + " " +
"</big></font>")));
}
} }
@Override @Override
public void truleUpdateSucc(LoadingDialog loadingDialog) { public void truleUpdateSucc(LoadingDialog loadingDialog) {
if (mPresenter.ticketAddDialog != null && mPresenter.ticketAddDialog.isShowing) { // if (mPresenter.ticketAddDialog != null && mPresenter.ticketAddDialog.isShowing) {
mPresenter.ticketAddDialog.dismiss(); // mPresenter.ticketAddDialog.dismiss();
} // }
pop();
mPresenter.truleQuery(loadingDialog); mPresenter.truleQuery(loadingDialog);
} }
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
@Override @Override
protected void onResume() { protected void onResume() {
...@@ -136,4 +63,9 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter, ...@@ -136,4 +63,9 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter,
mPresenter.truleQuery(loadingDialog); mPresenter.truleQuery(loadingDialog);
} }
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
} }
...@@ -5,7 +5,8 @@ import android.support.annotation.Nullable; ...@@ -5,7 +5,8 @@ import android.support.annotation.Nullable;
import com.xingdata.zzdpos.api.ApiFactory; import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Trule; import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog; import com.xingdata.zzdpos.ui.marketing.ticket.fragment.TickerAddFragment;
import com.xingdata.zzdpos.ui.marketing.ticket.fragment.TickerIndexFragment;
/** /**
...@@ -13,8 +14,8 @@ import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog; ...@@ -13,8 +14,8 @@ import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog;
*/ */
public class ReturnTicketPresenter extends ReturnTicketContract.Presenter { public class ReturnTicketPresenter extends ReturnTicketContract.Presenter {
public TicketAddDialog ticketAddDialog; public TickerIndexFragment tickerIndexFragment = new TickerIndexFragment();
public TickerAddFragment tickerAddFragment = new TickerAddFragment();
@Override @Override
public void onAttached() { public void onAttached() {
......
...@@ -4,14 +4,13 @@ import android.support.annotation.Nullable; ...@@ -4,14 +4,13 @@ import android.support.annotation.Nullable;
import android.view.View; import android.view.View;
import com.blankj.utilcode.util.TimeUtils; import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseAdapter; import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemReturnTicketBinding; import com.xingdata.zzdpos.databinding.ItemReturnTicketBinding;
import com.xingdata.zzdpos.model.Trule; import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketActivity;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter; import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter;
import com.xingdata.zzdpos.ui.marketing.ticket.dialog.TicketAddDialog; import com.xingdata.zzdpos.ui.marketing.ticket.fragment.TickerAddFragment;
import com.xingdata.zzdpos.util.ConvertUtil; import com.xingdata.zzdpos.util.ConvertUtil;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -19,19 +18,24 @@ import java.util.List; ...@@ -19,19 +18,24 @@ import java.util.List;
public class ReturnTicketAdapter extends BaseAdapter<Trule, ItemReturnTicketBinding> { public class ReturnTicketAdapter extends BaseAdapter<Trule, ItemReturnTicketBinding> {
ReturnTicketPresenter mPersenter; ReturnTicketPresenter mPersenter;
ReturnTicketActivity returnTicketActivity;
public ReturnTicketAdapter(@Nullable List<Trule> data, ReturnTicketPresenter mPersenter) { public ReturnTicketAdapter(@Nullable List<Trule> data, ReturnTicketPresenter mPersenter,
ReturnTicketActivity returnTicketActivity) {
super(R.layout.item_return_ticket, data); super(R.layout.item_return_ticket, data);
this.mPersenter = mPersenter; this.mPersenter = mPersenter;
this.returnTicketActivity = returnTicketActivity;
} }
@Override @Override
protected void convert(ItemReturnTicketBinding mViewBinding, Trule item) { protected void convert(ItemReturnTicketBinding mViewBinding, Trule item) {
mViewBinding.tvTicket.setText("优\n惠\n券");
// mViewBinding.tvSend.setText("发\n券"); // mViewBinding.tvSend.setText("发\n券");
mViewBinding.tvSend.setText("\n"); // mViewBinding.tvSend.setText("\n");
mViewBinding.tvTicketMoney.setText(ConvertUtil.fenToYuanNoPoint(item.getTruleValAmt())); mViewBinding.tvTicketMoney.setText(mContext.getResources().getString(R.string.tv_money,
ConvertUtil.fenToYuanNoPoint(item.getTruleValAmt())));
mViewBinding.tvTicketMoneys.setText(mContext.getResources().getString(R.string.money,
ConvertUtil.fenToYuanNoPoint(item.getTruleValAmt())));
mViewBinding.tvRule.setText(mContext.getResources().getString(R.string.tv_rule, mViewBinding.tvRule.setText(mContext.getResources().getString(R.string.tv_rule,
ConvertUtil.fenToYuanNoPoint(item.getTruleOrderAmt()))); ConvertUtil.fenToYuanNoPoint(item.getTruleOrderAmt())));
mViewBinding.tvDate.setText(mContext.getResources().getString(R.string.tv_date, mViewBinding.tvDate.setText(mContext.getResources().getString(R.string.tv_date,
...@@ -39,16 +43,16 @@ public class ReturnTicketAdapter extends BaseAdapter<Trule, ItemReturnTicketBind ...@@ -39,16 +43,16 @@ public class ReturnTicketAdapter extends BaseAdapter<Trule, ItemReturnTicketBind
mViewBinding.clSend.setOnClickListener(new View.OnClickListener() { mViewBinding.clSend.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
ToastUtils.showLong("发券"); // ToastUtils.showLong("发券");
} }
}); });
mViewBinding.clItem.setOnClickListener(new View.OnClickListener() { mViewBinding.clItem.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
mPersenter.ticketAddDialog = new TicketAddDialog(); mPersenter.tickerAddFragment = new TickerAddFragment();
mPersenter.ticketAddDialog.setNowType(2); mPersenter.tickerAddFragment.setNowType(2);
mPersenter.ticketAddDialog.editTicketData(item); mPersenter.tickerAddFragment.editTicketData(item);
mPersenter.ticketAddDialog.show((BaseActivity) mContext); returnTicketActivity.start(mPersenter.tickerAddFragment);
} }
}); });
......
package com.xingdata.zzdpos.ui.marketing.ticket.dialog; //package com.xingdata.zzdpos.ui.marketing.ticket.dialog;
//
import android.annotation.SuppressLint; //import android.annotation.SuppressLint;
import android.app.DatePickerDialog; //import android.app.DatePickerDialog;
import android.content.Context; //import android.content.Context;
import android.text.Editable; //import android.text.Editable;
import android.text.TextUtils; //import android.text.TextUtils;
import android.text.TextWatcher; //import android.text.TextWatcher;
import android.view.View; //import android.view.View;
import android.view.inputmethod.InputMethodManager; //import android.view.inputmethod.InputMethodManager;
import android.widget.DatePicker; //import android.widget.DatePicker;
import android.widget.TextView; //import android.widget.TextView;
//
import com.blankj.utilcode.util.TimeUtils; //import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils; //import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R; //import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; //import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseDialog; //import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.databinding.DialogTicketAddSettingBinding; //import com.xingdata.zzdpos.databinding.DialogTicketAddSettingBinding;
import com.xingdata.zzdpos.model.Trule; //import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; //import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter; //import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter;
import com.xingdata.zzdpos.util.ConvertUtil; //import com.xingdata.zzdpos.util.ConvertUtil;
//
import java.text.SimpleDateFormat; //import java.text.SimpleDateFormat;
import java.util.Calendar; //import java.util.Calendar;
//
/** ///**
* 积分获取设置界面 // * 积分获取设置界面
*/ // */
public class TicketAddDialog extends BaseDialog<ReturnTicketPresenter, //public class TicketAddDialog extends BaseDialog<ReturnTicketPresenter,
DialogTicketAddSettingBinding> { // DialogTicketAddSettingBinding> {
LoadingDialog loadingDialog = new LoadingDialog(); // LoadingDialog loadingDialog = new LoadingDialog();
//0:正常 1暂停 // //0:正常 1暂停
private byte nowStatus = 1; // private byte nowStatus = 1;
//当前编辑的对象 // //当前编辑的对象
private Trule trule = new Trule(); // private Trule trule = new Trule();
//1为新增,2为更新 // //1为新增,2为更新
private int nowType = 1; // private int nowType = 1;
//
@Override // @Override
public int getLayoutId() { // public int getLayoutId() {
return R.layout.dialog_ticket_add_setting; // return R.layout.dialog_ticket_add_setting;
} // }
//
@Override // @Override
protected boolean isShowTitle() { // protected boolean isShowTitle() {
return true; // return true;
} // }
//
@Override // @Override
public int getTitle() { // public int getTitle() {
return R.string.return_ticket_title; // return R.string.return_ticket_title;
} // }
//
@SuppressLint("SetTextI18n") // @SuppressLint("SetTextI18n")
@Override // @Override
public void initView() { // public void initView() {
hintKbTwo(); // hintKbTwo();
mViewBinding.etTicketMoney.addTextChangedListener(mTextWatcher); // mViewBinding.etTicketMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etRuleMoney.addTextChangedListener(mTextWatcher); // mViewBinding.etRuleMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etTicketCount.addTextChangedListener(mTextWatcher); // mViewBinding.etTicketCount.addTextChangedListener(mTextWatcher);
if (nowType == 2) { // if (nowType == 2) {
setTitle("编辑优惠券"); // setTitle("编辑优惠券");
mViewBinding.tvIntegralRuleName.setText(trule.getTruleName()); // mViewBinding.tvIntegralRuleName.setText(trule.getTruleName());
if (trule.getTruleStatus() == 1) { // if (trule.getTruleStatus() == 1) {
mViewBinding.rbSuspended.setChecked(true); // mViewBinding.rbSuspended.setChecked(true);
} else if (trule.getTruleStatus() == 0) { // } else if (trule.getTruleStatus() == 0) {
mViewBinding.rbStart.setChecked(true); // mViewBinding.rbStart.setChecked(true);
} // }
//
mViewBinding.etTicketMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleValAmt // mViewBinding.etTicketMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleValAmt
())); // ()));
mViewBinding.tvDate.setText(TimeUtils.millis2String(trule.getTruleExp(), new // mViewBinding.tvDate.setText(TimeUtils.millis2String(trule.getTruleExp(), new
SimpleDateFormat("yyyy-mm-dd"))); // SimpleDateFormat("yyyy-mm-dd")));
mViewBinding.etRuleMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleOrderAmt // mViewBinding.etRuleMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleOrderAmt
())); // ()));
mViewBinding.etTicketCount.setText(trule.getTruleUseNum() + ""); // mViewBinding.etTicketCount.setText(trule.getTruleUseNum() + "");
} // }
mViewBinding.setOnClickListener(view -> { // mViewBinding.setOnClickListener(view -> {
hintKbTwo(); // hintKbTwo();
switch (view.getId()) { // switch (view.getId()) {
case R.id.tv_date: { // case R.id.tv_date: {
showDialogPick(mViewBinding.tvDate); // showDialogPick(mViewBinding.tvDate);
//
} // }
break; // break;
case R.id.rb_suspended: { // case R.id.rb_suspended: {
//暂停 // //暂停
nowStatus = 1; // nowStatus = 1;
} // }
break; // break;
case R.id.rb_start: { // case R.id.rb_start: {
//启用 // //启用
nowStatus = 0; // nowStatus = 0;
//
} // }
break; // break;
default: { // default: {
//
} // }
break; // break;
} // }
}); // });
} // }
//
//
public void editTicketData(Trule trule) { // public void editTicketData(Trule trule) {
this.trule = trule; // this.trule = trule;
} // }
//
@Override // @Override
public void onConfirmClick(View view) { // public void onConfirmClick(View view) {
//
if (isNull()) { // if (isNull()) {
//
if (Integer.parseInt(mViewBinding.etRuleMoney.getText().toString()) <= Integer // if (Integer.parseInt(mViewBinding.etRuleMoney.getText().toString()) <= Integer
.parseInt(mViewBinding.etTicketMoney.getText().toString())) { // .parseInt(mViewBinding.etTicketMoney.getText().toString())) {
ToastUtils.showLong("可用金额需大于优惠券面值 "); // ToastUtils.showLong("可用金额需大于优惠券面值 ");
return; // return;
} // }
loadingDialog.show((BaseActivity) mContext); // loadingDialog.show((BaseActivity) mContext);
if (nowType == 1) { // if (nowType == 1) {
mPresenter.add(getUiData(), loadingDialog); // mPresenter.add(getUiData(), loadingDialog);
} else if (nowType == 2) { // } else if (nowType == 2) {
mPresenter.truleUpdate(getUiData(), loadingDialog); // mPresenter.truleUpdate(getUiData(), loadingDialog);
} // }
} else { // } else {
ToastUtils.showLong("输入数据不能null"); // ToastUtils.showLong("输入数据不能null");
} // }
super.onConfirmClick(view); // super.onConfirmClick(view);
} // }
//
private Trule getUiData() { // private Trule getUiData() {
mViewBinding.tvIntegralRuleName.setText(mViewBinding.etTicketMoney.getText().toString() + // mViewBinding.tvIntegralRuleName.setText(mViewBinding.etTicketMoney.getText().toString() +
"元优惠券"); // "元优惠券");
trule.setTruleName(mViewBinding.tvIntegralRuleName.getText().toString()); // trule.setTruleName(mViewBinding.tvIntegralRuleName.getText().toString());
//0:正常 1暂停 默认0 // //0:正常 1暂停 默认0
trule.setTruleStatus(nowStatus); // trule.setTruleStatus(nowStatus);
trule.setTruleValAmt(ConvertUtil.yuanToFen(mViewBinding.etTicketMoney.getText().toString // trule.setTruleValAmt(ConvertUtil.yuanToFen(mViewBinding.etTicketMoney.getText().toString
())); // ()));
trule.setTruleExp(TimeUtils.string2Millis(mViewBinding.tvDate.getText().toString(), new // trule.setTruleExp(TimeUtils.string2Millis(mViewBinding.tvDate.getText().toString(), new
SimpleDateFormat("yyyy-mm-dd"))); // SimpleDateFormat("yyyy-mm-dd")));
trule.setTruleOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etRuleMoney.getText().toString // trule.setTruleOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etRuleMoney.getText().toString
())); // ()));
if (!mViewBinding.etTicketCount.getText().toString().equals("")) { // if (!mViewBinding.etTicketCount.getText().toString().equals("")) {
trule.setTruleUseNum(Byte.parseByte(mViewBinding.etTicketCount.getText().toString())); // trule.setTruleUseNum(Byte.parseByte(mViewBinding.etTicketCount.getText().toString()));
} else { // } else {
trule.setTruleUseNum((byte) 1); // trule.setTruleUseNum((byte) 1);
} // }
return trule; // return trule;
} // }
//
/** // /**
* 判断用户输入数据是否为null // * 判断用户输入数据是否为null
* // *
* @return 输入为null返回false 反之返回true // * @return 输入为null返回false 反之返回true
*/ // */
private boolean isNull() { // private boolean isNull() {
return !(TextUtils.isEmpty(mViewBinding.etTicketMoney.getText().toString()) // return !(TextUtils.isEmpty(mViewBinding.etTicketMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.tvDate.getText().toString()) // || TextUtils.isEmpty(mViewBinding.tvDate.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etRuleMoney.getText().toString()) // || TextUtils.isEmpty(mViewBinding.etRuleMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etTicketCount.getText().toString())); // || TextUtils.isEmpty(mViewBinding.etTicketCount.getText().toString()));
} // }
//
//
//将两个选择时间的dialog放在该函数中 // //将两个选择时间的dialog放在该函数中
private void showDialogPick(final View btn) { // private void showDialogPick(final View btn) {
//获取Calendar对象,用于获取当前时间 // //获取Calendar对象,用于获取当前时间
final Calendar calendar = Calendar.getInstance(); // final Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR); // int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH); // int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH); // int day = calendar.get(Calendar.DAY_OF_MONTH);
//实例化DatePickerDialog对象 // //实例化DatePickerDialog对象
DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new // DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new
DatePickerDialog.OnDateSetListener() { // DatePickerDialog.OnDateSetListener() {
//选择完日期后会调用该回调函数 // //选择完日期后会调用该回调函数
@Override // @Override
public void onDateSet(DatePicker view, int year, int monthOfYear, int // public void onDateSet(DatePicker view, int year, int monthOfYear, int
dayOfMonth) { // dayOfMonth) {
//因为monthOfYear会比实际月份少一月所以这边要加1 // //因为monthOfYear会比实际月份少一月所以这边要加1
((TextView) btn).setText(year + "-" + (monthOfYear + 1) + "-" + dayOfMonth); // ((TextView) btn).setText(year + "-" + (monthOfYear + 1) + "-" + dayOfMonth);
} // }
}, year, month, day); // }, year, month, day);
//弹出选择日期对话框 // //弹出选择日期对话框
datePickerDialog.show(); // datePickerDialog.show();
} // }
//
/** // /**
* 显示软键盘,Dialog使用 // * 显示软键盘,Dialog使用
*/ // */
public void hintKbTwo() { // public void hintKbTwo() {
View view = getDialog().getCurrentFocus(); // View view = getDialog().getCurrentFocus();
if (view == null) { // if (view == null) {
return; // return;
} // }
if (view instanceof TextView) { // if (view instanceof TextView) {
InputMethodManager mInputMethodManager = (InputMethodManager) getContext() // InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE); // .getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager // mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.RESULT_UNCHANGED_SHOWN); // .RESULT_UNCHANGED_SHOWN);
} // }
} // }
//
private TextWatcher mTextWatcher = new TextWatcher() { // private TextWatcher mTextWatcher = new TextWatcher() {
//
@Override // @Override
public void onTextChanged(CharSequence s, int start, int before, int count) { // public void onTextChanged(CharSequence s, int start, int before, int count) {
//
} // }
//
@Override // @Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) { // public void beforeTextChanged(CharSequence s, int start, int count, int after) {
//
} // }
//
@Override // @Override
public void afterTextChanged(Editable s) { // public void afterTextChanged(Editable s) {
String text = s.toString(); // String text = s.toString();
int len = s.toString().length(); // int len = s.toString().length();
if (len == 1 && text.equals("0")) { // if (len == 1 && text.equals("0")) {
s.clear(); // s.clear();
} // }
} // }
}; // };
//
public void setNowType(int type) { // public void setNowType(int type) {
trule = new Trule(); // trule = new Trule();
this.nowType = type; // this.nowType = type;
} // }
//
@Override // @Override
public void dismiss() { // public void dismiss() {
hintKbTwo(); // hintKbTwo();
super.dismiss(); // super.dismiss();
} // }
//
} //}
package com.xingdata.zzdpos.ui.marketing.ticket.fragment;
import android.app.DatePickerDialog;
import android.content.Context;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.DatePicker;
import android.widget.TextView;
import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.DialogTicketAddSettingBinding;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class TickerAddFragment extends BaseFragment<ReturnTicketPresenter,
DialogTicketAddSettingBinding> {
LoadingDialog loadingDialog = new LoadingDialog();
//0:正常 1暂停
private byte nowStatus = 1;
//当前编辑的对象
private Trule trule = new Trule();
//1为新增,2为更新
private int nowType = 1;
@Override
public int getLayoutId() {
return R.layout.dialog_ticket_add_setting;
}
@Override
public void initView() {
mViewBinding.icTitles.tvTitle.setText("新增优惠券");
mViewBinding.icTitles.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
hintKbTwo();
mViewBinding.etTicketMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etRuleMoney.addTextChangedListener(mTextWatcher);
mViewBinding.etTicketCount.addTextChangedListener(mTextWatcher);
if (nowType == 2) {
mViewBinding.icTitles.tvTitle.setText("编辑优惠券");
mViewBinding.tvIntegralRuleName.setText(trule.getTruleName());
if (trule.getTruleStatus() == 1) {
mViewBinding.rbSuspended.setChecked(true);
} else if (trule.getTruleStatus() == 0) {
mViewBinding.rbStart.setChecked(true);
}
mViewBinding.etTicketMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleValAmt
()));
mViewBinding.tvDate.setText(TimeUtils.millis2String(trule.getTruleExp(), new
SimpleDateFormat("yyyy-mm-dd")));
mViewBinding.etRuleMoney.setText(ConvertUtil.fenToYuanNoPoint(trule.getTruleOrderAmt
()));
mViewBinding.etTicketCount.setText(trule.getTruleUseNum() + "");
}
mViewBinding.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View view) {
hintKbTwo();
switch (view.getId()) {
case R.id.tv_date: {
showDialogPick(mViewBinding.tvDate);
}
break;
case R.id.rb_suspended: {
//暂停
nowStatus = 1;
}
break;
case R.id.rb_start: {
//启用
nowStatus = 0;
}
break;
case R.id.btn_add:{
if (isNull()) {
if (Integer.parseInt(mViewBinding.etRuleMoney.getText().toString()) <= Integer
.parseInt(mViewBinding.etTicketMoney.getText().toString())) {
ToastUtils.showLong("可用金额需大于优惠券面值 ");
return;
}
loadingDialog.show((BaseActivity) mContext);
if (nowType == 1) {
mPresenter.add(getUiData(), loadingDialog);
} else if (nowType == 2) {
mPresenter.truleUpdate(getUiData(), loadingDialog);
}
} else {
ToastUtils.showLong("输入数据不能null");
}
}
break;
default: {
}
break;
}
}
});
}
public void editTicketData(Trule trule) {
this.trule = trule;
}
private Trule getUiData() {
mViewBinding.tvIntegralRuleName.setText(mViewBinding.etTicketMoney.getText().toString() +
"元优惠券");
trule.setTruleName(mViewBinding.tvIntegralRuleName.getText().toString());
//0:正常 1暂停 默认0
trule.setTruleStatus(nowStatus);
trule.setTruleValAmt(ConvertUtil.yuanToFen(mViewBinding.etTicketMoney.getText().toString
()));
trule.setTruleExp(TimeUtils.string2Millis(mViewBinding.tvDate.getText().toString(), new
SimpleDateFormat("yyyy-mm-dd")));
trule.setTruleOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etRuleMoney.getText().toString
()));
if (!mViewBinding.etTicketCount.getText().toString().equals("")) {
trule.setTruleUseNum(Byte.parseByte(mViewBinding.etTicketCount.getText().toString()));
} else {
trule.setTruleUseNum((byte) 1);
}
return trule;
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private boolean isNull() {
return !(TextUtils.isEmpty(mViewBinding.etTicketMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.tvDate.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etRuleMoney.getText().toString())
|| TextUtils.isEmpty(mViewBinding.etTicketCount.getText().toString()));
}
//将两个选择时间的dialog放在该函数中
private void showDialogPick(final View btn) {
//获取Calendar对象,用于获取当前时间
final Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
//实例化DatePickerDialog对象
DatePickerDialog datePickerDialog = new DatePickerDialog(mContext, new
DatePickerDialog.OnDateSetListener() {
//选择完日期后会调用该回调函数
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear, int
dayOfMonth) {
//因为monthOfYear会比实际月份少一月所以这边要加1
((TextView) btn).setText(year + "-" + (monthOfYear + 1) + "-" + dayOfMonth);
}
}, year, month, day);
//弹出选择日期对话框
datePickerDialog.show();
}
/**
* 显示软键盘,Dialog使用
*/
public void hintKbTwo() {
View view = getActivity().getCurrentFocus();
if (view == null) {
return;
}
if (view instanceof TextView) {
InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.RESULT_UNCHANGED_SHOWN);
}
}
private TextWatcher mTextWatcher = new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
String text = s.toString();
int len = s.toString().length();
if (len == 1 && text.equals("0")) {
s.clear();
}
}
};
public void setNowType(int type) {
trule = new Trule();
this.nowType = type;
}
}
package com.xingdata.zzdpos.ui.marketing.ticket.fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.text.Html;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentTickerMainBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketActivity;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketPresenter;
import com.xingdata.zzdpos.ui.marketing.ticket.adapter.ReturnTicketAdapter;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
public class TickerIndexFragment extends BaseFragment<ReturnTicketPresenter,
FragmentTickerMainBinding> {
ReturnTicketAdapter returnTicketAdapter;
LoadingDialog loadingDialog = new LoadingDialog();
@Override
public int getLayoutId() {
return R.layout.fragment_ticker_main;
}
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("优惠券规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.finishActivity(ReturnTicketActivity.class);
}
});
mViewBinding.btnGroup.setText(Html.fromHtml(
getResources().getString(R.string.tv_ticket_count, "<font color='#1f7bdb'><big> "
+ "0" + " " + "</big></font>")));
returnTicketAdapter = new ReturnTicketAdapter(new ArrayList<>(), mPresenter,
(ReturnTicketActivity) getActivity());
mViewBinding.rcTicket.setAdapter(returnTicketAdapter);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rcTicket.setLayoutManager(linearLayoutManager);
mViewBinding.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View view) {
switch (view.getId()) {
case R.id.btn_add: {
// mPresenter.ticketAddDialog = new TicketAddDialog();
// mPresenter.ticketAddDialog.show(this);
mPresenter.tickerAddFragment = new TickerAddFragment();
start(mPresenter.tickerAddFragment);
}
break;
default: {
}
break;
}
}
});
}
public void truleQuerySucc(Pager<Trule> trulePager, LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
if (trulePager == null || trulePager.getList() == null || trulePager.getList().size() <=
0) {
mViewBinding.tvEmpty.setVisibility(View.VISIBLE);
}
if (trulePager != null && trulePager.getList() != null) {
mViewBinding.tvEmpty.setVisibility(View.GONE);
returnTicketAdapter.setNewData(trulePager.getList());
mViewBinding.btnGroup.setText(Html.fromHtml(getResources().getString(R.string
.tv_ticket_count,
"<font color='#1f7bdb'><big> " + trulePager.getList().size() + " " +
"</big></font>")));
}
}
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
}
package com.xingdata.zzdpos.ui.sendTicke;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivitySendTicketBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
public class SendTicketActivity extends BaseActivity<SendTicketPresenter,
ActivitySendTicketBinding>
implements SendTicketContract.View {
LoadingDialog loadingDialog = new LoadingDialog();
@Override
public int getLayoutId() {
return R.layout.activity_send_ticket;
}
@Override
public void initView() {
loadRootFragment(R.id.fragment, mPresenter.sendTickerIndexFragment);
}
@Override
public void error(String errorMsg, LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
LogUtils.e(errorMsg);
ToastUtils.showLong(errorMsg);
}
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
}
package com.xingdata.zzdpos.ui.sendTicke;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
/**
* Created by Administrator on 2017/11/24.
*/
public interface SendTicketContract {
interface View extends BaseView {
void error(String errorMsg, LoadingDialog loadingDialog);
}
abstract class Presenter extends BasePresenter<View> {
}
}
package com.xingdata.zzdpos.ui.sendTicke;
import com.xingdata.zzdpos.ui.sendTicke.fragment.SendTickerIndexFragment;
/**
* Created by Administrator on 2017/11/24.
*/
public class SendTicketPresenter extends SendTicketContract.Presenter {
public SendTickerIndexFragment sendTickerIndexFragment = new SendTickerIndexFragment();
@Override
public void onAttached() {
}
}
package com.xingdata.zzdpos.ui.sendTicke.fragment;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSendTickerMainBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.sendTicke.SendTicketPresenter;
import com.xingdata.zzdpos.util.OnClickListener;
public class SendTickerIndexFragment extends BaseFragment<SendTicketPresenter,
FragmentSendTickerMainBinding> {
@Override
public int getLayoutId() {
return R.layout.fragment_send_ticker_main;
}
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("积分规则");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
ActivityUtils.finishActivity(IntegralActivity.class);
}
});
}
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
}
package com.xingdata.zzdpos.ui.statistics;
import android.view.KeyEvent;
import com.blankj.utilcode.util.FragmentUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityStatisticsBinding;
import com.xingdata.zzdpos.ui.statistics.fragment.OrderMainFragment;
import com.xingdata.zzdpos.ui.statistics.fragment.StatisticsFragment;
public class StatisticsActivity extends BaseActivity<StatisticsPresenter, ActivityStatisticsBinding> implements StatisticsContract.View {
private StatisticsFragment mStatisticsFragment = new StatisticsFragment();
private OrderMainFragment mOrderMainFragment = new OrderMainFragment();
@Override
public int getLayoutId() {
return R.layout.activity_statistics;
}
@Override
public void initView() {
FragmentUtils.add(getSupportFragmentManager(), mStatisticsFragment, mViewBinding.fragmentContainer.getId(), false, true);
}
@Override
public void showOrderListFragment() {
FragmentUtils.add(getSupportFragmentManager(), mOrderMainFragment, mViewBinding.fragmentContainer.getId(), false, true);
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
// if (getSupportFragmentManager().getBackStackEntryCount() > 1) {
// getSupportFragmentManager().popBackStack();
// }
// }
return super.onKeyDown(keyCode, event);
}
}
package com.xingdata.zzdpos.ui.statistics;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
/**
* Created by Administrator on 2017/12/23.
*/
public interface StatisticsContract {
interface View extends BaseView {
void showOrderListFragment();
}
abstract class Presenter extends BasePresenter<View> {
public abstract void clickOrderList();
}
}
package com.xingdata.zzdpos.ui.statistics;
import android.view.KeyEvent;
import com.blankj.utilcode.util.FragmentUtils;
/**
* Created by Administrator on 2017/12/23.
*/
public class StatisticsPresenter extends StatisticsContract.Presenter {
@Override
public void onAttached() {
}
@Override
public void clickOrderList() {
mView.showOrderListFragment();
}
}
package com.xingdata.zzdpos.ui.statistics.adapter;
import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;
import java.util.List;
/**
* Created by Administrator on 2017/12/20.
*/
public class FragmentStateAdapter extends FragmentStatePagerAdapter {
private List<Fragment> fragmentList;
public FragmentStateAdapter(List<Fragment> fragmentList, FragmentManager fm) {
super(fm);
this.fragmentList = fragmentList;
}
@Override
public Fragment getItem(int position) {
return fragmentList.get(position);
}
@Override
public int getCount() {
return fragmentList.size();
}
@Override
public Parcelable saveState() {
return null;
}
}
package com.xingdata.zzdpos.ui.statistics.fragment;
import com.blankj.utilcode.util.TimeUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentOrderListBinding;
import com.xingdata.zzdpos.databinding.FragmentOrderMainBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import java.util.Calendar;
import java.util.List;
public class OrderListFragment extends BaseFragment<MainPresenter, FragmentOrderListBinding> {
private MenuRecyclerAdapter mMenuRecyclerAdapter;
private List<Integer> integers;
private Long monthDateStart;
private Long monthDateEnd;
public OrderListFragment setDate(Long end, Long start) {
monthDateStart = start;
monthDateEnd = end;
return this;
}
@Override
public int getLayoutId() {
return R.layout.fragment_order_list;
}
@Override
public void initView() {
Calendar calendar = Calendar.getInstance();
//获得当前时间的月份,月份从0开始所以结果要加1
int monthNow = calendar.get(Calendar.MONTH) + 1;
calendar.setTimeInMillis(monthDateStart);
int monthStart = calendar.get(Calendar.MONTH) + 1;
if (monthStart == monthNow) {
mViewBinding.setMonth("本月");
} else {
mViewBinding.setMonth(monthStart + "月");
}
mViewBinding.setAmt("收入:¥230.00");
// mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
// @Override
// protected void myOnClickListener(View v) {
// getActivity().finish();
// }
// });
// mViewBinding.icTitle.tvTitle.setText(R.string.menu_statistics);
// mViewBinding.fragmentCasherRecycler.setLayoutManager(new GridLayoutManager(getActivity(), 2));
// integers = new ArrayList<>();
// integers.add(101);
// integers.add(102);
// mMenuRecyclerAdapter = new MenuRecyclerAdapter(getActivity(), integers);
// mMenuRecyclerAdapter.bindToRecyclerView(mViewBinding.fragmentCasherRecycler);
// mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyMenuItemDecoration(getActivity(), 5, getResources().getColor(R.color.golden_yuji)));
// mMenuRecyclerAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
// @Override
// public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
// switch ((int) adapter.getData().get(position)) {
// case C.MENU.MENU_VIP://会员
//
// break;
// case C.MENU.MENU_RECHARGE://充值
//
// break;
// case C.MENU.MENU_MS://营销
//
// break;
// case C.MENU.MENU_TICKET://优惠券
//
// break;
// case C.MENU.MENU_STATISTICS://统计
//
// break;
// case C.MENU.MENU_MANAGER://管理
//
// break;
//
// }
// }
// });
}
}
package com.xingdata.zzdpos.ui.statistics.fragment;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentOrderMainBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.FragmentViewAdapter;
import com.xingdata.zzdpos.ui.main.fragment.ServiceFragment;
import com.xingdata.zzdpos.ui.statistics.adapter.FragmentStateAdapter;
import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.Scheduler;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
public class OrderMainFragment extends BaseFragment<MainPresenter, FragmentOrderMainBinding> {
private FragmentStateAdapter mFragmentStateAdapter;
private List<Long> dateLongs = new ArrayList<>();
private List<Fragment> fragments = new ArrayList<>();
private int month;
@Override
public int getLayoutId() {
return R.layout.fragment_order_main;
}
@Override
public void initView() {
initViewPager();
// mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
// @Override
// protected void myOnClickListener(View v) {
// getActivity().finish();
// }
// });
// mViewBinding.icTitle.tvTitle.setText(R.string.menu_statistics);
// mViewBinding.fragmentCasherRecycler.setLayoutManager(new GridLayoutManager(getActivity(), 2));
// integers = new ArrayList<>();
// integers.add(101);
// integers.add(102);
// mMenuRecyclerAdapter = new MenuRecyclerAdapter(getActivity(), integers);
// mMenuRecyclerAdapter.bindToRecyclerView(mViewBinding.fragmentCasherRecycler);
// mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyMenuItemDecoration(getActivity(), 5, getResources().getColor(R.color.golden_yuji)));
// mMenuRecyclerAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
// @Override
// public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
// switch ((int) adapter.getData().get(position)) {
// case C.MENU.MENU_VIP://会员
//
// break;
// case C.MENU.MENU_RECHARGE://充值
//
// break;
// case C.MENU.MENU_MS://营销
//
// break;
// case C.MENU.MENU_TICKET://优惠券
//
// break;
// case C.MENU.MENU_STATISTICS://统计
//
// break;
// case C.MENU.MENU_MANAGER://管理
//
// break;
//
// }
// }
// });
}
public void initViewPager() {
if (fragments.size() == 0) {
Observable.create(new ObservableOnSubscribe<String>() {
@Override
public void subscribe(ObservableEmitter<String> e) throws Exception {
String date = TimeUtils.millis2String(System.currentTimeMillis(), new SimpleDateFormat(StringUtil.defaultDatePattern));
String[] dates = date.split("-");
int y = Integer.valueOf(dates[0]);
month = Integer.valueOf(dates[1]);
int m = month + 1;
for (int i = 0; i < 13; i++) {
if (m == 0) {
m = 12;
y--;
}
if (m == 13) {
m = 1;
y++;
}
String month = String.valueOf(m).length() >= 2 ? String.valueOf(m) : "0" + String.valueOf(m);
e.onNext(y + "-" + month + "-01");
m--;
}
e.onComplete();
}
}).subscribeOn(Schedulers.computation()).map(new Function<String, Long>() {
@Override
public Long apply(String s) throws Exception {
return TimeUtils.string2Millis(s, new SimpleDateFormat(StringUtil.defaultDatePattern));
}
}).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<Long>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(Long aLong) {
dateLongs.add(aLong);
}
@Override
public void onError(Throwable e) {
ToastUtils.showShort(e.toString());
}
@Override
public void onComplete() {
for (int i = 0; i < dateLongs.size() - 1; i++) {
fragments.add(new OrderListFragment().setDate(dateLongs.get(i), dateLongs.get(i + 1)));
}
mFragmentStateAdapter = new FragmentStateAdapter(fragments, getChildFragmentManager());
mViewBinding.viewPagerData.setAdapter(mFragmentStateAdapter);
mViewBinding.viewPagerData.setCurrentItem(0);
mViewBinding.tabLayout.setupWithViewPager(mViewBinding.viewPagerData);
for (int i = 0; i < fragments.size(); i++) {
if (month == 0) month = 12;
mViewBinding.tabLayout.getTabAt(i).setText(month + "");
month--;
}
}
});
} else {
mFragmentStateAdapter = new FragmentStateAdapter(fragments, getChildFragmentManager());
mViewBinding.viewPagerData.setAdapter(mFragmentStateAdapter);
mViewBinding.tabLayout.setupWithViewPager(mViewBinding.viewPagerData);
for (int i = 0; i < fragments.size(); i++) {
if (month == 0) month = 12;
mViewBinding.tabLayout.getTabAt(i).setText(month + "");
month--;
}
mViewBinding.viewPagerData.setCurrentItem(0);
}
}
@Override
public void onStop() {
super.onStop();
}
}
package com.xingdata.zzdpos.ui.statistics.fragment;
import android.support.v7.widget.GridLayoutManager;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentStatisticsBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
public class StatisticsFragment extends BaseFragment<StatisticsPresenter, FragmentStatisticsBinding> {
private MenuRecyclerAdapter mMenuRecyclerAdapter;
private List<Integer> integers;
@Override
public int getLayoutId() {
return R.layout.fragment_statistics;
}
@Override
public void initView() {
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
getActivity().finish();
}
});
mViewBinding.icTitle.tvTitle.setText(R.string.menu_statistics);
mViewBinding.fragmentCasherRecycler.setLayoutManager(new GridLayoutManager(getActivity(), 2));
integers = new ArrayList<>();
integers.add(101);
integers.add(102);
mMenuRecyclerAdapter = new MenuRecyclerAdapter(getActivity(), integers);
mMenuRecyclerAdapter.bindToRecyclerView(mViewBinding.fragmentCasherRecycler);
mViewBinding.fragmentCasherRecycler.addItemDecoration(new MyMenuItemDecoration(getActivity(), 5, getResources().getColor(R.color.golden_yuji)));
mMenuRecyclerAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
switch ((int) adapter.getData().get(position)) {
case C.MENU.MENU_VIP://会员
mPresenter.clickOrderList();
break;
case C.MENU.MENU_RECHARGE://充值
break;
case C.MENU.MENU_MS://营销
break;
case C.MENU.MENU_TICKET://优惠券
break;
case C.MENU.MENU_STATISTICS://统计
break;
case C.MENU.MENU_MANAGER://管理
break;
}
}
});
}
}
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 { ...@@ -55,7 +55,7 @@ public final class SystemUtil {
} }
} }
// return deviceSN; // return deviceSN;
return "548496"; return "92209325";
} }
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<corners android:radius="@dimen/all_shape_radius" /> <corners android:radius="@dimen/all_shape_radius" />
<stroke <stroke
android:width="0.5dp" android:width="0.5dp"
android:color="@color/black" /> android:color="@color/black" />
<solid android:color="@color/all_transparent" /> <solid android:color="@color/all_transparent" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/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"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="@dimen/all_radius" />
<stroke
android:width="0.5dp"
android:color="@color/red_guanyu" />
<solid android:color="@color/white_caocao" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_red_round_rectangle_strokeless" android:state_pressed="true" /> <item android:drawable="@drawable/red_border_allradius" android:state_pressed="true" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_enabled="false" /> <item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gradient_gray_round_rectangle_stroke" /> <item android:drawable="@drawable/redout_border_whitein" />
</selector> </selector>
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_pressed="true" /> <item android:color="@color/white" android:state_pressed="true" />
<item android:color="@color/blue" /> <item android:color="@color/red_guanyu" />
</selector> </selector>
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/settle_btn_radius" /> <corners android:radius="@dimen/settle_btn_radius" />
<solid android:color="@color/gray_transparent" /> <solid android:color="@color/white_transparent15" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout> <layout>
<data>
<variable
name="versionNo"
type="String" />
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
...@@ -35,10 +42,11 @@ ...@@ -35,10 +42,11 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline"> app:layout_constraintTop_toTopOf="@id/guideline">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -70,10 +78,10 @@ ...@@ -70,10 +78,10 @@
android:weightSum="2"> android:weightSum="2">
<TextView <TextView
style="@style/textView_body"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_phone_hint" /> android:text="@string/help_phone_hint" />
<TextView <TextView
...@@ -84,6 +92,7 @@ ...@@ -84,6 +92,7 @@
android:padding="@dimen/all_padding" android:padding="@dimen/all_padding"
android:text="@string/help_phone" /> android:text="@string/help_phone" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -92,10 +101,10 @@ ...@@ -92,10 +101,10 @@
android:weightSum="2"> android:weightSum="2">
<TextView <TextView
style="@style/textView_body"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_code_hint" /> android:text="@string/help_code_hint" />
<TextView <TextView
...@@ -104,8 +113,9 @@ ...@@ -104,8 +113,9 @@
android:layout_weight="1" android:layout_weight="1"
android:gravity="right" android:gravity="right"
android:padding="@dimen/all_padding" android:padding="@dimen/all_padding"
android:text="@string/help_web" /> android:text="@{versionNo}" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -114,10 +124,10 @@ ...@@ -114,10 +124,10 @@
android:weightSum="2"> android:weightSum="2">
<TextView <TextView
style="@style/textView_body"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
style="@style/textView_body"
android:text="@string/help_word_hint" /> android:text="@string/help_word_hint" />
<TextView <TextView
......
...@@ -10,197 +10,18 @@ ...@@ -10,197 +10,18 @@
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="@color/white">
tools:context="com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity">
<include <FrameLayout
android:id="@+id/ic_title" android:id="@+id/frg"
layout="@layout/title"/>
<LinearLayout
android:id="@+id/btn_add"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@drawable/singleline_white_gray"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/ll_menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title"
app:layout_constraintVertical_weight="@integer/all_top_weight">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/but_add"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_padding"
android:text="添加获取规则"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/text_three_title"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_menu"
android:layout_width="0dp"
android:layout_height="49dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@id/cl_bottom"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_add"
app:layout_constraintVertical_weight="2.5">
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:checkedButton="@id/rb_get"
android:gravity="center"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_get"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/radio_select"
android:button="@null"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_padding"
android:text="获取规则"
android:textColor="@drawable/radio_select"
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rb_exchange"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/radio_select"
android:button="@null"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_padding"
android:text="兑换规则"
android:textColor="@drawable/radio_select"
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/cl_bottom"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
android:padding="@dimen/padding_big"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu" app:layout_constraintTop_toTopOf="parent"></FrameLayout>
app:layout_constraintVertical_weight="22">
<LinearLayout
android:id="@+id/ll_get"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_message"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_exchange"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:padding="@dimen/cl_padding"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="积分面值"
android:textSize="@dimen/et_textsize"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="兑换规则"
android:textSize="@dimen/et_textsize"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="备注"
android:textSize="@dimen/et_textsize"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="状态 "
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_height"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/vip_line"
android:paddingBottom="@dimen/all_padding"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_exchange_message"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
......
...@@ -15,98 +15,15 @@ ...@@ -15,98 +15,15 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/appBack" android:background="@color/appBack"
tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity"> tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity">
<FrameLayout
<include android:id="@+id/frg"
android:id="@+id/ic_title"
layout="@layout/title_appback"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/ll_menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="@integer/all_top_weight"/>
<LinearLayout
android:id="@+id/ll_menu"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"
app:layout_constraintBottom_toBottomOf="@id/rc_ticket"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title"
app:layout_constraintVertical_weight="2.5">
<TextView
android:id="@+id/btn_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:layout_weight="1.2"
android:background="@color/transparent"
android:drawablePadding="@dimen/all_spacing"
android:drawableStart="@mipmap/login_phone"
android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/fragment_store_item_spacing"
android:text="共 2 种优惠券"
android:textColor="@color/menu_back"
android:textSize="@dimen/all_text_size"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7.5"/>
<Button
android:id="@+id/btn_add"
android:layout_width="0dp"
android:layout_height="@dimen/fragment_store_et_height"
android:layout_weight="1"
android:background="@drawable/selector_navy_blue"
android:drawableLeft="@mipmap/bindingcounter_addcounter_befor"
android:onClick="@{OnClickListener}"
android:paddingLeft="5dp"
android:text="添加优惠券"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/rc_ticket"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="@dimen/all_margin_big"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu" app:layout_constraintTop_toTopOf="parent"></FrameLayout>
app:layout_constraintVertical_weight="22">
</android.support.v7.widget.RecyclerView>
<TextView
android:id="@+id/tv_empty"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/appBack"
android:drawableTop="@mipmap/icon_things_null"
android:gravity="center"
android:padding="100dp"
android:text="@string/empty_other_select"
android:textColor="@color/white_half"
android:textSize="@dimen/all_text_size_big"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu"
app:layout_constraintVertical_weight="22"/>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</layout> </layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="onClickListener"
type="android.view.View.OnClickListener"/>
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack"
android:orientation="vertical">
<FrameLayout
android:id="@+id/fragment"
style="@style/xuline_margin"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@color/appBack"/>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</FrameLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android: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
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
style="@style/dialog_title" style="@style/dialog_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin" /> android:layout_marginBottom="@dimen/all_padding" />
<ViewStub <ViewStub
...@@ -26,14 +26,21 @@ ...@@ -26,14 +26,21 @@
android:inflatedId="@+id/panel_import" /> android:inflatedId="@+id/panel_import" />
<android.support.constraint.ConstraintLayout <LinearLayout
android:layout_marginTop="@dimen/all_padding"
android:orientation="horizontal"
android:weightSum="2"
android:padding="@dimen/dp_4"
android:background="@color/white_caocao"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<Button <Button
android:layout_margin="1dp"
android:id="@+id/btn_cancel" android:id="@+id/btn_cancel"
style="@style/button_passive" style="@style/button_passive"
android:layout_width="@dimen/dialog_button_width" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin" android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
...@@ -47,9 +54,11 @@ ...@@ -47,9 +54,11 @@
tools:targetApi="lollipop" /> tools:targetApi="lollipop" />
<Button <Button
android:layout_margin="1dp"
android:id="@+id/btn_confirm" android:id="@+id/btn_confirm"
style="@style/button_positive" style="@style/button_positive"
android:layout_width="@dimen/dialog_button_width" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin" android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin"
...@@ -62,7 +71,7 @@ ...@@ -62,7 +71,7 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:targetApi="lollipop" /> tools:targetApi="lollipop" />
</android.support.constraint.ConstraintLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -38,11 +38,7 @@ ...@@ -38,11 +38,7 @@
type="String" /> type="String" />
</data> </data>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true">
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:id="@+id/cl_default" android:id="@+id/cl_default"
...@@ -54,11 +50,13 @@ ...@@ -54,11 +50,13 @@
<TextView <TextView
android:id="@+id/handover_tv_sumamt" android:id="@+id/handover_tv_sumamt"
style="@style/textView_body_small" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:text="¥9999" android:text="¥9999"
android:textColor="@color/red900" android:textColor="@color/red900"
android:textSize="@dimen/big_text_size"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -66,10 +64,14 @@ ...@@ -66,10 +64,14 @@
<TextView <TextView
android:id="@+id/handover_tv_sumamt_hint" android:id="@+id/handover_tv_sumamt_hint"
style="@style/textView_body" android:paddingTop="@dimen/all_margin"
android:layout_width="wrap_content" android:paddingBottom="@dimen/all_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:text="实收金额" android:text="实收金额"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/small_text_size"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -88,13 +90,16 @@ ...@@ -88,13 +90,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="@dimen/dp_4" android:paddingTop="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingEnd="@dimen/dp_4"
android:paddingBottom="@dimen/all_padding"
android:weightSum="2" android:weightSum="2"
app:layout_constraintTop_toBottomOf="@id/view1"> app:layout_constraintTop_toBottomOf="@id/view1">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
...@@ -103,53 +108,61 @@ ...@@ -103,53 +108,61 @@
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_date" /> android:text="@string/handover_date" />
<TextView <TextView
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_oper" /> android:text="@string/handover_oper" />
<TextView <TextView
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_orderNum" /> android:text="@string/handover_orderNum" />
<TextView <TextView
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_cash" /> android:text="@string/handover_cash" />
<TextView <TextView
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_wechat" /> android:text="@string/handover_wechat" />
<TextView <TextView
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_alipay" /> android:text="@string/handover_alipay" />
<TextView <TextView
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_bank" /> android:text="@string/handover_bank" />
<TextView <TextView
style="@style/textView_body_small" style="@style/textView_body_small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_vip" /> android:text="@string/handover_vip" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:gravity="right" android:gravity="right"
...@@ -160,6 +173,7 @@ ...@@ -160,6 +173,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{date}" android:text="@{date}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
...@@ -168,6 +182,7 @@ ...@@ -168,6 +182,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{operName}" android:text="@{operName}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
...@@ -176,6 +191,7 @@ ...@@ -176,6 +191,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{orderNum}" android:text="@{orderNum}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
...@@ -184,6 +200,7 @@ ...@@ -184,6 +200,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{cash}" android:text="@{cash}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
...@@ -192,6 +209,7 @@ ...@@ -192,6 +209,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{wechat}" android:text="@{wechat}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
...@@ -200,6 +218,7 @@ ...@@ -200,6 +218,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{alipay}" android:text="@{alipay}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
...@@ -208,6 +227,7 @@ ...@@ -208,6 +227,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{bank}" android:text="@{bank}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
...@@ -216,6 +236,7 @@ ...@@ -216,6 +236,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right" android:gravity="right"
android:singleLine="true"
android:text="@{vipPay}" android:text="@{vipPay}"
android:textColor="@color/black_likui" /> android:textColor="@color/black_likui" />
</LinearLayout> </LinearLayout>
...@@ -223,5 +244,5 @@ ...@@ -223,5 +244,5 @@
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout> </layout>
\ No newline at end of file
...@@ -9,226 +9,264 @@ ...@@ -9,226 +9,264 @@
</data> </data>
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/store_back"
android:gravity="center" android:focusable="true"
android:padding="@dimen/all_padding"> android:orientation="vertical">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<TextView <TextView
android:id="@+id/tv_status" android:layout_width="match_parent"
android:layout_width="0dp" android:layout_height="?attr/actionBarSize"
android:layout_height="wrap_content" android:background="@color/gray_zhouyu"
android:layout_weight="1" android:gravity="left|center_vertical"
android:paddingStart="@dimen/all_margin" android:paddingLeft="@dimen/all_padding"
android:text="启用状态:" android:text="基本信息"
android:textColor="@color/black" android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/> android:textSize="@dimen/text_secondary_title"/>
<RadioGroup <View
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/all_line_width"
android:layout_weight="1" android:background="@color/gray1"
android:orientation="horizontal"> android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<RadioButton
android:id="@+id/rd_suspendeds"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="暂停 "
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rd_starts"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="启用 "
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:id="@+id/ll_all"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:background="@color/white"
android:padding="@dimen/all_padding"> android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding">
<TextView <TextView
android:id="@+id/tv_status"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:paddingStart="@dimen/all_margin" android:paddingLeft="@dimen/all_padding"
android:text="积分面值:" android:text="启用状态:"
android:textColor="@color/black" android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_integral_exchange_rule_count_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text=" 个积分等于1元"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/> 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_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="5"
android:paddingStart="@dimen/all_margin" android:orientation="horizontal">
android:text="兑换条件:"
android:textColor="@color/black" <RadioButton
android:textSize="@dimen/text_secondary_title"/> 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 <View
android:id="@+id/et_integral_exchange_money" android:layout_width="match_parent"
style="@style/dialog_edit" android:layout_height="@dimen/all_line_width"
android:layout_width="0dp" android:layout_marginLeft="@dimen/all_padding"
android:layout_height="wrap_content" android:layout_marginRight="@dimen/all_padding"
android:layout_centerHorizontal="true" android:background="@color/gray1"></View>
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="元"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_all"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:background="@color/white"
android:padding="@dimen/all_padding" android:gravity="center"
android:paddingBottom="@dimen/all_margin" android:orientation="vertical"
android:paddingTop="@dimen/all_margin"> >
<TextView <LinearLayout
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:orientation="horizontal"
android:paddingStart="@dimen/all_margin" android:paddingBottom="@dimen/all_padding"
android:text="" android:paddingTop="@dimen/all_padding">
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/> <TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android: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 <TextView
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="?attr/actionBarSize"
android:layout_weight="2" android:background="@color/gray_zhouyu"
android:gravity="right" android:gravity="left|center_vertical"
android:text="可以使用 " android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black" android:text="兑换条件"
android:textSize="@dimen/et_textsize"/> android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/>
<EditText <LinearLayout
android:id="@+id/et_integral_exchange_count" android:layout_width="match_parent"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:orientation="horizontal"
android:layout_weight="2" android:paddingBottom="@dimen/all_padding"
android:digits="1234567890" android:paddingTop="@dimen/all_padding">
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number" <TextView
android:maxLength="5" android:layout_width="0dp"
android:saveEnabled="false"/> android:layout_height="wrap_content"
android:layout_weight="2"
<TextView android:gravity="left"
android:layout_width="0dp" 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/gray1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3" android:orientation="horizontal"
android:text="个积分" android:paddingBottom="@dimen/all_padding"
android:textColor="@color/black" android:paddingTop="@dimen/all_padding">
android:textSize="@dimen/et_textsize"/>
<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>
</LinearLayout> <View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray1"></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> </layout>
\ No newline at end of file
...@@ -24,552 +24,642 @@ ...@@ -24,552 +24,642 @@
type="String"/> type="String"/>
</data> </data>
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:id="@+id/tv_rules_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="规则名称:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/et_integral_role_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:focusable="true"
android:maxLines="1"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="启用状态:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<RadioGroup
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rd_suspendeds"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="暂停 "
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rd_starts"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="启用 "
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/store_back"
android:gravity="center" android:focusable="true"
android:padding="@dimen/all_padding" android:orientation="vertical">
android:paddingBottom="@dimen/all_margin"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"
android:paddingTop="@dimen/all_margin_big">
<TextView
android:id="@+id/tv_vip_level"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="会员等级:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/tv_vip_level_select"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="5"
android:drawableRight="@mipmap/createstore_drop_down"
android:ems="10"
android:gravity="center"
android:maxLength="5"
android:onClick="@{OnClickListener}"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_vip_level_select_show_no_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="5"
android:ems="10"
android:gravity="center"
android:maxLength="5"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"
android:visibility="gone"/>
<TextView
android:id="@+id/ns_vip_level"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
/>
</LinearLayout>
<LinearLayout <include
android:layout_width="match_parent" android:id="@+id/ic_title"
android:layout_height="wrap_content" layout="@layout/title"/>
android:background="@color/white"
android:gravity="center"
android:padding="@dimen/all_padding">
<TextView <TextView
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="?attr/actionBarSize"
android:layout_weight="2" android:background="@color/gray_zhouyu"
android:paddingStart="@dimen/all_margin" android:gravity="left|center_vertical"
android:text="获取方式:" android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black" android:text="基本信息"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/> 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 <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:background="@color/white"
android:padding="@dimen/all_padding"> android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_padding"
>
<TextView <TextView
android:id="@+id/tv_rules_name"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:paddingStart="@dimen/all_margin" android:paddingLeft="@dimen/all_padding"
android:text="积分比例:" android:text="规则名称:"
android:textColor="@color/black" android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/> 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="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView <TextView
android:id="@+id/et_integral_role_name"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="5" android:layout_weight="5"
android:text="元一个积分" android:focusable="true"
android:textColor="@color/black" android:maxLines="1"
android:singleLine="true"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> 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/gray1"></View>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:background="@color/white"
android:padding="@dimen/all_padding" android:gravity="center"
android:paddingBottom="@dimen/all_margin" android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_margin"> android:paddingTop="@dimen/all_padding"
>
<TextView <TextView
android:id="@+id/tv_status"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:paddingStart="@dimen/all_margin" android:paddingLeft="@dimen/all_padding"
android:text="有效期限:" android:text="启用状态:"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/> 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="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxLength="5"
android:saveEnabled="false"/>
<TextView <RadioGroup
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="5" android:layout_weight="5"
android:text="个月" android:orientation="horizontal">
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/> <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>
<LinearLayout <View
android:id="@+id/ll_category" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="@dimen/all_line_width"
android:layout_height="wrap_content" android:layout_marginLeft="@dimen/all_padding"
android:background="@color/white" android:layout_marginRight="@dimen/all_padding"
android:gravity="center" android:background="@color/gray1"></View>
android:orientation="vertical"
android:visibility="gone"> <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 <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:paddingBottom="@dimen/all_padding"
android:padding="@dimen/all_padding" android:paddingTop="@dimen/all_padding">
android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="商品品类:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView <TextView
android:id="@+id/tv_category_select_one" android:id="@+id/tv_vip_level"
style="@style/dialog_edit"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2" android:layout_weight="2"
android:drawableRight="@mipmap/createstore_drop_down" android:paddingLeft="@dimen/all_padding"
android:ellipsize="end" android:text="会员等级:"
android:gravity="center" android:textColor="@color/black_baozheng"
android:maxLength="5"
android:onClick="@{OnClickListener}"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
<TextView <TextView
android:id="@+id/tv_category_select_two" android:id="@+id/tv_vip_level_select"
style="@style/dialog_edit" style="@style/dialog_edit"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/all_padding" android:layout_weight="4"
android:layout_weight="2"
android:drawableRight="@mipmap/createstore_drop_down" android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end" android:ems="10"
android:gravity="center" android:gravity="center"
android:maxLength="5" android:maxLength="5"
android:onClick="@{OnClickListener}" android:onClick="@{OnClickListener}"
android:singleLine="true"
android:textColor="@color/black" android:textColor="@color/black"
android:textColorHint="@color/hint" android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
<TextView <TextView
android:id="@+id/tv_category_select_three" android:id="@+id/tv_vip_level_select_show_no_edit"
style="@style/dialog_edit"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/all_padding" android:layout_weight="4"
android:layout_weight="2"
android:drawableRight="@mipmap/createstore_drop_down"
android:ellipsize="end"
android:ems="10" android:ems="10"
android:gravity="center" android:gravity="center"
android:maxLength="5" 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:textColor="@color/black"
android:textColorHint="@color/hint" android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize" android:textSize="@dimen/et_textsize"
android:visibility="gone"/> android:visibility="gone"/>
<TextView <TextView
android:id="@+id/ns_vip_level"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="" />
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/gray1"></View>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:paddingBottom="@dimen/all_padding"
android:padding="@dimen/all_padding"> android:paddingTop="@dimen/all_padding">
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:paddingStart="@dimen/all_margin" android:paddingLeft="@dimen/all_padding"
android:text="积分比例:" android:text="获取方式:"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/> android:textSize="@dimen/et_textsize"/>
<EditText <RadioGroup
android:id="@+id/et_integral_category_weight"
style="@style/dialog_edit"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_weight="5"
android:layout_weight="2" android:checkedButton="@id/rd_gettype_all"
android:digits="1234567890" android:orientation="horizontal">
android:gravity="center_vertical"
android:inputType="phone|number" <RadioButton
android:maxLength="5" android:id="@+id/rd_gettype_all"
android:saveEnabled="false"/> 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 <View
android:layout_width="0dp" 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/gray1"></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_height="wrap_content"
android:layout_weight="5" android:orientation="horizontal"
android:text="元一个积分" android:paddingBottom="@dimen/all_padding"
android:textColor="@color/black" android:paddingTop="@dimen/all_padding">
android:textSize="@dimen/et_textsize"/>
<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/gray1"></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> </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/gray1"></View>
<LinearLayout <LinearLayout
android:id="@+id/ll_category"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center" 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/gray1"></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/gray1"></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:orientation="horizontal"
android:padding="@dimen/all_padding" android:paddingBottom="@dimen/all_padding"
> android:paddingTop="@dimen/all_padding"
android:visibility="gone">
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:paddingStart="@dimen/all_margin" android:paddingLeft="@dimen/all_padding"
android:text="有效期限:" android:text="有效期限:"
android:textColor="@color/black" android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/> android:textSize="@dimen/et_textsize"/>
<EditText <EditText
android:id="@+id/et_integral_category_time_limit" android:id="@+id/et_shop_time_limit"
style="@style/dialog_edit" style="@style/dialog_edit"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_weight="2" android:layout_weight="3"
android:digits="1234567890" android:digits="1234567890"
android:ems="5" android:ems="2"
android:gravity="center_vertical" android:gravity="center_vertical"
android:inputType="phone|number" android:inputType="phone|number"
android:maxLength="5" android:maxEms="2"
android:maxLength="2"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black"/> android:textColor="@color/black"/>
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="5" android:layout_weight="2"
android:text="个月" android:text="个月"
android:textColor="@color/black" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray1"></View>
</LinearLayout> </LinearLayout>
<LinearLayout <Button
android:id="@+id/ll_shop" android:id="@+id/btn_add"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:layout_alignParentBottom="true"
android:orientation="horizontal" android:layout_margin="@dimen/all_margin"
android:padding="@dimen/all_padding" android:background="@color/red_guanyu"
android:paddingTop="@dimen/all_padding" android:onClick="@{OnClickListener}"
android:visibility="gone"> android:text="确定"
android:textColor="@color/white"
<TextView android:textSize="@dimen/et_textsize"/>
android:layout_width="0dp" </RelativeLayout>
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="有效期限:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_shop_time_limit"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:gravity="center_vertical"
android:inputType="phone|number"
android:maxEms="5"
android:maxLength="5"
android:saveEnabled="false"
android:textColor="@color/black"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="个月"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout>
</layout> </layout>
\ No newline at end of file
...@@ -5,289 +5,325 @@ ...@@ -5,289 +5,325 @@
<variable <variable
name="OnClickListener" name="OnClickListener"
type="android.view.View.OnClickListener"></variable> type="com.xingdata.zzdpos.util.OnClickListener"></variable>
</data> </data>
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/store_back"
android:gravity="center" android:focusable="true"
android:padding="@dimen/all_padding"> android:orientation="vertical">
<TextView <include
android:layout_width="0dp" android:id="@+id/ic_titles"
android:layout_height="wrap_content" layout="@layout/title"/>
android:layout_weight="1"
android:paddingStart="@dimen/all_margin"
android:text="活动名称:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView <TextView
android:id="@+id/tv_integral_rule_name" android:layout_width="match_parent"
android:layout_width="0dp" android:layout_height="?attr/actionBarSize"
android:layout_height="wrap_content" android:background="@color/gray_zhouyu"
android:layout_weight="1" android:gravity="left|center_vertical"
android:focusable="true" android:paddingLeft="@dimen/all_padding"
android:maxLines="1" android:text="基本信息"
android:singleLine="true" android:textColor="@color/black_baozheng"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/> android:textSize="@dimen/text_secondary_title"/>
</LinearLayout>
<View <LinearLayout
android:layout_width="match_parent" 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_height="wrap_content"
android:layout_weight="1" android:background="@color/white"
android:checkedButton="@id/rb_suspended" android:gravity="center"
android:orientation="horizontal"> android:padding="@dimen/all_padding">
<RadioButton <TextView
android:id="@+id/rb_suspended"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin" android:layout_weight="2"
android:layout_marginRight="@dimen/all_margin" android:text="活动名称:"
android:layout_weight="1" android:textColor="@color/black_baozheng"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}"
android:text="暂停 "
android:textSize="@dimen/et_textsize"/> android:textSize="@dimen/et_textsize"/>
<RadioButton <TextView
android:id="@+id/rb_start" android:id="@+id/tv_integral_rule_name"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin" android:layout_weight="5"
android:layout_marginRight="@dimen/all_margin" android:focusable="true"
android:layout_weight="1" android:maxLines="1"
android:background="@drawable/selector_checkbox_bg" android:singleLine="true"
android:button="@null" android:textColor="@color/black_baozheng"
android:onClick="@{OnClickListener}" android:textSize="@dimen/text_secondary_title"/>
android:text="启用 " </LinearLayout>
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gary1"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/all_padding"
android:paddingBottom="@dimen/all_margin"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"
android:paddingTop="@dimen/all_margin_big">
<TextView <View
android:id="@+id/tv_vip_level" android:layout_width="match_parent"
android:layout_width="0dp" android:layout_height="@dimen/all_line_width"
android:layout_height="match_parent" android:layout_marginLeft="@dimen/all_padding"
android:layout_weight="1" android:layout_marginRight="@dimen/all_padding"
android:paddingStart="@dimen/all_margin" android:background="@color/gray1"></View>
android:text="规则设置:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_weight="4" android:background="@color/white"
android:orientation="vertical"> android:gravity="center"
android:padding="@dimen/all_padding">
<LinearLayout <TextView
android:layout_width="match_parent" android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:layout_weight="1"
android:padding="@dimen/all_padding"> android:text="启用状态:"
android:textColor="@color/black_baozheng"
<TextView android:textSize="@dimen/et_textsize"/>
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="优惠券面值:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_ticket_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:inputType="number"
android:maxLength="5"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="元"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout <RadioGroup
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:layout_weight="1"
android:padding="@dimen/all_padding"> android:checkedButton="@id/rb_suspended"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="券有效期:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<TextView
android:id="@+id/tv_date" <RadioButton
style="@style/dialog_edit" android:id="@+id/rb_suspended"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_marginLeft="@dimen/all_margin"
android:layout_weight="2" android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/selector_checkbox_bg"
android:button="@null"
android:onClick="@{OnClickListener}" android:onClick="@{OnClickListener}"
android:paddingBottom="2dp" android:text="暂停 "
android:paddingTop="2dp"/> android:textSize="@dimen/et_textsize"/>
<TextView <RadioButton
android:id="@+id/rb_start"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" 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"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </RadioGroup>
</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/gray1"></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 <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="horizontal" android:background="@color/white"
android:padding="@dimen/all_padding"> android:gravity="center"
android:orientation="horizontal"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingStart="@dimen/all_margin"
android:text="订单金额满:"
android:textColor="@color/black"
android:textSize="@dimen/text_secondary_title"/>
<EditText
android:id="@+id/et_rule_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="2"
android:digits="1234567890"
android:ems="5"
android:inputType="phone|number"
android:maxLength="5"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="元可用"
android:textColor="@color/black"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="horizontal" android:layout_weight="4"
android:padding="@dimen/all_padding"> android:orientation="vertical">
<TextView <LinearLayout
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:orientation="horizontal"
android:paddingStart="@dimen/all_margin" android:padding="@dimen/all_padding">
android:text="每单使用:"
android:textColor="@color/black" <TextView
android:textSize="@dimen/text_secondary_title"/> android:layout_width="0dp"
android:layout_height="wrap_content"
<EditText android:layout_weight="2"
android:id="@+id/et_ticket_count" android:text="优惠券面值:"
style="@style/dialog_edit" android:textColor="@color/black_baozheng"
android:layout_width="0dp" android:textSize="@dimen/et_textsize"/>
<EditText
android:id="@+id/et_ticket_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="3"
android:digits="1234567890"
android:ems="5"
android:inputType="number"
android:maxLength="5"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="元"
android:textColor="@color/black_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/gray1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:orientation="horizontal"
android:layout_weight="2" android:padding="@dimen/all_padding">
android:digits="1234567890"
android:ems="5" <TextView
android:inputType="phone|number" android:layout_width="0dp"
android:maxLength="2"/> android:layout_height="wrap_content"
android:layout_weight="2"
<TextView android:text="券有效期:"
android:layout_width="0dp" android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_date"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="3"
android:onClick="@{OnClickListener}"
android:paddingBottom="2dp"
android:paddingTop="2dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<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/gray1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:orientation="horizontal"
android:paddingLeft="@dimen/all_padding" android:padding="@dimen/all_padding">
android:text="张"
android:textColor="@color/black" <TextView
android:textSize="@dimen/et_textsize"/> 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"/>
<EditText
android:id="@+id/et_rule_money"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="3"
android:digits="1234567890"
android:ems="5"
android:inputType="phone|number"
android:maxLength="5"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="元可用"
android:textColor="@color/black_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/gray1"></View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/all_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="每单使用:"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<EditText
android:id="@+id/et_ticket_count"
style="@style/dialog_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="3"
android:digits="1234567890"
android:ems="5"
android:inputType="phone|number"
android:maxLength="2"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:paddingLeft="@dimen/all_padding"
android:text="张"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray1"></View>
</LinearLayout> </LinearLayout>
<Button
</LinearLayout> 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:onClick="@{OnClickListener}"
android:text="确定"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</RelativeLayout>
</layout> </layout>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment"> tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline <android.support.constraint.Guideline
android:id="@+id/guideline" android:id="@+id/guideline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/btn_handover"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin" android:layout_margin="@dimen/all_margin"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<LinearLayout
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline_white_gray"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/ll_menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ic_title">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/but_add"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_padding"
android:text="添加获取规则"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/text_three_title"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_menu"
android:layout_width="0dp"
android:layout_height="49dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@id/cl_bottom"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_add"
app:layout_constraintVertical_weight="2.5">
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:checkedButton="@id/rb_get"
android:gravity="center"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_get"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/radio_select"
android:button="@null"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_padding"
android:text="获取规则"
android:textColor="@drawable/radio_select"
android:textSize="@dimen/et_textsize"/>
<RadioButton
android:id="@+id/rb_exchange"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin"
android:layout_marginRight="@dimen/all_margin"
android:layout_weight="1"
android:background="@drawable/radio_select"
android:button="@null"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_padding"
android:text="兑换规则"
android:textColor="@drawable/radio_select"
android:textSize="@dimen/et_textsize"/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/cl_bottom"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/gray_zhouyu"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu"
app:layout_constraintVertical_weight="22">
<LinearLayout
android:id="@+id/ll_get"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical"
android:padding="@dimen/all_padding">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_message"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_exchange"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical"
android:padding="@dimen/all_padding"
android:visibility="gone">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_exchange_message"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment"> tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline <android.support.constraint.Guideline
android:id="@+id/guideline" android:id="@+id/guideline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
<layout>
<data>
<variable
name="month"
type="String" />
<variable
name="amt"
type="String" />
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<LinearLayout
android:id="@+id/ll_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="left"
android:padding="@dimen/all_padding"
android:text="@{month}" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:padding="@dimen/all_padding"
android:text="@{amt}" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white_caocao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_title">
</android.support.v7.widget.RecyclerView>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<layout>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
android:elevation="@dimen/view_line_L1"
app:layout_constraintTop_toTopOf="parent" />
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="30dp"
android:elevation="@dimen/view_line_L1"
app:layout_constraintTop_toBottomOf="@id/ic_title"
app:tabIndicatorHeight="0dp"
app:tabMinWidth="100dp"
app:tabMode="scrollable"
app:tabSelectedTextColor="#ff7a61"
app:tabTextColor="@color/gray_kongming">
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager_data"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/gray"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tab_layout">
</android.support.v4.view.ViewPager>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="OnClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<LinearLayout
android:id="@+id/ll_one"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/all_margin"
app:layout_constraintTop_toBottomOf="@+id/ic_title">
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@mipmap/bg_return_ticker_logo"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:paddingLeft="@dimen/all_padding"
android:text="按单独会员发券"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"/>
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@mipmap/right"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_all"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/all_margin"
app:layout_constraintTop_toBottomOf="@+id/ll_one">
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@mipmap/bg_return_ticker_logo"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:paddingLeft="@dimen/all_padding"
android:text="按会员类别发券"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"/>
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@mipmap/right"/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment"> tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragment layout --> <!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline <android.support.constraint.Guideline
android:id="@+id/guideline" android:id="@+id/guideline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
<layout>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<include
android:id="@+id/ic_title"
layout="@layout/title_appback"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/black_zhangfei"
android:gravity="top|center_horizontal"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="32000"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_text_size_big_big" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayAmt_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:textColor="@color/white_caocao" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayOrder_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:textColor="@color/white_caocao" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayRecharge_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:textColor="@color/white_caocao" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/statistics_todayVipAdd_hint"
android:textColor="@color/white_caocao" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/fragment_casher_recycler"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_padding"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/white_caocao"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="OnClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<LinearLayout
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline_white_gray"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/ll_menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ic_title">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/but_add"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_padding"
android:text="添加获取规则"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/text_three_title"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_menu"
android:layout_width="0dp"
android:layout_height="6dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="@dimen/all_margin"
android:paddingRight="@dimen/all_margin"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/rc_ticket"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_add"
app:layout_constraintVertical_weight="2.5">
<TextView
android:id="@+id/btn_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:layout_weight="1.2"
android:background="@color/transparent"
android:drawablePadding="@dimen/all_spacing"
android:drawableStart="@mipmap/login_phone"
android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/fragment_store_item_spacing"
android:text="共 2 种优惠券"
android:textColor="@color/menu_back"
android:textSize="@dimen/all_text_size"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7.5"/>
<Button
android:layout_width="0dp"
android:layout_height="@dimen/fragment_store_et_height"
android:layout_weight="1"
android:background="@drawable/selector_navy_blue"
android:drawableLeft="@mipmap/bindingcounter_addcounter_befor"
android:onClick="@{OnClickListener}"
android:paddingLeft="5dp"
android:text="添加优惠券"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/rc_ticket"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="@dimen/all_padding"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu"
app:layout_constraintVertical_weight="22">
</android.support.v7.widget.RecyclerView>
<TextView
android:id="@+id/tv_empty"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/appBack"
android:drawableTop="@mipmap/icon_things_null"
android:gravity="center"
android:padding="100dp"
android:text="@string/empty_other_select"
android:textColor="@color/white_half"
android:textSize="@dimen/all_text_size_big"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_menu"
app:layout_constraintVertical_weight="22"/>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android: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"?> <?xml version="1.0" encoding="utf-8"?>
<layout> <layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cv_item" android:id="@+id/cv_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:layout_marginTop="@dimen/all_padding"
android:paddingTop="@dimen/all_padding" android:background="@color/gray_zhouyu"
android:paddingBottom="@dimen/all_padding" android:orientation="horizontal">
android:orientation="horizontal">
<TextView
android:id="@+id/tv_vip"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="适用会员"
android:textSize="@dimen/et_textsize"/>
<TextView <RelativeLayout
android:id="@+id/tv_source" android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="5" android:background="@mipmap/integral_bg"
android:text="来源品类" android:orientation="horizontal"
android:textSize="@dimen/et_textsize"/> android:padding="@dimen/all_padding">
<TextView <TextView
android:id="@+id/tv_get" android:id="@+id/tv_get"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3" android:layout_centerHorizontal="true"
android:text="获取规则" android:gravity="center"
android:textSize="@dimen/et_textsize"/> android:text="满100送一个积分"
android:textColor="@color/white"
android:textSize="@dimen/text_secondary_title"/>
<ImageView </RelativeLayout>
android:id="@+id/tv_status"
android:layout_width="0dp" <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_marginLeft="@dimen/all_padding"
android:src="@mipmap/integral_open" android:layout_marginRight="@dimen/all_padding"
android:textSize="@dimen/et_textsize"/> android:layout_marginTop="55dp">
</LinearLayout>
<LinearLayout
android:id="@+id/ll_vip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/all_margin">
<TextView
android:id="@+id/tv_vip_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="适用会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_vip"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="right"
android:text="金牌会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_source"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_vip"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/all_margin">
<TextView
android:id="@+id/tv_source_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="来源品类"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"
/>
<TextView
android:id="@+id/tv_source"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="right"
android:singleLine="true"
android:text="金牌会员"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_source"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/all_margin">
<TextView
android:id="@+id/tv_status_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="启用状态"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="right"
android:text="启用状态"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"/>
</LinearLayout>
</RelativeLayout>
<!--<TextView-->
<!--android:id="@+id/tv_source"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="5"-->
<!--android:text="来源品类"-->
<!--android:textSize="@dimen/et_textsize"/>-->
<!--<TextView-->
<!--android:id="@+id/tv_get"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="3"-->
<!--android:text="获取规则"-->
<!--android:textSize="@dimen/et_textsize"/>-->
<!--<ImageView-->
<!--android:id="@+id/tv_status"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_weight="1"-->
<!--android:src="@mipmap/integral_open"-->
<!--android:textSize="@dimen/et_textsize"/>-->
</RelativeLayout>
</layout> </layout>
\ No newline at end of file
...@@ -12,18 +12,20 @@ ...@@ -12,18 +12,20 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:id="@+id/cl_item" android:id="@+id/cl_item"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_weight="2.3">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@mipmap/return_ticket_one"/> android:background="@mipmap/return_ticket_one"/>
<LinearLayout <LinearLayout
android:id="@+id/ll_top" android:id="@+id/ll_top"
...@@ -36,41 +38,32 @@ ...@@ -36,41 +38,32 @@
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="2.5"> app:layout_constraintVertical_weight="4">
<TextView <ImageView
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="¥" android:layout_gravity="right"
android:textColor="@color/white" android:layout_weight="1.8"
android:textSize="@dimen/et_textsize"/> android:src="@mipmap/bg_return_ticker_logo"/>
<TextView <TextView
android:id="@+id/tv_ticket_money" android:id="@+id/tv_ticket_money"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/all_padding" android:layout_weight="5"
android:gravity="center" android:gravity="center"
android:text="20" android:text="@string/tv_money"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="45sp" android:textSize="@dimen/text_secondary_title"
android:textStyle="bold"/> android:textStyle="bold"/>
<TextView
android:id="@+id/tv_ticket"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/all_padding"
android:text="优惠券"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_bottom" android:id="@+id/ll_bottom"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
...@@ -78,48 +71,70 @@ ...@@ -78,48 +71,70 @@
app:layout_constraintTop_toBottomOf="@id/ll_top" app:layout_constraintTop_toBottomOf="@id/ll_top"
app:layout_constraintVertical_weight="2"> app:layout_constraintVertical_weight="2">
<TextView
android:id="@+id/tv_rule"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="@string/tv_rule"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"/>
<TextView <TextView
android:id="@+id/tv_date" android:id="@+id/tv_date"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginTop="@dimen/all_padding"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center_vertical"
android:paddingLeft="@dimen/all_margin"
android:text="@string/tv_date" android:text="@string/tv_date"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/et_text_mini"/> android:textSize="@dimen/et_textsize"/>
</LinearLayout> </LinearLayout>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:id="@+id/cl_send" android:id="@+id/cl_send"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_weight="1">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:src="@mipmap/return_ticket_two"/> android:background="@mipmap/return_ticket_two"
/>
<TextView <TextView
android:id="@+id/tv_send" android:id="@+id/tv_ticket_moneys"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
android:text="发券" android:gravity="center"
android:text="@string/money"
android:textColor="@color/white"
android:textSize="@dimen/text_primary_title_smile"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/vw_line"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<View
android:id="@+id/vw_line"
android:layout_width="0dp"
android:layout_height="@dimen/all_line_width"
android:layout_marginLeft="@dimen/all_padding"
android:layout_marginRight="@dimen/all_padding"
android:background="@color/gray1"
app:layout_constraintBottom_toTopOf="@id/tv_rule"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_ticket_moneys"></View>
<TextView
android:id="@+id/tv_rule"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center"
android:text="@string/tv_rule"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/et_textsize" android:textSize="@dimen/et_textsize"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/> app:layout_constraintTop_toBottomOf="@+id/vw_line"/>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</LinearLayout> </LinearLayout>
......
...@@ -11,17 +11,17 @@ ...@@ -11,17 +11,17 @@
</data> </data>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline_white_gray" android:background="@drawable/singleline_white_gray"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageButton
android:id="@+id/iv_back" android:id="@+id/iv_back"
android:layout_width="@dimen/title_height" android:layout_width="?attr/actionBarSize"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:gravity="center" android:background="@color/transparent"
android:onClick="@{onClickListener}" android:onClick="@{onClickListener}"
android:padding="@dimen/all_margin" android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"/> android:src="@mipmap/back_black"/>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:text="标题" android:text="标题"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title" /> android:textSize="@dimen/text_secondary_title"/>
</RelativeLayout> </RelativeLayout>
......
...@@ -12,18 +12,19 @@ ...@@ -12,18 +12,19 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/title_height" android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline" android:background="@drawable/singleline"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageButton
android:id="@+id/iv_back" android:id="@+id/iv_back"
android:layout_width="@dimen/title_height" android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/transparent"
android:gravity="center" android:gravity="center"
android:onClick="@{onClickListener}" android:onClick="@{onClickListener}"
android:padding="16dp" android:padding="@dimen/all_margin"
android:src="@mipmap/back_white"/> android:src="@mipmap/back_white"/>
<TextView <TextView
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="onClickListener"
type="com.xingdata.zzdpos.util.OnClickListener" />
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao">
<ImageButton
android:id="@+id/iv_back"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="@color/transparent"
android:onClick="@{onClickListener}"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:text="订单记录"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_right"
app:layout_constraintStart_toEndOf="@id/iv_back"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/iv_right"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="@color/transparent"
android:src="@mipmap/scan_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="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
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- 全透明 --> <!-- 全透明 -->
<color name="all_transparent">#00000000</color> <color name="all_transparent">#00000000</color>
<color name="black_half">#50000000</color> <color name="black_half">#50000000</color>
<color name="gray_transparent">#50aaaaaa</color> <color name="white_transparent15">#0faaaaaa</color>
<color name="black">#101010</color> <color name="black">#101010</color>
<color name="black1">#273542</color> <color name="black1">#273542</color>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<color name="taobao_black">#333333</color> <color name="taobao_black">#333333</color>
<color name="offline_down_size">#777777</color> <color name="offline_down_size">#777777</color>
<color name="gary">#898989</color> <color name="gary">#898989</color>
<color name="gary1">#B1B1B1</color> <color name="gray1">#e6e6e6</color>
<color name="gray_lite">#c5c5c5</color> <color name="gray_lite">#c5c5c5</color>
<color name="title">#233142</color> <color name="title">#233142</color>
<color name="title1">#223852</color> <color name="title1">#223852</color>
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
<color name="blue2">#19346b</color> <color name="blue2">#19346b</color>
<color name="blue3">#4faaff</color> <color name="blue3">#4faaff</color>
<color name="darkgray">#323232</color> <color name="darkgray">#323232</color>
<color name="line1">#e6e6e6</color>
<color name="grey1">#E2E2E2</color> <color name="grey1">#E2E2E2</color>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<dimen name="all_title_size">26sp</dimen> <dimen name="all_title_size">26sp</dimen>
<dimen name="all_padding">10dp</dimen> <dimen name="all_padding">10dp</dimen>
<dimen name="all_text_size_big">22sp</dimen> <dimen name="all_text_size_big">22sp</dimen>
<dimen name="all_text_size_big_big">30sp</dimen>
<dimen name="all_text_size_super_big">25sp</dimen> <dimen name="all_text_size_super_big">25sp</dimen>
<dimen name="all_margin_left">15dp</dimen> <dimen name="all_margin_left">15dp</dimen>
<dimen name="title_height">50dp</dimen> <dimen name="title_height">50dp</dimen>
...@@ -31,6 +32,8 @@ ...@@ -31,6 +32,8 @@
<dimen name="edit_border">0.5dp</dimen> <dimen name="edit_border">0.5dp</dimen>
<!--一级标题--> <!--一级标题-->
<dimen name="text_primary_title">28sp</dimen> <dimen name="text_primary_title">28sp</dimen>
<!--一级标题-->
<dimen name="text_primary_title_smile">25sp</dimen>
<!--二级标题--> <!--二级标题-->
<dimen name="text_secondary_title">20sp</dimen> <dimen name="text_secondary_title">20sp</dimen>
<!--三级标题--> <!--三级标题-->
......
...@@ -413,15 +413,16 @@ ...@@ -413,15 +413,16 @@
<string name="integral_exchange_title">积分兑换规则</string> <string name="integral_exchange_title">积分兑换规则</string>
<!--优惠券--> <!--优惠券-->
<string name="return_ticket_title">新增优惠券</string> <string name="return_ticket_title">新增优惠券</string>
<string name="tv_rule">全场满%s元可用</string> <string name="tv_rule">满%s可用</string>
<string name="tv_date">有效期:%s</string> <string name="tv_money">%s 元优惠券</string>
<string name="tv_date">有效期至: %s</string>
<string name="tv_ticket_count"> 共 %s 种优惠券</string> <string name="tv_ticket_count"> 共 %s 种优惠券</string>
<!--商品组合--> <!--商品组合-->
<string name="bale_select_title">请选择商品</string> <string name="bale_select_title">请选择商品</string>
<string name="bale_title">新增优惠券</string> <string name="bale_title">新增优惠券</string>
<string name="tv_bale_count"> 共 %s 个组合</string> <string name="tv_bale_count"> 共 %s 个组合</string>
<string name="tv_bale_edit_count"> 共 %s 件</string> <string name="tv_bale_edit_count"> 共 %s 件</string>
<string name="money"> ¥ %s </string> <string name="money">¥ %s </string>
<!--会员管理--> <!--会员管理-->
<string name="adv_plan"> 晋级标准:消费金额满 %s</string> <string name="adv_plan"> 晋级标准:消费金额满 %s</string>
<string name="level_Number">共有 %s个会员等级</string> <string name="level_Number">共有 %s个会员等级</string>
...@@ -553,6 +554,13 @@ ...@@ -553,6 +554,13 @@
<string name="handover_bank">银行卡收款:</string> <string name="handover_bank">银行卡收款:</string>
<string name="handover_vip">储值卡收款:</string> <string name="handover_vip">储值卡收款:</string>
<!--<string name="handover_vip">储值卡收款</string>--> <!--<string name="handover_vip">储值卡收款</string>-->
<!--统计POS-->
<string name="statistics_hint">统计</string>
<string name="statistics_todayAmt_hint">今日销售额</string>
<string name="statistics_todayOrder_hint">今日订单数</string>
<string name="statistics_todayRecharge_hint">今日充值</string>
<string name="statistics_todayVipAdd_hint">今日新增会员</string>
</resources> </resources>
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</style> </style>
<style name="button_positive" parent="android:ButtonBar"> <style name="button_positive" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_red_button_background</item> <item name="android:background">@drawable/red_border_allradius</item>
<item name="android:textColor">@color/white</item> <item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item> <item name="android:gravity">center</item>
<item name="android:focusable">false</item> <item name="android:focusable">false</item>
......
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