Commit c7f919c2 authored by 陈前's avatar 陈前

UI

parent 36abaaed
...@@ -27,6 +27,7 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog; ...@@ -27,6 +27,7 @@ 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.manage.inventory.InventoryPresenter; import com.xingdata.zzdpos.ui.manage.inventory.InventoryPresenter;
import com.xingdata.zzdpos.ui.manage.inventory.adpter.InventoryAdapter; import com.xingdata.zzdpos.ui.manage.inventory.adpter.InventoryAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.MyMenuItemDecoration; import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -71,7 +72,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment ...@@ -71,7 +72,7 @@ public class InventoryFragment extends BaseFragment<InventoryPresenter, Fragment
Drawable drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai); Drawable drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai);
mInventoryAdapter.bindToRecyclerView( mViewBinding.recyclerInventory); mInventoryAdapter.bindToRecyclerView( mViewBinding.recyclerInventory);
mViewBinding.recyclerInventory.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recyclerInventory.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh); mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mInventoryAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerInventory); mInventoryAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerInventory);
......
...@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.model.Ossku; ...@@ -22,6 +22,7 @@ import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.model.Pager; import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter; import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter;
import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter; import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
...@@ -46,7 +47,7 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -46,7 +47,7 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
@Override @Override
public void initView() { public void initView() {
drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai); drawable = getResources().getDrawable(R.drawable.singleline_zhouyu_huanggai);
listItemDecoration = new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable, 0); listItemDecoration = new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(), 16), drawable, 0);
mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>()); mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>());
mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select)); mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select));
mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity()));
...@@ -111,9 +112,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme ...@@ -111,9 +112,10 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
} }
public void setKeyword(String s){ public void setKeyword(String s) {
mViewBinding.edTitle.setText(s); mViewBinding.edTitle.setText(s);
} }
private View getEmptyView(int resHint) { private View getEmptyView(int resHint) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null); View view = getLayoutInflater().inflate(R.layout.view_empty, null);
view.setBackgroundResource(R.color.gray_zhouyu); view.setBackgroundResource(R.color.gray_zhouyu);
......
...@@ -24,6 +24,7 @@ import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter; ...@@ -24,6 +24,7 @@ import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentPresenter;
import com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter; import com.xingdata.zzdpos.ui.manage.replenishment.adpter.ReplenishmentAdapter;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity; import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter; import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsOrderGroupAdapter;
import com.xingdata.zzdpos.util.DensityUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil; import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -49,12 +50,12 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent ...@@ -49,12 +50,12 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent
mReplenishmentAdapter = new ReplenishmentAdapter(new ArrayList<>()); mReplenishmentAdapter = new ReplenishmentAdapter(new ArrayList<>());
mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recycler.setAdapter(mReplenishmentAdapter); mViewBinding.recycler.setAdapter(mReplenishmentAdapter);
mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
} else { } else {
mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity())); mViewBinding.recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recycler.setAdapter(mReplenishmentAdapter); mViewBinding.recycler.setAdapter(mReplenishmentAdapter);
mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), 50, drawable)); mViewBinding.recycler.addItemDecoration(new RecyclerViewUtil.ListCardItemDecoration(getActivity(), DensityUtil.dip2px(getActivity(),16), drawable));
} }
mReplenishmentAdapter.setOnItemClickListener((adapter, view, position) -> { mReplenishmentAdapter.setOnItemClickListener((adapter, view, position) -> {
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginBottom="@dimen/padding_small" android:layout_marginBottom="@dimen/padding_small"
android:layout_marginEnd="@dimen/all_bounced_padding" android:layout_marginEnd="@dimen/all_bounced_padding"
android:layout_marginStart="@dimen/all_bounced_padding" android:layout_marginStart="@dimen/all_bounced_padding"
...@@ -35,6 +34,7 @@ ...@@ -35,6 +34,7 @@
android:drawablePadding="@dimen/all_padding" android:drawablePadding="@dimen/all_padding"
android:hint="@string/other_select_edit_hint" android:hint="@string/other_select_edit_hint"
android:imeOptions="actionSearch" android:imeOptions="actionSearch"
android:inputType="text"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" android:textSize="@dimen/all_text_size_low"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground" android:background="@color/white_caocao"
android:background="@drawable/singleline_white_gray"> android:foreground="?attr/selectableItemBackground">
<LinearLayout <LinearLayout
......
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