Commit 48840b34 authored by 陈前's avatar 陈前

一键补货

parent 459929f6
......@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter;
import com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentDetailAdapter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
......@@ -50,8 +51,24 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
@Override
public void initView() {
Drawable drawableTop = getResources().getDrawable(R.mipmap.but_up);
Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_unfurled);
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);
initRecycycler();
mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
if (mViewBinding.llShop.getVisibility() != View.VISIBLE) {
mViewBinding.llShop.setVisibility(View.VISIBLE);
mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableBottom, null);
} else {
mViewBinding.llShop.setVisibility(View.GONE);
mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null);
}
}
});
// mViewBinding.btnSearch.setOnClickListener(view -> {
// scrollToItem(mViewBinding.etKeyword.getText().toString().trim());
// });
......@@ -89,7 +106,8 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
// }
// });
}
//
//
private void initRecycycler() {
mViewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
if (mPsb != null && mPsb.getPsbStatus() != null) {
......@@ -214,16 +232,16 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
/**
* 获取空页面
*
*
* @return 空页面
*/
protected View getEmptyView() {
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
TextView textView=((TextView) view.findViewById(R.id.tv_empty));
TextView textView = ((TextView) view.findViewById(R.id.tv_empty));
textView.setText(R.string.replenishment_detail_full);
textView.setTextColor(getResources().getColor(R.color.black));
return view;
}
private void scrollToItem(String string) {
if (string.length() == 0) {
......
......@@ -29,7 +29,6 @@
android:layout_marginEnd="@dimen/all_padding_left_right"
android:layout_marginStart="@dimen/all_padding_left_right"
android:text="贝斯克莱因和美妖精生日巧克力蛋糕"
app:layout_constraintStart_toEndOf="@id/img_goods"
app:layout_constraintTop_toTopOf="@id/img_goods" />
......@@ -58,10 +57,10 @@
android:id="@+id/tv_goods_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="规格"
android:textSize="@dimen/all_text_size_small"
android:background="@drawable/frame_frame_zhouyu_bg"
android:padding="@dimen/dp_4"
android:text="规格"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintBottom_toBottomOf="@id/tv_goods_code"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_goods_code" />
......@@ -91,15 +90,6 @@
app:layout_constraintTop_toTopOf="@id/tv_price_hint" />
<View
android:layout_width="@dimen/all_line_width"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/lyt_main_bg"
app:layout_constraintBottom_toBottomOf="@id/img_goods"
app:layout_constraintTop_toTopOf="@id/img_goods" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="wrap_content"
......@@ -107,8 +97,7 @@
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@id/tv_price_hint"
app:layout_constraintEnd_toEndOf="parent"
>
app:layout_constraintEnd_toEndOf="parent">
<ImageButton
android:id="@+id/btn_down"
......@@ -117,14 +106,14 @@
android:layout_marginEnd="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/white"
android:src="@mipmap/but_reduce"
tools:layout_editor_absoluteX="602dp"
tools:layout_editor_absoluteY="97dp" />
android:src="@mipmap/but_reduce" />
<EditText
android:id="@+id/et_count"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_4"
android:layout_weight="1"
android:background="@drawable/selector_edit_frame_blue_background"
android:gravity="center"
......@@ -132,8 +121,7 @@
android:inputType="number"
android:maxLength="4"
android:saveEnabled="false"
tools:layout_editor_absoluteX="540dp"
tools:layout_editor_absoluteY="192dp" />
android:textSize="@dimen/all_text_size_low" />
<ImageButton
android:id="@+id/btn_up"
......@@ -204,7 +192,6 @@
app:layout_constraintTop_toBottomOf="@id/tv_stock_hint" />
</android.support.constraint.ConstraintLayout>
......
......@@ -9,6 +9,7 @@
<dimen name="all_spacing">6dp</dimen>
<dimen name="all_sub_title_size">20sp</dimen>
<dimen name="big_text_size">18sp</dimen>
<dimen name="big_big_text_size">20sp</dimen>
<dimen name="sbig_text_size">25sp</dimen>
<dimen name="all_text_size">16sp</dimen>
<dimen name="all_text_size_small_title">17sp</dimen>
......
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