Commit f5e918f7 authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

parents 62c9b07f d68aac24
package com.xingdata.zzdpos.ui.feedback; package com.xingdata.zzdpos.ui.feedback;
import android.content.Context;
import android.databinding.DataBindingUtil; import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
...@@ -38,7 +42,8 @@ public class FeedBackActivity extends AppCompatActivity { ...@@ -38,7 +42,8 @@ public class FeedBackActivity extends AppCompatActivity {
mFeedBackBinding.editText.addTextChangedListener(new TextWatcher() { mFeedBackBinding.editText.addTextChangedListener(new TextWatcher() {
@Override @Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
mFeedBackBinding.setTextSize(mFeedBackBinding.editText.getText().toString().length() + ""); mFeedBackBinding.setTextSize(mFeedBackBinding.editText.getText().toString()
.length() + "");
} }
@Override @Override
...@@ -58,7 +63,8 @@ public class FeedBackActivity extends AppCompatActivity { ...@@ -58,7 +63,8 @@ public class FeedBackActivity extends AppCompatActivity {
ToastUtils.showShort("请详细描述下您遇到的问题"); ToastUtils.showShort("请详细描述下您遇到的问题");
} else { } else {
Feed feed = new Feed(); Feed feed = new Feed();
feed.setFeedText(mFeedBackBinding.editText.getText().toString() + "联系方式:" + mFeedBackBinding.editContactWay.getText().toString()); feed.setFeedText(mFeedBackBinding.editText.getText().toString() + "联系方式:" +
mFeedBackBinding.editContactWay.getText().toString());
feed.setOpMapId(LoginPresenter.loginReturnBean.getOpMapId()); feed.setOpMapId(LoginPresenter.loginReturnBean.getOpMapId());
feed.setOperMobile(LoginPresenter.loginReturnBean.getOperMobile()); feed.setOperMobile(LoginPresenter.loginReturnBean.getOperMobile());
feed.setFeedFlag("0"); feed.setFeedFlag("0");
...@@ -79,6 +85,36 @@ public class FeedBackActivity extends AppCompatActivity { ...@@ -79,6 +85,36 @@ public class FeedBackActivity extends AppCompatActivity {
}); });
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
@Override @Override
protected void onPause() { protected void onPause() {
KeyboardUtils.hideSoftInput(this); KeyboardUtils.hideSoftInput(this);
......
package com.xingdata.zzdpos.ui.login; package com.xingdata.zzdpos.ui.login;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.AppUtils; import com.blankj.utilcode.util.AppUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
...@@ -318,5 +322,35 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin ...@@ -318,5 +322,35 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
loadingDialog.dismiss(); loadingDialog.dismiss();
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.main; package com.xingdata.zzdpos.ui.main;
import android.app.Activity; import android.content.Context;
import android.databinding.DataBindingUtil; import android.databinding.DataBindingUtil;
import android.support.design.widget.TabLayout; import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment; import android.view.MotionEvent;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.Toast; import android.widget.Toast;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
...@@ -34,11 +35,13 @@ import io.reactivex.functions.Consumer; ...@@ -34,11 +35,13 @@ import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers; 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 {
public static MainActivity mainActivity; public static MainActivity mainActivity;
private long mExitTime; private long mExitTime;
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 FragmentViewAdapter 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<>();
...@@ -77,7 +80,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -77,7 +80,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
e.onNext(getLayoutInflater().inflate(R.layout.item_menu_bottom, null)); e.onNext(getLayoutInflater().inflate(R.layout.item_menu_bottom, null));
e.onNext(getLayoutInflater().inflate(R.layout.item_menu_bottom, null)); e.onNext(getLayoutInflater().inflate(R.layout.item_menu_bottom, null));
} }
}).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<View>() { }).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<View>() {
int i = 0; int i = 0;
@Override @Override
...@@ -86,7 +90,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -86,7 +90,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
ItemMenuBottomBinding itemMenuBottomBinding = DataBindingUtil.bind(view); ItemMenuBottomBinding itemMenuBottomBinding = DataBindingUtil.bind(view);
itemMenuBottomBinding.text.setText(titleInts[i]); itemMenuBottomBinding.text.setText(titleInts[i]);
if (i == 0) { if (i == 0) {
itemMenuBottomBinding.text.setTextColor(getResources().getColor(R.color.red_guanyu)); itemMenuBottomBinding.text.setTextColor(getResources().getColor(R.color
.red_guanyu));
} }
itemMenuBottomBinding.img.setImageResource(iconList[i]); itemMenuBottomBinding.img.setImageResource(iconList[i]);
itemMenuBottomBindings.add(itemMenuBottomBinding); itemMenuBottomBindings.add(itemMenuBottomBinding);
...@@ -104,16 +109,22 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -104,16 +109,22 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
public void onTabSelected(TabLayout.Tab tab) { public void onTabSelected(TabLayout.Tab tab) {
switch (tab.getPosition()) { switch (tab.getPosition()) {
case 0: case 0:
itemMenuBottomBindings.get(0).img.setImageResource(R.mipmap.icon_menu_cashier_1); itemMenuBottomBindings.get(0).img.setImageResource(R.mipmap
itemMenuBottomBindings.get(0).text.setTextColor(getResources().getColor(R.color.red_guanyu)); .icon_menu_cashier_1);
itemMenuBottomBindings.get(0).text.setTextColor(getResources().getColor(R
.color.red_guanyu));
break; break;
case 1: case 1:
itemMenuBottomBindings.get(1).img.setImageResource(R.mipmap.icon_menu_service_1); itemMenuBottomBindings.get(1).img.setImageResource(R.mipmap
itemMenuBottomBindings.get(1).text.setTextColor(getResources().getColor(R.color.red_guanyu)); .icon_menu_service_1);
itemMenuBottomBindings.get(1).text.setTextColor(getResources().getColor(R
.color.red_guanyu));
break; break;
case 2: case 2:
itemMenuBottomBindings.get(2).img.setImageResource(R.mipmap.icon_menu_myself_1); itemMenuBottomBindings.get(2).img.setImageResource(R.mipmap
itemMenuBottomBindings.get(2).text.setTextColor(getResources().getColor(R.color.red_guanyu)); .icon_menu_myself_1);
itemMenuBottomBindings.get(2).text.setTextColor(getResources().getColor(R
.color.red_guanyu));
break; break;
} }
} }
...@@ -122,16 +133,22 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -122,16 +133,22 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
public void onTabUnselected(TabLayout.Tab tab) { public void onTabUnselected(TabLayout.Tab tab) {
switch (tab.getPosition()) { switch (tab.getPosition()) {
case 0: case 0:
itemMenuBottomBindings.get(0).img.setImageResource(R.mipmap.icon_menu_cashier_0); itemMenuBottomBindings.get(0).img.setImageResource(R.mipmap
itemMenuBottomBindings.get(0).text.setTextColor(getResources().getColor(R.color.black_likui)); .icon_menu_cashier_0);
itemMenuBottomBindings.get(0).text.setTextColor(getResources().getColor(R
.color.black_likui));
break; break;
case 1: case 1:
itemMenuBottomBindings.get(1).img.setImageResource(R.mipmap.icon_menu_service_0); itemMenuBottomBindings.get(1).img.setImageResource(R.mipmap
itemMenuBottomBindings.get(1).text.setTextColor(getResources().getColor(R.color.black_likui)); .icon_menu_service_0);
itemMenuBottomBindings.get(1).text.setTextColor(getResources().getColor(R
.color.black_likui));
break; break;
case 2: case 2:
itemMenuBottomBindings.get(2).img.setImageResource(R.mipmap.icon_menu_myself_0); itemMenuBottomBindings.get(2).img.setImageResource(R.mipmap
itemMenuBottomBindings.get(2).text.setTextColor(getResources().getColor(R.color.black_likui)); .icon_menu_myself_0);
itemMenuBottomBindings.get(2).text.setTextColor(getResources().getColor(R
.color.black_likui));
break; break;
} }
} }
...@@ -175,4 +192,35 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -175,4 +192,35 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
mPresenter.clickHandover(); mPresenter.clickHandover();
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.manage.bale; package com.xingdata.zzdpos.ui.manage.bale;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.ActivityUtils; 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;
...@@ -122,4 +128,34 @@ public class BaleActivity extends BaseActivity<BalePresenter, ActivityBaleBindin ...@@ -122,4 +128,34 @@ public class BaleActivity extends BaseActivity<BalePresenter, ActivityBaleBindin
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
...@@ -65,10 +65,12 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd ...@@ -65,10 +65,12 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd
if (nowType == 1) { if (nowType == 1) {
//添加 //添加
listData.clear(); listData.clear();
mViewBinding.tvTitle.setText("添加组合");
mViewBinding.btnDismantling.setVisibility(View.GONE); mViewBinding.btnDismantling.setVisibility(View.GONE);
} else if (nowType == 2) { } else if (nowType == 2) {
//更新可以拆解商品 //更新可以拆解商品
mViewBinding.tvTitle.setText("编辑组合");
mViewBinding.btnDismantling.setVisibility(View.VISIBLE); mViewBinding.btnDismantling.setVisibility(View.VISIBLE);
if (ussku != null) { if (ussku != null) {
mViewBinding.etShopMoney.setText(ConvertUtil.fenToYuan(ussku.getSkuRetailPrice1())); mViewBinding.etShopMoney.setText(ConvertUtil.fenToYuan(ussku.getSkuRetailPrice1()));
......
...@@ -5,6 +5,7 @@ import android.view.KeyEvent; ...@@ -5,6 +5,7 @@ import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import com.blankj.utilcode.util.KeyboardUtils;
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.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -76,5 +77,4 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS ...@@ -76,5 +77,4 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS
Global.setFocus(mViewBinding.etKeyword, getActivity()); Global.setFocus(mViewBinding.etKeyword, getActivity());
} }
} }
package com.xingdata.zzdpos.ui.manage.inventory; package com.xingdata.zzdpos.ui.manage.inventory;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
...@@ -11,20 +16,18 @@ import com.xingdata.zzdpos.databinding.ActivityInventoryBinding; ...@@ -11,20 +16,18 @@ import com.xingdata.zzdpos.databinding.ActivityInventoryBinding;
import com.xingdata.zzdpos.model.Cs; import com.xingdata.zzdpos.model.Cs;
import com.xingdata.zzdpos.model.CsDetail; import com.xingdata.zzdpos.model.CsDetail;
import com.xingdata.zzdpos.model.Pager; import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Sssku; import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryAddFragment; import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryAddFragment;
import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryFragment; import com.xingdata.zzdpos.ui.manage.inventory.fragment.InventoryFragment;
import com.xingdata.zzdpos.ui.manage.manageMenu.ManageDateFragment; import com.xingdata.zzdpos.ui.manage.manageMenu.ManageDateFragment;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import java.util.List; import java.util.List;
public class InventoryActivity extends BaseActivity<InventoryPresenter, ActivityInventoryBinding> implements InventoryContract.View { public class InventoryActivity extends BaseActivity<InventoryPresenter, ActivityInventoryBinding>
implements InventoryContract.View {
private InventoryFragment mInventoryFragment = new InventoryFragment(); private InventoryFragment mInventoryFragment = new InventoryFragment();
private ManageDateFragment mManageDateFragment = new ManageDateFragment(); private ManageDateFragment mManageDateFragment = new ManageDateFragment();
private InventoryAddFragment mInventoryAddFragment; private InventoryAddFragment mInventoryAddFragment;
...@@ -139,6 +142,36 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity ...@@ -139,6 +142,36 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
} }
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.manage.otherselect; package com.xingdata.zzdpos.ui.manage.otherselect;
import android.text.InputType; import android.content.Context;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import com.blankj.utilcode.util.FragmentUtils; import com.blankj.utilcode.util.FragmentUtils;
...@@ -20,7 +23,8 @@ import com.xingdata.zzdpos.ui.manage.otherselect.fragment.OtherListFragment; ...@@ -20,7 +23,8 @@ import com.xingdata.zzdpos.ui.manage.otherselect.fragment.OtherListFragment;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ActivityOtherSelectBinding> implements OtherSelectContract.View { public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter,
ActivityOtherSelectBinding> implements OtherSelectContract.View {
private OtherListFragment mOtherListFragment = new OtherListFragment(); private OtherListFragment mOtherListFragment = new OtherListFragment();
private OtherDetailFragment mOtherDetailFragment = new OtherDetailFragment(); private OtherDetailFragment mOtherDetailFragment = new OtherDetailFragment();
LoadingDialog mLoadingDialog = new LoadingDialog(); LoadingDialog mLoadingDialog = new LoadingDialog();
...@@ -36,7 +40,8 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, Acti ...@@ -36,7 +40,8 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, Acti
mViewBinding.lyTitle.edTitle.setVisibility(View.GONE); mViewBinding.lyTitle.edTitle.setVisibility(View.GONE);
mViewBinding.lyTitle.tvTitle.setText("邻库查询"); mViewBinding.lyTitle.tvTitle.setText("邻库查询");
mViewBinding.lyTitle.tvTitle.setVisibility(View.VISIBLE); mViewBinding.lyTitle.tvTitle.setVisibility(View.VISIBLE);
FragmentUtils.add(getSupportFragmentManager(), mOtherListFragment, mViewBinding.fragmentContainer.getId(), false, true); FragmentUtils.add(getSupportFragmentManager(), mOtherListFragment, mViewBinding
.fragmentContainer.getId(), false, true);
mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() { mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override @Override
...@@ -88,7 +93,8 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, Acti ...@@ -88,7 +93,8 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, Acti
@Override @Override
public void showOsskuDetail(Ossku ossku) { public void showOsskuDetail(Ossku ossku) {
mOtherDetailFragment.setOssku(ossku); mOtherDetailFragment.setOssku(ossku);
FragmentUtils.add(getSupportFragmentManager(), mOtherDetailFragment, mViewBinding.fragmentContainer.getId(), false, true); FragmentUtils.add(getSupportFragmentManager(), mOtherDetailFragment, mViewBinding
.fragmentContainer.getId(), false, true);
} }
@Override @Override
...@@ -108,4 +114,34 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, Acti ...@@ -108,4 +114,34 @@ public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, Acti
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.manage.replenishment; package com.xingdata.zzdpos.ui.manage.replenishment;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
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.ActivityReplenishmentBinding; import com.xingdata.zzdpos.databinding.ActivityReplenishmentBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Psb; import com.xingdata.zzdpos.model.Psb;
import com.xingdata.zzdpos.model.Sssku; import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentDetailFragment; import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentDetailFragment;
import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentFragment; import com.xingdata.zzdpos.ui.manage.replenishment.fragment.ReplenishmentFragment;
import java.util.List; import java.util.List;
public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ActivityReplenishmentBinding> implements ReplenishmentContract.View { public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
ActivityReplenishmentBinding> implements ReplenishmentContract.View {
private ReplenishmentFragment mReplenishmentFragment = new ReplenishmentFragment(); private ReplenishmentFragment mReplenishmentFragment = new ReplenishmentFragment();
private ReplenishmentDetailFragment mReplenishmentDetailFragment = new ReplenishmentDetailFragment(); private ReplenishmentDetailFragment mReplenishmentDetailFragment = new
ReplenishmentDetailFragment();
private boolean isAllowFragment = true; private boolean isAllowFragment = true;
LoadingDialog mLoadingDialog = new LoadingDialog(); LoadingDialog mLoadingDialog = new LoadingDialog();
...@@ -41,10 +47,10 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -41,10 +47,10 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
@Override @Override
public void showReplenishmentList(List<Psb> A, List<Psb> B, List<Psb> C) { public void showReplenishmentList(List<Psb> A, List<Psb> B, List<Psb> C) {
if (mReplenishmentFragment.isAdded()){ if (mReplenishmentFragment.isAdded()) {
mReplenishmentFragment.showReplenishmentList(A, B, C,false); mReplenishmentFragment.showReplenishmentList(A, B, C, false);
}else { } else {
mReplenishmentFragment.showReplenishmentList(A, B, C,true); mReplenishmentFragment.showReplenishmentList(A, B, C, true);
loadRootFragment(R.id.f_bottom, mReplenishmentFragment, true, false); loadRootFragment(R.id.f_bottom, mReplenishmentFragment, true, false);
} }
...@@ -92,5 +98,33 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -92,5 +98,33 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
isAllowFragment = is; isAllowFragment = is;
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.manage.sssku; package com.xingdata.zzdpos.ui.manage.sssku;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
...@@ -26,7 +31,8 @@ import com.xingdata.zzdpos.ui.manage.sssku.fragment.VipFragment; ...@@ -26,7 +31,8 @@ import com.xingdata.zzdpos.ui.manage.sssku.fragment.VipFragment;
import java.util.List; import java.util.List;
public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBinding> implements SsskuContract.View { public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBinding> implements
SsskuContract.View {
private ManagerFragment mManagerFragment = new ManagerFragment(); private ManagerFragment mManagerFragment = new ManagerFragment();
private SearchFragment mSearchFragment = new SearchFragment(); private SearchFragment mSearchFragment = new SearchFragment();
...@@ -276,4 +282,34 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -276,4 +282,34 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
mViewBinding.etSearch.setText(""); mViewBinding.etSearch.setText("");
mViewBinding.clTitle.requestFocus(); mViewBinding.clTitle.requestFocus();
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.manage.user; package com.xingdata.zzdpos.ui.manage.user;
import android.os.Bundle; import android.content.Context;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
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.ActivityUserBinding; import com.xingdata.zzdpos.databinding.ActivityUserBinding;
import com.xingdata.zzdpos.databinding.ActivityVipBinding;
import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Mscard;
import com.xingdata.zzdpos.model.Oper; import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.model.Pager; import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Sta; import com.xingdata.zzdpos.model.Sta;
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.model.VipRechargeOrder;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.manage.user.fragment.UserListFragment;
import com.xingdata.zzdpos.ui.vip.VipContract;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
import com.xingdata.zzdpos.view.ViewTools;
import java.util.List; public class UserActivity extends BaseActivity<UserPresenter, ActivityUserBinding> implements
UserContract.View {
public class UserActivity extends BaseActivity<UserPresenter, ActivityUserBinding> implements UserContract.View {
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -64,4 +52,34 @@ public class UserActivity extends BaseActivity<UserPresenter, ActivityUserBindin ...@@ -64,4 +52,34 @@ public class UserActivity extends BaseActivity<UserPresenter, ActivityUserBindin
mPresenter.userInfoFragment.pop(); mPresenter.userInfoFragment.pop();
mPresenter.userListFragment.delUserSus(); mPresenter.userListFragment.delUserSus();
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.marketing.integral; package com.xingdata.zzdpos.ui.marketing.integral;
import android.content.Context;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
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;
...@@ -16,7 +19,6 @@ import com.xingdata.zzdpos.model.Ubound; ...@@ -16,7 +19,6 @@ 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.fragment.IntegralIndexFragment; import com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralIndexFragment;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.List; import java.util.List;
...@@ -88,4 +90,33 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn ...@@ -88,4 +90,33 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
mPresenter.exchangeQuery(loadingDialog); mPresenter.exchangeQuery(loadingDialog);
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.marketing.integral.fragment; package com.xingdata.zzdpos.ui.marketing.integral.fragment;
import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View; import android.view.View;
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.KeyboardUtils;
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;
...@@ -177,6 +180,9 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter, ...@@ -177,6 +180,9 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
if (loadingDialog != null) { if (loadingDialog != null) {
loadingDialog.dismiss(); loadingDialog.dismiss();
} }
mViewBinding.etIntegralTimeLimit.addTextChangedListener(textWatcher);
mViewBinding.etIntegralCategoryTimeLimit.addTextChangedListener(textWatcher);
mViewBinding.etShopTimeLimit.addTextChangedListener(textWatcher);
} }
private void setShopTypeClick(Boolean b) { private void setShopTypeClick(Boolean b) {
...@@ -230,7 +236,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter, ...@@ -230,7 +236,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + ""); mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + "");
} }
} }
break; break;
case 1: { case 1: {
...@@ -528,6 +533,27 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter, ...@@ -528,6 +533,27 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
public void setNowType(int nowType) { public void setNowType(int nowType) {
this.nowType = nowType; this.nowType = nowType;
} }
TextWatcher textWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
String tempStr = editable.toString();
int len = tempStr.length();
if (len >= 1 && tempStr.startsWith("0")) {
editable.replace(0, 1, "");
}
}
};
// //
// /** // /**
// * 显示软键盘,Dialog使用 // * 显示软键盘,Dialog使用
......
package com.xingdata.zzdpos.ui.marketing.ms; package com.xingdata.zzdpos.ui.marketing.ms;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
...@@ -24,7 +29,8 @@ import com.xingdata.zzdpos.ui.marketing.ms.model.User; ...@@ -24,7 +29,8 @@ import com.xingdata.zzdpos.ui.marketing.ms.model.User;
import java.util.List; import java.util.List;
public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, ActivityMsBinding> implements MsContract.View<Sku> { public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, ActivityMsBinding>
implements MsContract.View<Sku> {
private ManagerFragment mManagerFragment = new ManagerFragment(); private ManagerFragment mManagerFragment = new ManagerFragment();
private EditorFragment mEditorFragment = new EditorFragment(); private EditorFragment mEditorFragment = new EditorFragment();
...@@ -182,4 +188,33 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A ...@@ -182,4 +188,33 @@ public class MsActivity<Sku extends BaseSku> extends BaseActivity<MsPresenter, A
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.marketing.recharge; package com.xingdata.zzdpos.ui.marketing.recharge;
import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
...@@ -35,6 +40,34 @@ public class RechargeRuleActivity extends BaseActivity<RechargeRulePresenter, Ac ...@@ -35,6 +40,34 @@ public class RechargeRuleActivity extends BaseActivity<RechargeRulePresenter, Ac
mPresenter.mscardQuery(); mPresenter.mscardQuery();
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.marketing.ticket; package com.xingdata.zzdpos.ui.marketing.ticket;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
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;
...@@ -68,4 +74,34 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter, ...@@ -68,4 +74,34 @@ public class ReturnTicketActivity extends BaseActivity<ReturnTicketPresenter,
loadingDialog.dismiss(); loadingDialog.dismiss();
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.marketing.viplevel; package com.xingdata.zzdpos.ui.marketing.viplevel;
import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
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.ActivityVipBinding;
import com.xingdata.zzdpos.databinding.ActivityVipLevelBinding; import com.xingdata.zzdpos.databinding.ActivityVipLevelBinding;
import com.xingdata.zzdpos.model.Level; import com.xingdata.zzdpos.model.Level;
import com.xingdata.zzdpos.model.Mscard;
import com.xingdata.zzdpos.model.Pager; import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saleorder; public class LevelActivity extends BaseActivity<LevelPresenter, ActivityVipLevelBinding>
import com.xingdata.zzdpos.model.Sta; implements LevelContract.View {
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.model.VipRechargeOrder;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.vip.VipContract;
import com.xingdata.zzdpos.ui.vip.VipPresenter;
import com.xingdata.zzdpos.view.ViewTools;
import java.util.List;
public class LevelActivity extends BaseActivity<LevelPresenter, ActivityVipLevelBinding> implements LevelContract.View {
private Bundle mBundle; private Bundle mBundle;
@Override @Override
...@@ -47,8 +37,36 @@ public class LevelActivity extends BaseActivity<LevelPresenter, ActivityVipLevel ...@@ -47,8 +37,36 @@ public class LevelActivity extends BaseActivity<LevelPresenter, ActivityVipLevel
@Override @Override
public void updateVipLevelSus(Level level) { public void updateVipLevelSus(Level level) {
mPresenter.vipLevelEditFragment.pop(); mPresenter.vipLevelEditFragment.pop();
mPresenter.getVipLevel(0,200); mPresenter.getVipLevel(0, 200);
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.payment; package com.xingdata.zzdpos.ui.payment;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
...@@ -33,4 +38,33 @@ public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaym ...@@ -33,4 +38,33 @@ public class PaymentActivity extends BaseActivity<PaymentPresenter, ActivityPaym
intent.putExtra(C.EXTRA_KEY.SETTLE_EXTRA, amt); intent.putExtra(C.EXTRA_KEY.SETTLE_EXTRA, amt);
ActivityUtils.startActivity(intent); ActivityUtils.startActivity(intent);
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.sendticke; package com.xingdata.zzdpos.ui.sendticke;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.ActivityUtils; 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;
...@@ -84,4 +90,33 @@ public class SendTicketActivity extends BaseActivity<SendTicketPresenter, ...@@ -84,4 +90,33 @@ public class SendTicketActivity extends BaseActivity<SendTicketPresenter,
loadingDialog.dismiss(); loadingDialog.dismiss();
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.settle; package com.xingdata.zzdpos.ui.settle;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
...@@ -219,5 +224,33 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -219,5 +224,33 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
break; break;
} }
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.statistics; package com.xingdata.zzdpos.ui.statistics;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
...@@ -122,5 +127,33 @@ public class StatisticsActivity extends BaseActivity<StatisticsPresenter, Activi ...@@ -122,5 +127,33 @@ public class StatisticsActivity extends BaseActivity<StatisticsPresenter, Activi
// } // }
return super.onKeyDown(keyCode, event); return super.onKeyDown(keyCode, event);
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
...@@ -3,10 +3,14 @@ package com.xingdata.zzdpos.ui.store; ...@@ -3,10 +3,14 @@ package com.xingdata.zzdpos.ui.store;
import android.animation.Keyframe; import android.animation.Keyframe;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder; import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.blankj.utilcode.constant.PermissionConstants; import com.blankj.utilcode.constant.PermissionConstants;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
...@@ -34,7 +38,8 @@ import java.util.ArrayList; ...@@ -34,7 +38,8 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBinding> implements StoreContract.View { public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBinding> implements
StoreContract.View {
private StoreFragment mStoreFragment = new StoreFragment(); private StoreFragment mStoreFragment = new StoreFragment();
private SearchFragment mSearchFragment = new SearchFragment(); private SearchFragment mSearchFragment = new SearchFragment();
...@@ -65,7 +70,8 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -65,7 +70,8 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
return false; return false;
}); });
mViewBinding.btnScan.setOnClickListener(view -> PermissionUtils.permission(PermissionConstants.CAMERA) mViewBinding.btnScan.setOnClickListener(view -> PermissionUtils.permission
(PermissionConstants.CAMERA)
.callback(new PermissionUtils.FullCallback() { .callback(new PermissionUtils.FullCallback() {
@Override @Override
public void onGranted(List<String> permissionsGranted) { public void onGranted(List<String> permissionsGranted) {
...@@ -73,7 +79,8 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -73,7 +79,8 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
} }
@Override @Override
public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) { public void onDenied(List<String> permissionsDeniedForever, List<String>
permissionsDenied) {
} }
}) })
.request()); .request());
...@@ -189,7 +196,8 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -189,7 +196,8 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
* @param scaleLarge 放大比例 * @param scaleLarge 放大比例
* @param duration 时间 * @param duration 时间
*/ */
private void startShakeByPropertyAnim(View view, float scaleSmall, float scaleLarge, long duration) { private void startShakeByPropertyAnim(View view, float scaleSmall, float scaleLarge, long
duration) {
if (view == null) { if (view == null) {
return; return;
} }
...@@ -208,8 +216,39 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -208,8 +216,39 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
Keyframe.ofFloat(0.75f, scaleLarge), Keyframe.ofFloat(0.75f, scaleLarge),
Keyframe.ofFloat(1.0f, 1.0f) Keyframe.ofFloat(1.0f, 1.0f)
); );
ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(view, scaleXValuesHolder, scaleYValuesHolder); ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(view,
scaleXValuesHolder, scaleYValuesHolder);
objectAnimator.setDuration(duration); objectAnimator.setDuration(duration);
objectAnimator.start(); objectAnimator.start();
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
package com.xingdata.zzdpos.ui.vip; package com.xingdata.zzdpos.ui.vip;
import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity; import com.xingdata.zzdpos.base.BaseActivity;
...@@ -17,13 +21,12 @@ import com.xingdata.zzdpos.model.Trule; ...@@ -17,13 +21,12 @@ import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.model.Vip; import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.model.VipRechargeOrder; import com.xingdata.zzdpos.model.VipRechargeOrder;
import com.xingdata.zzdpos.ui.dialog.PromptDialog; import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.vip.fragment.VipInfoEditFragment;
import com.xingdata.zzdpos.ui.vip.fragment.VipListFragment;
import com.xingdata.zzdpos.view.ViewTools; import com.xingdata.zzdpos.view.ViewTools;
import java.util.List; import java.util.List;
public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding> implements VipContract.View { public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding> implements
VipContract.View {
private Bundle mBundle; private Bundle mBundle;
@Override @Override
...@@ -94,7 +97,8 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding> ...@@ -94,7 +97,8 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding>
@Override @Override
public void rechangeErr(Vip vip, Long amtPay, Long amtSend, String mes) { public void rechangeErr(Vip vip, Long amtPay, Long amtSend, String mes) {
PromptDialog promptDialog = new PromptDialog(); PromptDialog promptDialog = new PromptDialog();
promptDialog.setDialogType(PromptDialog.PROMPTDIALOG_ERROR, "支付失败").setCustomButton("重新支付", new View.OnClickListener() { promptDialog.setDialogType(PromptDialog.PROMPTDIALOG_ERROR, "支付失败").setCustomButton
("重新支付", new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
mPresenter.fullVip(vip, amtPay, amtSend); mPresenter.fullVip(vip, amtPay, amtSend);
...@@ -118,4 +122,33 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding> ...@@ -118,4 +122,33 @@ public class VipActivity extends BaseActivity<VipPresenter, ActivityVipBinding>
mPresenter.vipListFragment.getVipNumberSus(sta); mPresenter.vipListFragment.getVipNumberSus(sta);
} }
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();
if (isShouldHideKeyboard(v, ev)) {
InputMethodManager imm =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS
);
}
}
return super.dispatchTouchEvent(ev);
}
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
v.getLocationInWindow(l);
int left = l[0],
top = l[1],
bottom = top + v.getHeight(),
right = left + v.getWidth();
return !(event.getX() > left && event.getX() < right
&& event.getY() > top && event.getY() < bottom);
}
return false;
}
} }
...@@ -49,25 +49,23 @@ ...@@ -49,25 +49,23 @@
app:layout_constraintTop_toBottomOf="parent"> app:layout_constraintTop_toBottomOf="parent">
<TextView <TextView
android:id="@+id/tv_keyword" android:id="@+id/tv_title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/all_seach_height" android:layout_height="@dimen/all_seach_height"
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_gray_r1"
android:clickable="true" android:clickable="true"
android:drawableLeft="@mipmap/ic_search"
android:drawablePadding="@dimen/all_spacing" android:drawablePadding="@dimen/all_spacing"
android:enabled="true" android:enabled="true"
android:gravity="center|left" android:gravity="center"
android:hint="@string/store_search_hint"
android:maxLength="20" android:maxLength="20"
android:maxLines="1" android:maxLines="1"
android:onClick="@{OnClickListener}" android:onClick="@{OnClickListener}"
android:paddingLeft="@dimen/all_padding" android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black_likui" android:text="新增组合"
android:textColor="@color/black_baozheng"
android:textColorHint="@color/gray_huanggai" android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/> android:textSize="@dimen/all_sub_title_size"/>
<ImageButton <ImageButton
android:id="@+id/btn_scan" android:id="@+id/btn_scan"
...@@ -122,10 +120,45 @@ ...@@ -122,10 +120,45 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_left" android:id="@+id/ll_keyword"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/cl_title" android:layout_below="@+id/cl_title"
android:background="@color/white"
android:orientation="horizontal"
>
<TextView
android:id="@+id/tv_keyword"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding"
android:layout_marginTop="@dimen/padding_small"
android:background="@drawable/shape_gray_r1"
android:clickable="true"
android:drawableLeft="@mipmap/ic_search"
android:drawablePadding="@dimen/all_padding"
android:enabled="true"
android:gravity="center|left"
android:hint="@string/store_search_hint"
android:maxLength="20"
android:maxLines="1"
android:onClick="@{OnClickListener}"
android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size_low"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_keyword"
android:orientation="vertical" android:orientation="vertical"
> >
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao" android:background="@color/white_caocao"
app:layout_constraintBottom_toTopOf="@id/btn_add" app:layout_constraintBottom_toTopOf="@id/tv_keyword"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageButton <ImageButton
...@@ -52,25 +52,22 @@ ...@@ -52,25 +52,22 @@
app:layout_constraintTop_toBottomOf="parent"> app:layout_constraintTop_toBottomOf="parent">
<TextView <TextView
android:id="@+id/tv_keyword"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/all_seach_height" android:layout_height="@dimen/all_seach_height"
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_gray_r1"
android:clickable="true" android:clickable="true"
android:drawableLeft="@mipmap/ic_search"
android:drawablePadding="@dimen/all_spacing" android:drawablePadding="@dimen/all_spacing"
android:enabled="true" android:enabled="true"
android:gravity="center|left" android:gravity="center"
android:hint="@string/store_search_hint"
android:maxLength="20" android:maxLength="20"
android:maxLines="1" android:maxLines="1"
android:onClick="@{OnClickListener}" android:onClick="@{OnClickListener}"
android:paddingLeft="@dimen/all_padding" android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black_likui" android:text="商品组合"
android:textColor="@color/black_baozheng"
android:textColorHint="@color/gray_huanggai" android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/> android:textSize="@dimen/all_sub_title_size"/>
<ImageButton <ImageButton
android:id="@+id/btn_scan" android:id="@+id/btn_scan"
...@@ -91,10 +88,39 @@ ...@@ -91,10 +88,39 @@
app:layout_constraintBottom_toBottomOf="parent"/> app:layout_constraintBottom_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
<View <LinearLayout
android:id="@+id/ll_keyword"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="wrap_content"
android:background="@color/gray_huanggai"></View> android:background="@color/white"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@+id/cl_title">
<TextView
android:id="@+id/tv_keyword"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding"
android:layout_marginTop="@dimen/padding_small"
android:background="@drawable/shape_gray_r1"
android:clickable="true"
android:drawableLeft="@mipmap/ic_search"
android:drawablePadding="@dimen/all_padding"
android:enabled="true"
android:gravity="center|left"
android:hint="@string/store_search_hint"
android:maxLength="20"
android:maxLines="1"
android:onClick="@{OnClickListener}"
android:paddingLeft="@dimen/all_padding"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size_low"
/>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_add" android:id="@+id/btn_add"
...@@ -107,7 +133,7 @@ ...@@ -107,7 +133,7 @@
app:layout_constraintBottom_toTopOf="@id/ll_menu" app:layout_constraintBottom_toTopOf="@id/ll_menu"
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/cl_title"> app:layout_constraintTop_toBottomOf="@+id/ll_keyword">
<ImageView <ImageView
...@@ -126,11 +152,6 @@ ...@@ -126,11 +152,6 @@
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@+id/btn_add"></View>
<TextView <TextView
android:id="@+id/btn_group" android:id="@+id/btn_group"
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
app:layout_constraintBottom_toTopOf="parent" app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="parent" app:layout_constraintTop_toBottomOf="parent"
app:placeholderImage="@mipmap/icon_menu_service_1" app:placeholderImage="@mipmap/vip_send"
app:roundAsCircle="true" app:roundAsCircle="true"
app:roundingBorderColor="@color/gray_huanggai" app:roundingBorderColor="@color/gray_huanggai"
app:roundingBorderWidth="@dimen/all_line_width"/> app:roundingBorderWidth="@dimen/all_line_width"/>
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}" android:text="@{@string/settle_vip_dis_rate_hint + disRate + @string/settle_vip_dis_rate}"
android:textColor="@color/black_zhangfei" android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_caption_size" android:textSize="@dimen/all_caption_size"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="parent" app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@id/cb_point" app:layout_constraintRight_toLeftOf="@id/cb_point"
app:layout_constraintTop_toBottomOf="parent"/> app:layout_constraintTop_toBottomOf="parent"/>
...@@ -128,6 +129,7 @@ ...@@ -128,6 +129,7 @@
android:layout_marginEnd="@dimen/all_margin" android:layout_marginEnd="@dimen/all_margin"
android:button="@mipmap/but_elect02" android:button="@mipmap/but_elect02"
android:contentDescription="@string/settle_balance" android:contentDescription="@string/settle_balance"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="parent" app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent"/> app:layout_constraintTop_toBottomOf="parent"/>
...@@ -166,11 +168,13 @@ ...@@ -166,11 +168,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white"/> android:background="@color/white"/>
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:background="@color/gray_huanggai"/> android:background="@color/gray_huanggai"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
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