Commit db59de93 authored by zhang_z's avatar zhang_z

密码输入Fragment;

parent 6ad83c87
...@@ -16,6 +16,7 @@ import com.xingdata.zzdpos.model.Vip; ...@@ -16,6 +16,7 @@ import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.main.MainActivity; import com.xingdata.zzdpos.ui.main.MainActivity;
import com.xingdata.zzdpos.ui.settle.fragment.CashPayFragment; import com.xingdata.zzdpos.ui.settle.fragment.CashPayFragment;
import com.xingdata.zzdpos.ui.settle.fragment.PasswordFragment;
import com.xingdata.zzdpos.ui.settle.fragment.PayResultFragment; import com.xingdata.zzdpos.ui.settle.fragment.PayResultFragment;
import com.xingdata.zzdpos.ui.settle.fragment.SettleFragment; import com.xingdata.zzdpos.ui.settle.fragment.SettleFragment;
import com.xingdata.zzdpos.ui.settle.fragment.TicketFragment; import com.xingdata.zzdpos.ui.settle.fragment.TicketFragment;
...@@ -32,6 +33,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -32,6 +33,7 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
private VipFragment mVipFragment = new VipFragment(); private VipFragment mVipFragment = new VipFragment();
private CashPayFragment mCashPayFragment = new CashPayFragment(); private CashPayFragment mCashPayFragment = new CashPayFragment();
private PasswordFragment mPasswordFragment = new PasswordFragment();
private PayResultFragment mPayResultFragment = new PayResultFragment(); private PayResultFragment mPayResultFragment = new PayResultFragment();
private LoadingDialog mLoadingDialog = new LoadingDialog(); private LoadingDialog mLoadingDialog = new LoadingDialog();
...@@ -123,7 +125,10 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -123,7 +125,10 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
case C.PAY_CHANNEL.CASH: case C.PAY_CHANNEL.CASH:
this.start(mCashPayFragment); this.start(mCashPayFragment);
break; break;
case C.PAY_CHANNEL.TALLY:
case C.PAY_CHANNEL.CARD:
mPasswordFragment.show(this);
break;
} }
} }
......
package com.xingdata.zzdpos.ui.settle.fragment;
import com.blankj.utilcode.util.FragmentUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseSheetDialog;
import com.xingdata.zzdpos.databinding.DialogPasswordBinding;
import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.view.InputerView;
public class PasswordFragment extends BaseSheetDialog<SettlePresenter, DialogPasswordBinding> {
private InputerView<SettlePresenter> mInputerView = new InputerView<>();
@Override
protected boolean isTransparentBackground() {
return true;
}
@Override
public int getLayoutId() {
return R.layout.dialog_password;
}
@Override
public void initView() {
FragmentUtils.add(getFragmentManager(), mInputerView, R.id.f_inputer);
}
}
...@@ -102,7 +102,12 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -102,7 +102,12 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
* @param skugrpId 分组ID * @param skugrpId 分组ID
*/ */
public void loadSkugrpState(Long skugrpId) { public void loadSkugrpState(Long skugrpId) {
for (int i = 0; i < mSkugrpAdapter.getData().size(); i++) {
if (mSkugrpAdapter.getData().get(i).getSkuGrpId().longValue() == skugrpId) {
mSkugrpAdapter.setSelectedPosition(i);
}
}
mSkugrpAdapter.notifyDataSetChanged();
} }
/** /**
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:background="@color/transparent"
android:gravity="bottom">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="会员账户支付"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_spacing"
android:gravity="center"
android:text="$30.00"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/fragment_settle_bigtextsize" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/all_margin"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/shape_white_round_rectangle_dark"
android:gravity="center"
android:text="*"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" />
<TextView
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/shape_white_round_rectangle_dark"
android:gravity="center"
android:text="*"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" />
<TextView
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/shape_white_round_rectangle_dark"
android:gravity="center"
android:text="*"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" />
<TextView
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/shape_white_round_rectangle_dark"
android:gravity="center"
android:text="*"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" />
<TextView
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/shape_white_round_rectangle_dark"
android:gravity="center"
android:text="*"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" />
<TextView
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/shape_white_round_rectangle_dark"
android:gravity="center"
android:text="*"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<FrameLayout
android:id="@+id/f_inputer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="7"
android:background="@color/red_xishi" />
</LinearLayout>
</layout>
\ No newline at end of file
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