Commit d7b686ff8df73b07636270ec7404c05e94c93cc5
1 parent
41f159b5
Exists in
yxb_dev
and in
2 other branches
1:成长界面中应用中补卡和考勤界面搭建
Showing
6 changed files
with
36 additions
and
24 deletions
 
Show diff stats
app/libs/processor.jar
No preview for this file type
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplyReplaceCardFragment.java
| ... | ... | @@ -3,6 +3,7 @@ package com.shunzhi.parent.ui.fragment.apply; | 
| 3 | 3 | import android.os.Bundle; | 
| 4 | 4 | import android.support.annotation.NonNull; | 
| 5 | 5 | import android.support.annotation.Nullable; | 
| 6 | +import android.text.TextUtils; | |
| 6 | 7 | import android.view.View; | 
| 7 | 8 | import android.widget.Button; | 
| 8 | 9 | import android.widget.EditText; | 
| ... | ... | @@ -22,6 +23,7 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment implements V | 
| 22 | 23 | private Button bt_cancel; | 
| 23 | 24 | ReplaceCardDialog replaceCardDialog=null; | 
| 24 | 25 | private EditText et_cardnum; | 
| 26 | + private String cardnum; | |
| 25 | 27 | |
| 26 | 28 | @NonNull | 
| 27 | 29 | @Override | 
| ... | ... | @@ -48,10 +50,15 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment implements V | 
| 48 | 50 | public void onClick(View view) { | 
| 49 | 51 | switch (view.getId()){ | 
| 50 | 52 | case R.id.bt_sure: | 
| 51 | - if (et_cardnum.getText().toString().trim().equals("")|| | |
| 52 | - et_cardnum.getText().toString().trim().equals(null)){ | |
| 53 | + cardnum = et_cardnum.getText().toString().trim(); | |
| 54 | + if (TextUtils.isEmpty(cardnum)){ | |
| 53 | 55 | Toast.makeText(getActivity(),"卡号不能为空,请重新输入",Toast.LENGTH_SHORT).show(); | 
| 54 | - }else { | |
| 56 | + } | |
| 57 | +// if (et_cardnum.getText().toString().trim().equals("")|| | |
| 58 | +// et_cardnum.getText().toString().trim().equals(null)){ | |
| 59 | +// Toast.makeText(getActivity(),"卡号不能为空,请重新输入",Toast.LENGTH_SHORT).show(); | |
| 60 | +// } | |
| 61 | + else { | |
| 55 | 62 | replaceCardDialog.setTitle("补卡提示"); | 
| 56 | 63 | replaceCardDialog.setText("您已补卡成功!"); | 
| 57 | 64 | replaceCardDialog.show(); | ... | ... | 
app/src/main/java/com/shunzhi/parent/views/ReplaceCardDialog.java
| ... | ... | @@ -9,7 +9,8 @@ import android.widget.TextView; | 
| 9 | 9 | import com.shunzhi.parent.R; | 
| 10 | 10 | |
| 11 | 11 | /** | 
| 12 | - * Created by Administrator on 2018/4/10 0010. | |
| 12 | + * Created by wwx on 2018/4/10 0010. | |
| 13 | + * 补卡提示界面 | |
| 13 | 14 | */ | 
| 14 | 15 | |
| 15 | 16 | public class ReplaceCardDialog extends Dialog implements View.OnClickListener{ | ... | ... | 
app/src/main/res/layout/fragment_report.xml
| 1 | 1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 
| 2 | + xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 2 | 3 | xmlns:tools="http://schemas.android.com/tools" | 
| 3 | 4 | android:layout_width="match_parent" | 
| 4 | 5 | android:layout_height="match_parent" | 
| 5 | - xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 6 | 6 | android:background="@color/bgColor" | 
| 7 | 7 | android:orientation="vertical" | 
| 8 | 8 | tools:context="com.shunzhi.parent.ui.fragment.ReportFragment"> | 
| ... | ... | @@ -27,7 +27,6 @@ | 
| 27 | 27 | android:textSize="@dimen/textSize16" /> | 
| 28 | 28 | |
| 29 | 29 | <TextView | 
| 30 | - android:visibility="gone" | |
| 31 | 30 | android:id="@+id/tvDate" | 
| 32 | 31 | android:layout_width="wrap_content" | 
| 33 | 32 | android:layout_height="wrap_content" | 
| ... | ... | @@ -36,42 +35,40 @@ | 
| 36 | 35 | android:gravity="center_horizontal" | 
| 37 | 36 | android:text="报告" | 
| 38 | 37 | android:textColor="@color/white" | 
| 39 | - android:textSize="@dimen/textSize18" /> | |
| 38 | + android:textSize="@dimen/textSize18" | |
| 39 | + android:visibility="gone" /> | |
| 40 | 40 | |
| 41 | 41 | <android.support.design.widget.TabLayout | 
| 42 | + android:id="@+id/tabLayout" | |
| 42 | 43 | android:layout_width="wrap_content" | 
| 44 | + android:layout_height="wrap_content" | |
| 43 | 45 | android:layout_gravity="center" | 
| 46 | + app:tabGravity="fill" | |
| 44 | 47 | app:tabIndicatorColor="@color/white" | 
| 45 | - app:tabSelectedTextColor="@color/white" | |
| 46 | - app:tabTextColor="@color/textColor" | |
| 47 | - app:tabMaxWidth="@dimen/size_dp_60" | |
| 48 | - android:layout_height="wrap_content" | |
| 49 | - android:id="@+id/tabLayout" | |
| 50 | 48 | app:tabIndicatorHeight="@dimen/size_dp_3" | 
| 49 | + app:tabMaxWidth="@dimen/size_dp_60" | |
| 51 | 50 | app:tabMode="scrollable" | 
| 52 | - app:tabGravity="fill" | |
| 51 | + app:tabSelectedTextColor="@color/white" | |
| 53 | 52 | app:tabTextAppearance="@style/TextView_Wrap_16" | 
| 54 | - ></android.support.design.widget.TabLayout> | |
| 53 | + app:tabTextColor="@color/textColor"></android.support.design.widget.TabLayout> | |
| 55 | 54 | |
| 56 | 55 | <TextView | 
| 57 | 56 | android:id="@+id/tvShaiXuan" | 
| 58 | - android:visibility="gone" | |
| 59 | 57 | android:layout_width="wrap_content" | 
| 60 | 58 | android:layout_height="wrap_content" | 
| 61 | 59 | android:layout_gravity="center_vertical|right" | 
| 62 | 60 | android:drawableRight="@drawable/screen" | 
| 63 | 61 | android:text="筛选" | 
| 64 | 62 | android:textColor="@color/white" | 
| 65 | - android:textSize="@dimen/textSize16" /> | |
| 63 | + android:textSize="@dimen/textSize16" | |
| 64 | + android:visibility="gone" /> | |
| 66 | 65 | </FrameLayout> | 
| 67 | 66 | |
| 68 | 67 | <RelativeLayout | 
| 69 | 68 | android:layout_width="match_parent" | 
| 70 | 69 | android:layout_height="match_parent" | 
| 71 | 70 | android:background="@color/white" | 
| 72 | - android:visibility="visible" | |
| 73 | - | |
| 74 | - > | |
| 71 | + android:visibility="visible"> | |
| 75 | 72 | |
| 76 | 73 | <TextView | 
| 77 | 74 | android:id="@+id/tvNoData" | 
| ... | ... | @@ -85,11 +82,10 @@ | 
| 85 | 82 | </RelativeLayout> | 
| 86 | 83 | |
| 87 | 84 | <android.support.v4.view.ViewPager | 
| 88 | - android:visibility="visible" | |
| 85 | + android:id="@+id/viewPager" | |
| 89 | 86 | android:layout_width="match_parent" | 
| 90 | 87 | android:layout_height="match_parent" | 
| 91 | - android:id="@+id/viewPager" | |
| 92 | - ></android.support.v4.view.ViewPager> | |
| 88 | + android:visibility="visible"></android.support.v4.view.ViewPager> | |
| 93 | 89 | |
| 94 | 90 | |
| 95 | 91 | </LinearLayout> | ... | ... | 
app/src/main/res/values/colors.xml
| ... | ... | @@ -8,7 +8,7 @@ | 
| 8 | 8 | <color name="hintTextColor">#494947</color> | 
| 9 | 9 | <color name="bottomline">#B8B8B9</color> | 
| 10 | 10 | <color name="bg_main">#F0EFF5</color> | 
| 11 | - | |
| 11 | + <color name="textRed">#FC5B6A</color> | |
| 12 | 12 | <color name="back_top">#A6DAFF</color> | 
| 13 | 13 | <color name="textBlue">#ACC9FC</color> | 
| 14 | 14 | <color name="titleColor">#A6DAFF</color> | 
| ... | ... | @@ -19,8 +19,8 @@ | 
| 19 | 19 | <color name="huodong_blue">#ACD1FB</color> | 
| 20 | 20 | <color name="text_color">#757575</color> | 
| 21 | 21 | <color name="textGreen">#5FB762</color> | 
| 22 | - <color name="textRed">#FC5B6A</color> | |
| 23 | 22 | <color name="transparent">#00000000</color> | 
| 24 | 23 | <color name="deyu_textColor">#60b3f6</color> | 
| 25 | 24 | <color name="deyu_BlueColor">#2b71c4</color> | 
| 25 | + <color name="line_color">#80bebebe</color> | |
| 26 | 26 | </resources> | ... | ... | 
app/src/main/res/values/styles.xml
| ... | ... | @@ -27,6 +27,14 @@ | 
| 27 | 27 | <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | 
| 28 | 28 | </style> | 
| 29 | 29 | |
| 30 | + <style name="DialogTips" parent="Theme.AppCompat.Light.Dialog.Alert"> | |
| 31 | + <item name="colorPrimary">@color/colorPrimary</item> | |
| 32 | + <item name="colorAccent">@color/colorAccent</item> | |
| 33 | + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
| 34 | + <item name="android:gravity">center</item> | |
| 35 | + <item name="android:windowCloseOnTouchOutside">false</item> | |
| 36 | + </style> | |
| 37 | + | |
| 30 | 38 | <style name="TextView_Wrap_16"> | 
| 31 | 39 | <item name="android:layout_width">wrap_content</item> | 
| 32 | 40 | <item name="android:layout_height">wrap_content</item> | ... | ... |