Commit 17faa80c authored by 王海's avatar 王海

Merge remote-tracking branch 'origin/master'

parents 605ce35b 706685fb
......@@ -72,8 +72,9 @@ public class InventoryActivity extends BaseActivity<InventoryPresenter, Activity
@Override
public void showDateFragment() {
start(mManageDateFragment);
changeTitle(null, false);
FragmentUtils.add(getSupportFragmentManager(), mManageDateFragment, R.id.f_bottom, false, true);
}
@Override
......
......@@ -31,6 +31,7 @@ public class ManageDateFragment extends BaseFragment<InventoryPresenter, Fragmen
@Override
public void initView() {
mPresenter.changeTitle(null, false);
initListener();
textSize = mViewBinding.editStart.getTextSize();
......
......@@ -57,14 +57,26 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint);
mViewBinding.edTitle.setText("");
initRecycycler();
initOnClickListener();
new android.os.Handler().postDelayed(new Runnable() {
@Override
public void run() {
mViewBinding.recyclerView.scrollToPosition(0);
}
}, 1);
}
private void initOnClickListener() {
Drawable drawableTop = getResources().getDrawable(R.mipmap.but_unfurled);
Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_up);
drawableTop.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10);
drawableBottom.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10);
mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null);
mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableTop, null);
initRecycycler();
mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
......@@ -151,6 +163,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
}
mReplenishmentDetailAdapter.setEmptyView(getEmptyView());
mViewBinding.recyclerView.setAdapter(mReplenishmentDetailAdapter);
mReplenishmentDetailAdapter.setOnItemLongClickListener((adapter, view, position) -> {
PromptDialog delDialog = new PromptDialog();
delDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "是否删除").setClick(new View.OnClickListener() {
......
......@@ -5,8 +5,10 @@ import android.databinding.DataBindingUtil;
import android.graphics.Typeface;
import android.support.design.widget.TabLayout;
import android.text.InputType;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView;
......@@ -68,27 +70,32 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter,
mViewBinding.edTitle.setHint("请输入供货商名称");
mViewBinding.edTitle.setInputType(InputType.TYPE_CLASS_TEXT);
mViewBinding.edTitle.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
if (i == EditorInfo.IME_ACTION_SEARCH) {
if (mViewBinding.edTitle.getText().toString().trim().length() == 0) {
ToastUtils.showShort("请输入供货商名称");
return true;
}
switch (mViewBinding.tab.getSelectedTabPosition()) {
case 0:
mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(0));
break;
case 1:
mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(1));
break;
case 2:
mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(2));
break;
}
}
return true;
mViewBinding.edTitle.setOnClickListener(view -> {
if (mViewBinding.edTitle.getText().toString().trim().length() == 0) {
ToastUtils.showShort("请输入供货商名称");
return;
}
switch (mViewBinding.tab.getSelectedTabPosition()) {
case 0:
mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(0));
break;
case 1:
mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(1));
break;
case 2:
mPresenter.searchPsbList(mViewBinding.edTitle.getText().toString(), (ReplenishmentListFragment) fragments.get(2));
break;
}
});
}
......
......@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white_caocao"
......@@ -22,22 +22,25 @@
android:layout_marginTop="@dimen/padding_small"
android:drawablePadding="@dimen/all_padding"
android:hint="@string/other_select_edit_hint"
android:textColor="@color/black_likui"
android:inputType="text"
android:imeOptions="actionSearch"
android:inputType="text"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low"
/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:layout_below="@id/ed_title"
android:background="@color/gray_huanggai" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_below="@id/ed_title"
android:layout_marginTop="-1dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_other_selcet"
......@@ -46,7 +49,14 @@
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:layout_below="@id/ed_title"
android:background="@color/gray_huanggai" />
</RelativeLayout>
</layout>
\ No newline at end of file
......@@ -24,7 +24,7 @@
android:layout_marginTop="@dimen/padding_small"
android:drawablePadding="@dimen/all_padding"
android:hint="@string/statistics_order_edit_hint"
android:inputType="number"
android:imeOptions="actionSearch"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low"
......
......@@ -209,7 +209,7 @@
android:paddingTop="@dimen/all_padding"
android:text="定货方"
android:textColor="@color/black"
android:textSize="@dimen/all_text_size"
android:textSize="@dimen/all_text_size_low"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_supplier" />
......@@ -503,11 +503,7 @@
android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:layout_above="@id/ed_title"
android:background="@color/gray_huanggai" />
<View
android:layout_width="match_parent"
......
......@@ -27,7 +27,7 @@
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/singleline_white_gray"
android:background="@color/white_caocao"
android:paddingBottom="@dimen/all_padding">
<com.facebook.drawee.view.SimpleDraweeView
......
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