Commit ff2c838c authored by 陈前's avatar 陈前

交班基础布局优化

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