Commit 706685fb authored by 陈前's avatar 陈前

UI

parent 824b0ab0
...@@ -5,8 +5,10 @@ import android.databinding.DataBindingUtil; ...@@ -5,8 +5,10 @@ import android.databinding.DataBindingUtil;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.support.design.widget.TabLayout; import android.support.design.widget.TabLayout;
import android.text.InputType; import android.text.InputType;
import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView; import android.widget.TextView;
...@@ -68,27 +70,32 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter, ...@@ -68,27 +70,32 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter,
mViewBinding.edTitle.setHint("请输入供货商名称"); mViewBinding.edTitle.setHint("请输入供货商名称");
mViewBinding.edTitle.setInputType(InputType.TYPE_CLASS_TEXT); 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 @@ ...@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white_caocao" android:background="@color/white_caocao"
...@@ -22,22 +22,25 @@ ...@@ -22,22 +22,25 @@
android:layout_marginTop="@dimen/padding_small" android:layout_marginTop="@dimen/padding_small"
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:textColor="@color/black_likui"
android:inputType="text"
android:imeOptions="actionSearch" android:imeOptions="actionSearch"
android:inputType="text"
android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" android:textSize="@dimen/all_text_size_low"
/> />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050" android:layout_height="@dimen/view_line_L050"
android:layout_below="@id/ed_title" android:layout_below="@id/ed_title"
android:background="@color/gray_huanggai" /> android:background="@color/gray_huanggai" />
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product" android:id="@+id/srl_product"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
> android:layout_below="@id/ed_title"
android:layout_marginTop="-1dp">
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/recycler_other_selcet" android:id="@+id/recycler_other_selcet"
...@@ -46,7 +49,14 @@ ...@@ -46,7 +49,14 @@
</android.support.v7.widget.RecyclerView> </android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout> </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> </layout>
\ No newline at end of file
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
android:layout_marginTop="@dimen/padding_small" android:layout_marginTop="@dimen/padding_small"
android:drawablePadding="@dimen/all_padding" android:drawablePadding="@dimen/all_padding"
android:hint="@string/statistics_order_edit_hint" android:hint="@string/statistics_order_edit_hint"
android:inputType="number" android:imeOptions="actionSearch"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" android:textSize="@dimen/all_text_size_low"
......
...@@ -503,11 +503,7 @@ ...@@ -503,11 +503,7 @@
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textSize="@dimen/all_text_size_low" /> 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 <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/singleline_white_gray" android:background="@color/white_caocao"
android:paddingBottom="@dimen/all_padding"> android:paddingBottom="@dimen/all_padding">
<com.facebook.drawee.view.SimpleDraweeView <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