Commit d0d421ad authored by 陈前's avatar 陈前

UI

parent 47cc1a85
......@@ -23,7 +23,9 @@ import java.util.List;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
......@@ -84,13 +86,20 @@ public class MsMainFragment extends BaseFragment<MainPresenter, FragmentMsMainBi
public void subscribe(ObservableEmitter<View> e) throws Exception {
e.onNext(getLayoutInflater().inflate(R.layout.item_string, null));
e.onNext(getLayoutInflater().inflate(R.layout.item_string, null));
e.onComplete();
}
}).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<View>() {
int i = 0;
}).subscribeOn(Schedulers.newThread()).
observeOn(AndroidSchedulers.mainThread()).
subscribe(new Observer<View>() {
private int i = 0;
@Override
public void accept(View view) throws Exception {
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(View view) {
ItemStringBinding itemMenuBottomBinding = DataBindingUtil.bind(view);
if (i == 0) {
itemMenuBottomBinding.itemTv.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
......@@ -101,8 +110,14 @@ public class MsMainFragment extends BaseFragment<MainPresenter, FragmentMsMainBi
mViewBinding.tabLayout.getTabAt(i).setCustomView(view);
i++;
}
});
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
mViewBinding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
......@@ -124,6 +139,9 @@ public class MsMainFragment extends BaseFragment<MainPresenter, FragmentMsMainBi
}
});
}
});
}
......
......@@ -108,12 +108,7 @@
app:layout_constraintEnd_toEndOf="@id/tv_supplier_title"
app:layout_constraintTop_toTopOf="@id/tv_supplier_title" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_slight_line_width"
android:background="@color/gray_kongming"
android:visibility="@{isShowSupplier? View.VISIBLE: View.GONE}"
app:layout_constraintTop_toTopOf="@id/tv_supplier_title" />
<View
android:id="@+id/view_line_left_1"
......@@ -522,7 +517,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:layout_above="@id/ed_title"
android:layout_marginTop="@dimen/all_bounced_padding"
android:background="@color/gray_huanggai" />
<View
......
......@@ -61,7 +61,7 @@
android:id="@+id/tv_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/singleline_white_gray"
android:background="@color/white_caocao"
android:paddingTop="@dimen/all_padding"
android:paddingEnd="@dimen/all_padding"
android:paddingBottom="@dimen/all_padding"
......@@ -76,7 +76,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/all_padding"
android:background="@drawable/singleline_white_gray"
android:background="@color/white_caocao"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_low"
android:textStyle="bold"
......@@ -87,7 +87,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/singleline_white_gray"
android:background="@color/white_caocao"
android:padding="@dimen/all_padding"
android:text="盘点件数:"
android:textColor="@color/black"
......@@ -100,7 +100,7 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/singleline_white_gray"
android:background="@color/white_caocao"
android:padding="@dimen/all_padding"
android:text="盘点结果:"
android:textColor="@color/black"
......@@ -114,7 +114,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding"
android:background="@drawable/singleline_white_gray"
android:background="@color/white_caocao"
android:padding="@dimen/all_padding"
android:paddingEnd="@dimen/all_margin"
android:text="不相符"
......
......@@ -205,6 +205,7 @@
android:layout_marginTop="@dimen/all_padding"
android:text="进价:"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@id/tv_stock_hint"
app:layout_constraintTop_toBottomOf="@id/tv_stock_hint" />
......
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