Commit ff2c838c authored by 陈前's avatar 陈前

交班基础布局优化

parent 976b49a9
......@@ -19,7 +19,7 @@
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/main_title"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustUnspecified|stateHidden"></activity>
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
<activity
android:name=".ui.splash.SplashActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......
......@@ -69,7 +69,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
}
protected void seConfirmEnable( boolean isEnable){
protected void seConfirmEnable(boolean isEnable) {
mBaseBinding.btnConfirm.setEnabled(isEnable);
}
......@@ -143,7 +143,7 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
super.onActivityCreated(savedInstanceState);
if (!isEasy()) {
WindowManager.LayoutParams attributes = getDialog().getWindow().getAttributes();
attributes.width = ScreenUtils.getScreenWidth() * 45 / 100;
attributes.width = ScreenUtils.getScreenWidth() * 95 / 100;
attributes.height = -2;
getDialog().getWindow().setAttributes(attributes);
}
......
......@@ -270,10 +270,10 @@ interface MainContract {
// */
// public abstract void clickChangePassword();
//
// /**
// * 菜单EXIT页面 - 点击交班 打开交班报表页面
// */
// public abstract void clickHandover();
/**
* 菜单EXIT页面 - 点击交班 打开交班报表页面
*/
public abstract void clickHandover();
//
//
// /**
......
......@@ -131,11 +131,11 @@ public class MainPresenter extends MainContract.Presenter {
// mView.showChangePasswordDialog();
// }
//
// @Override
// public void clickHandover() {
// mView.showHandoverDialog();
// }
//
@Override
public void clickHandover() {
mView.showHandoverDialog();
}
//
// @Override
// public void clickFeedback() {
......
......@@ -24,7 +24,7 @@ public class HandoverDialog extends BaseDialog<MainPresenter, DialogHandoverBind
@Override
public int getTitle() {
return R.string.handover_title;
return R.string.handover_hint;
}
@Override
......
......@@ -84,6 +84,12 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
ActivityUtils.startActivity(getActivity(), SplashActivity.class);
}
});
mViewBinding.btnHandover.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
mPresenter.clickHandover();
}
});
}
}
......@@ -3,10 +3,10 @@
<corners android:radius="@dimen/all_shape_radius" />
<stroke
android:width="0.5dp"
android:color="@color/black" />
<solid android:color="@color/all_transparent" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners android:radius="@dimen/all_radius" />
<stroke
android:width="0.5dp"
android:color="@color/red_guanyu" />
<solid android:color="@color/white_caocao" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_red_round_rectangle_strokeless" android:state_pressed="true" />
<item android:drawable="@drawable/red_border_allradius" android:state_pressed="true" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gradient_gray_round_rectangle_stroke" />
<item android:drawable="@drawable/redout_border_whitein" />
</selector>
\ No newline at end of file
......@@ -2,6 +2,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_pressed="true" />
<item android:color="@color/blue" />
<item android:color="@color/red_guanyu" />
</selector>
\ No newline at end of file
......@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/settle_btn_radius" />
<solid android:color="@color/gray_transparent" />
<solid android:color="@color/white_transparent15" />
</shape>
\ No newline at end of file
......@@ -15,7 +15,7 @@
style="@style/dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin" />
android:layout_marginBottom="@dimen/all_padding" />
<ViewStub
......@@ -26,14 +26,21 @@
android:inflatedId="@+id/panel_import" />
<android.support.constraint.ConstraintLayout
<LinearLayout
android:layout_marginTop="@dimen/all_padding"
android:orientation="horizontal"
android:weightSum="2"
android:padding="@dimen/dp_4"
android:background="@color/white_caocao"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_margin="1dp"
android:id="@+id/btn_cancel"
style="@style/button_passive"
android:layout_width="@dimen/dialog_button_width"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
......@@ -47,9 +54,11 @@
tools:targetApi="lollipop" />
<Button
android:layout_margin="1dp"
android:id="@+id/btn_confirm"
style="@style/button_positive"
android:layout_width="@dimen/dialog_button_width"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
......@@ -62,7 +71,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:targetApi="lollipop" />
</android.support.constraint.ConstraintLayout>
</LinearLayout>
</LinearLayout>
......
......@@ -38,11 +38,7 @@
type="String" />
</data>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true">
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_default"
......@@ -54,11 +50,13 @@
<TextView
android:id="@+id/handover_tv_sumamt"
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:text="¥9999"
android:textColor="@color/red900"
android:textSize="@dimen/big_text_size"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -66,10 +64,14 @@
<TextView
android:id="@+id/handover_tv_sumamt_hint"
style="@style/textView_body"
android:layout_width="wrap_content"
android:paddingTop="@dimen/all_margin"
android:paddingBottom="@dimen/all_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="实收金额"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/small_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -88,13 +90,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/dp_4"
android:paddingTop="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingEnd="@dimen/dp_4"
android:paddingBottom="@dimen/all_padding"
android:weightSum="2"
app:layout_constraintTop_toBottomOf="@id/view1">
<LinearLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
......@@ -103,53 +108,61 @@
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_date" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_oper" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_orderNum" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_cash" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_wechat" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_alipay" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_bank" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_vip" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
......@@ -160,6 +173,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{date}"
android:textColor="@color/black_likui" />
......@@ -168,6 +182,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{operName}"
android:textColor="@color/black_likui" />
......@@ -176,6 +191,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{orderNum}"
android:textColor="@color/black_likui" />
......@@ -184,6 +200,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{cash}"
android:textColor="@color/black_likui" />
......@@ -192,6 +209,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{wechat}"
android:textColor="@color/black_likui" />
......@@ -200,6 +218,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{alipay}"
android:textColor="@color/black_likui" />
......@@ -208,6 +227,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{bank}"
android:textColor="@color/black_likui" />
......@@ -216,6 +236,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{vipPay}"
android:textColor="@color/black_likui" />
</LinearLayout>
......@@ -223,5 +244,5 @@
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -54,6 +54,7 @@
</LinearLayout>
<TextView
android:id="@+id/btn_handover"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
......
......@@ -21,7 +21,7 @@
<!-- 全透明 -->
<color name="all_transparent">#00000000</color>
<color name="black_half">#50000000</color>
<color name="gray_transparent">#50aaaaaa</color>
<color name="white_transparent15">#0faaaaaa</color>
<color name="black">#101010</color>
<color name="black1">#273542</color>
......
......@@ -240,7 +240,7 @@
</style>
<style name="button_positive" parent="android:ButtonBar">
<item name="android:background">@drawable/selector_gradient_red_button_background</item>
<item name="android:background">@drawable/red_border_allradius</item>
<item name="android:textColor">@color/white</item>
<item name="android:gravity">center</item>
<item name="android:focusable">false</item>
......
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