Commit d6e44077 authored by 陈前's avatar 陈前

UI

parent 88c1b0d2
...@@ -57,14 +57,26 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -57,14 +57,26 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint); mViewBinding.edTitle.setHint(R.string.inventory_add_et_hint);
mViewBinding.edTitle.setText(""); 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 drawableTop = getResources().getDrawable(R.mipmap.but_unfurled);
Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_up); Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_up);
drawableTop.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10); 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); drawableBottom.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10);
mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null); mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null);
mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableTop, null); mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableTop, null);
initRecycycler();
mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() { mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() {
@Override @Override
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
...@@ -151,6 +163,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -151,6 +163,7 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
} }
mReplenishmentDetailAdapter.setEmptyView(getEmptyView()); mReplenishmentDetailAdapter.setEmptyView(getEmptyView());
mViewBinding.recyclerView.setAdapter(mReplenishmentDetailAdapter); mViewBinding.recyclerView.setAdapter(mReplenishmentDetailAdapter);
mReplenishmentDetailAdapter.setOnItemLongClickListener((adapter, view, position) -> { mReplenishmentDetailAdapter.setOnItemLongClickListener((adapter, view, position) -> {
PromptDialog delDialog = new PromptDialog(); PromptDialog delDialog = new PromptDialog();
delDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "是否删除").setClick(new View.OnClickListener() { delDialog.setDialogType(PromptDialog.PROMPTDIALOG_SELECT, "是否删除").setClick(new View.OnClickListener() {
......
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
android:paddingTop="@dimen/all_padding" android:paddingTop="@dimen/all_padding"
android:text="定货方" android:text="定货方"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size_low"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_supplier" /> app:layout_constraintTop_toBottomOf="@id/ll_supplier" />
......
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