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,6 +3,7 @@ package com.shunzhi.parent.ui.fragment.apply; | ||
| 3 | import android.os.Bundle; | 3 | import android.os.Bundle; |
| 4 | import android.support.annotation.NonNull; | 4 | import android.support.annotation.NonNull; |
| 5 | import android.support.annotation.Nullable; | 5 | import android.support.annotation.Nullable; |
| 6 | +import android.text.TextUtils; | ||
| 6 | import android.view.View; | 7 | import android.view.View; |
| 7 | import android.widget.Button; | 8 | import android.widget.Button; |
| 8 | import android.widget.EditText; | 9 | import android.widget.EditText; |
| @@ -22,6 +23,7 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment implements V | @@ -22,6 +23,7 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment implements V | ||
| 22 | private Button bt_cancel; | 23 | private Button bt_cancel; |
| 23 | ReplaceCardDialog replaceCardDialog=null; | 24 | ReplaceCardDialog replaceCardDialog=null; |
| 24 | private EditText et_cardnum; | 25 | private EditText et_cardnum; |
| 26 | + private String cardnum; | ||
| 25 | 27 | ||
| 26 | @NonNull | 28 | @NonNull |
| 27 | @Override | 29 | @Override |
| @@ -48,10 +50,15 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment implements V | @@ -48,10 +50,15 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment implements V | ||
| 48 | public void onClick(View view) { | 50 | public void onClick(View view) { |
| 49 | switch (view.getId()){ | 51 | switch (view.getId()){ |
| 50 | case R.id.bt_sure: | 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 | Toast.makeText(getActivity(),"卡号不能为空,请重新输入",Toast.LENGTH_SHORT).show(); | 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 | replaceCardDialog.setTitle("补卡提示"); | 62 | replaceCardDialog.setTitle("补卡提示"); |
| 56 | replaceCardDialog.setText("您已补卡成功!"); | 63 | replaceCardDialog.setText("您已补卡成功!"); |
| 57 | replaceCardDialog.show(); | 64 | replaceCardDialog.show(); |
app/src/main/java/com/shunzhi/parent/views/ReplaceCardDialog.java
| @@ -9,7 +9,8 @@ import android.widget.TextView; | @@ -9,7 +9,8 @@ import android.widget.TextView; | ||
| 9 | import com.shunzhi.parent.R; | 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 | public class ReplaceCardDialog extends Dialog implements View.OnClickListener{ | 16 | public class ReplaceCardDialog extends Dialog implements View.OnClickListener{ |
app/src/main/res/layout/fragment_report.xml
| 1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 2 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
| 3 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 4 | android:layout_height="match_parent" | 5 | android:layout_height="match_parent" |
| 5 | - xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 6 | android:background="@color/bgColor" | 6 | android:background="@color/bgColor" |
| 7 | android:orientation="vertical" | 7 | android:orientation="vertical" |
| 8 | tools:context="com.shunzhi.parent.ui.fragment.ReportFragment"> | 8 | tools:context="com.shunzhi.parent.ui.fragment.ReportFragment"> |
| @@ -27,7 +27,6 @@ | @@ -27,7 +27,6 @@ | ||
| 27 | android:textSize="@dimen/textSize16" /> | 27 | android:textSize="@dimen/textSize16" /> |
| 28 | 28 | ||
| 29 | <TextView | 29 | <TextView |
| 30 | - android:visibility="gone" | ||
| 31 | android:id="@+id/tvDate" | 30 | android:id="@+id/tvDate" |
| 32 | android:layout_width="wrap_content" | 31 | android:layout_width="wrap_content" |
| 33 | android:layout_height="wrap_content" | 32 | android:layout_height="wrap_content" |
| @@ -36,42 +35,40 @@ | @@ -36,42 +35,40 @@ | ||
| 36 | android:gravity="center_horizontal" | 35 | android:gravity="center_horizontal" |
| 37 | android:text="报告" | 36 | android:text="报告" |
| 38 | android:textColor="@color/white" | 37 | android:textColor="@color/white" |
| 39 | - android:textSize="@dimen/textSize18" /> | 38 | + android:textSize="@dimen/textSize18" |
| 39 | + android:visibility="gone" /> | ||
| 40 | 40 | ||
| 41 | <android.support.design.widget.TabLayout | 41 | <android.support.design.widget.TabLayout |
| 42 | + android:id="@+id/tabLayout" | ||
| 42 | android:layout_width="wrap_content" | 43 | android:layout_width="wrap_content" |
| 44 | + android:layout_height="wrap_content" | ||
| 43 | android:layout_gravity="center" | 45 | android:layout_gravity="center" |
| 46 | + app:tabGravity="fill" | ||
| 44 | app:tabIndicatorColor="@color/white" | 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 | app:tabIndicatorHeight="@dimen/size_dp_3" | 48 | app:tabIndicatorHeight="@dimen/size_dp_3" |
| 49 | + app:tabMaxWidth="@dimen/size_dp_60" | ||
| 51 | app:tabMode="scrollable" | 50 | app:tabMode="scrollable" |
| 52 | - app:tabGravity="fill" | 51 | + app:tabSelectedTextColor="@color/white" |
| 53 | app:tabTextAppearance="@style/TextView_Wrap_16" | 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 | <TextView | 55 | <TextView |
| 57 | android:id="@+id/tvShaiXuan" | 56 | android:id="@+id/tvShaiXuan" |
| 58 | - android:visibility="gone" | ||
| 59 | android:layout_width="wrap_content" | 57 | android:layout_width="wrap_content" |
| 60 | android:layout_height="wrap_content" | 58 | android:layout_height="wrap_content" |
| 61 | android:layout_gravity="center_vertical|right" | 59 | android:layout_gravity="center_vertical|right" |
| 62 | android:drawableRight="@drawable/screen" | 60 | android:drawableRight="@drawable/screen" |
| 63 | android:text="筛选" | 61 | android:text="筛选" |
| 64 | android:textColor="@color/white" | 62 | android:textColor="@color/white" |
| 65 | - android:textSize="@dimen/textSize16" /> | 63 | + android:textSize="@dimen/textSize16" |
| 64 | + android:visibility="gone" /> | ||
| 66 | </FrameLayout> | 65 | </FrameLayout> |
| 67 | 66 | ||
| 68 | <RelativeLayout | 67 | <RelativeLayout |
| 69 | android:layout_width="match_parent" | 68 | android:layout_width="match_parent" |
| 70 | android:layout_height="match_parent" | 69 | android:layout_height="match_parent" |
| 71 | android:background="@color/white" | 70 | android:background="@color/white" |
| 72 | - android:visibility="visible" | ||
| 73 | - | ||
| 74 | - > | 71 | + android:visibility="visible"> |
| 75 | 72 | ||
| 76 | <TextView | 73 | <TextView |
| 77 | android:id="@+id/tvNoData" | 74 | android:id="@+id/tvNoData" |
| @@ -85,11 +82,10 @@ | @@ -85,11 +82,10 @@ | ||
| 85 | </RelativeLayout> | 82 | </RelativeLayout> |
| 86 | 83 | ||
| 87 | <android.support.v4.view.ViewPager | 84 | <android.support.v4.view.ViewPager |
| 88 | - android:visibility="visible" | 85 | + android:id="@+id/viewPager" |
| 89 | android:layout_width="match_parent" | 86 | android:layout_width="match_parent" |
| 90 | android:layout_height="match_parent" | 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 | </LinearLayout> | 91 | </LinearLayout> |
app/src/main/res/values/colors.xml
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | <color name="hintTextColor">#494947</color> | 8 | <color name="hintTextColor">#494947</color> |
| 9 | <color name="bottomline">#B8B8B9</color> | 9 | <color name="bottomline">#B8B8B9</color> |
| 10 | <color name="bg_main">#F0EFF5</color> | 10 | <color name="bg_main">#F0EFF5</color> |
| 11 | - | 11 | + <color name="textRed">#FC5B6A</color> |
| 12 | <color name="back_top">#A6DAFF</color> | 12 | <color name="back_top">#A6DAFF</color> |
| 13 | <color name="textBlue">#ACC9FC</color> | 13 | <color name="textBlue">#ACC9FC</color> |
| 14 | <color name="titleColor">#A6DAFF</color> | 14 | <color name="titleColor">#A6DAFF</color> |
| @@ -19,8 +19,8 @@ | @@ -19,8 +19,8 @@ | ||
| 19 | <color name="huodong_blue">#ACD1FB</color> | 19 | <color name="huodong_blue">#ACD1FB</color> |
| 20 | <color name="text_color">#757575</color> | 20 | <color name="text_color">#757575</color> |
| 21 | <color name="textGreen">#5FB762</color> | 21 | <color name="textGreen">#5FB762</color> |
| 22 | - <color name="textRed">#FC5B6A</color> | ||
| 23 | <color name="transparent">#00000000</color> | 22 | <color name="transparent">#00000000</color> |
| 24 | <color name="deyu_textColor">#60b3f6</color> | 23 | <color name="deyu_textColor">#60b3f6</color> |
| 25 | <color name="deyu_BlueColor">#2b71c4</color> | 24 | <color name="deyu_BlueColor">#2b71c4</color> |
| 25 | + <color name="line_color">#80bebebe</color> | ||
| 26 | </resources> | 26 | </resources> |
app/src/main/res/values/styles.xml
| @@ -27,6 +27,14 @@ | @@ -27,6 +27,14 @@ | ||
| 27 | <item name="colorPrimaryDark">@color/colorPrimaryDark</item> | 27 | <item name="colorPrimaryDark">@color/colorPrimaryDark</item> |
| 28 | </style> | 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 | <style name="TextView_Wrap_16"> | 38 | <style name="TextView_Wrap_16"> |
| 31 | <item name="android:layout_width">wrap_content</item> | 39 | <item name="android:layout_width">wrap_content</item> |
| 32 | <item name="android:layout_height">wrap_content</item> | 40 | <item name="android:layout_height">wrap_content</item> |