Sfoglia il codice sorgente

1.优化打卡功能

wsad5123 5 anni fa
parent
commit
ab614b814d

+ 2 - 2
app/build.gradle

@@ -24,8 +24,8 @@ android {
         targetSdkVersion rootProject.ext.targetSdkVersion
         multiDexEnabled true
         multiDexKeepProguard file("multidexKeep.pro")//腾讯bugly的类放到主Dex
-        versionCode 341
-        versionName "3.4.1"
+        versionCode 342
+        versionName "3.4.2"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         flavorDimensions "versionCode"
         ndk {

+ 12 - 0
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/clock/ClockRulesActivity.java

@@ -2,14 +2,22 @@ package com.tongyu.luck.happywork.ui.activity.cclient.clock;
 
 import android.os.Bundle;
 import android.support.annotation.Nullable;
+import android.view.View;
+import android.widget.LinearLayout;
 
 import com.tongyu.luck.happywork.R;
+import com.tongyu.luck.happywork.baselibrary.utils.PxUtils;
 import com.tongyu.luck.happywork.ui.base.BaseActivity;
 import com.tongyu.luck.happywork.ui.mvp.cclient.contacts.ClockRulesContacts;
 import com.tongyu.luck.happywork.ui.mvp.cclient.presenter.ClockRulesPresenter;
 
+import butterknife.BindView;
+
 public class ClockRulesActivity extends BaseActivity<ClockRulesPresenter> implements ClockRulesContacts.IClockRulesView {
 
+    @BindView(R.id.v_bg)
+    View vBg;
+
     @Override
     public int getLayoutId() {
         return R.layout.activity_clock_rules;
@@ -29,5 +37,9 @@ public class ClockRulesActivity extends BaseActivity<ClockRulesPresenter> implem
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setBackColor(R.color.white);
+        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) vBg.getLayoutParams();
+        layoutParams.width = LinearLayout.LayoutParams.MATCH_PARENT;
+        layoutParams.height = (int) (1.0f * 77 / 15 * PxUtils.getDeviceWidth());
+        vBg.setLayoutParams(layoutParams);
     }
 }

+ 20 - 0
app/src/main/java/com/tongyu/luck/happywork/ui/fragment/cclient/ClockFragment.java

@@ -4,6 +4,7 @@ import android.content.Intent;
 import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.support.annotation.NonNull;
 import android.support.v7.widget.CardView;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
@@ -14,10 +15,13 @@ import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.tongyu.luck.happywork.R;
 import com.tongyu.luck.happywork.baselibrary.AppConstant;
 import com.tongyu.luck.happywork.baselibrary.EventConstant;
 import com.tongyu.luck.happywork.baselibrary.utils.DateUtils;
+import com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout;
 import com.tongyu.luck.happywork.bean.ClockInfoBean;
 import com.tongyu.luck.happywork.event.StringEvent;
 import com.tongyu.luck.happywork.ui.activity.cclient.CMainActivity;
@@ -36,7 +40,9 @@ import org.greenrobot.eventbus.Subscribe;
 
 import butterknife.BindDrawable;
 import butterknife.BindView;
+import butterknife.ButterKnife;
 import butterknife.OnClick;
+import butterknife.Unbinder;
 
 public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implements ClockFragmentContacts.IClockFragmentView {
     @BindView(R.id.tv_work_hour)
@@ -87,6 +93,8 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
     LinearLayout llState;
     @BindView(R.id.tv_relocation)
     TextView tvRelocation;
+    @BindView(R.id.prl_refresh)
+    ProgressRefreshLayout prlRefresh;
     @BindDrawable(R.mipmap.ic_clock_success_time)
     Drawable dSuccess;
 
@@ -152,6 +160,7 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
 
     private void initView() {
         setLoadingVisible(true);
+        prlRefresh.setOnRefreshListener(onRefreshListener);
         Typeface typeFace = Typeface.createFromAsset(mContext.getAssets(), "fonts/DIN_Condensed_Bold.woff.ttf");
         tvWorkHour.setTypeface(typeFace);
         tvWeekRepay.setTypeface(typeFace);
@@ -167,6 +176,7 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
     public void initView(ClockInfoBean infoBean) {
         setLoadingVisible(false);
         setErrorVisible(false);
+        prlRefresh.finishRefresh();
         if (infoBean != null) {
             if (AppConstant.APPROVE_NONE.equals(infoBean.getAuthenticationStatus()) || AppConstant.APPROVE_FAIL.equals(infoBean.getAuthenticationStatus())) {//如果认证状态为未认证和认证失败
                 llClock.setVisibility(View.GONE);
@@ -283,6 +293,16 @@ public class ClockFragment extends BaseFragment<ClockFragmentPresenter> implemen
     }
 
     /**
+     * 监听下拉刷新触发
+     */
+    OnRefreshListener onRefreshListener = new OnRefreshListener() {
+        @Override
+        public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+            mvpPresenter.init();
+        }
+    };
+
+    /**
      * 错误页面刷新按钮
      */
     View.OnClickListener onRefreshClickListener = new View.OnClickListener() {

+ 13 - 6
app/src/main/res/layout/activity_clock_rules.xml

@@ -1,11 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-android:layout_width="match_parent"
-android:layout_height="match_parent">
-
-<View
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:background="@mipmap/ic_clock_rules" />
+    android:layout_height="match_parent">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <View
+            android:id="@+id/v_bg"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@mipmap/ic_clock_rules" />
+
+    </LinearLayout>
 
 </ScrollView>

+ 382 - 376
app/src/main/res/layout/fragment_clock.xml

@@ -1,490 +1,496 @@
 <?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/prl_refresh"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/gray_bg">
+    android:layout_height="match_parent">
 
-    <RelativeLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="match_parent"
+        android:background="@color/gray_bg">
 
-        <View
+        <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="232dp"
-            android:background="@mipmap/ic_clock_in_bg" />
+            android:layout_height="wrap_content">
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="232dp"
+                android:background="@mipmap/ic_clock_in_bg" />
 
             <LinearLayout
-                android:id="@+id/ll_clock"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:orientation="vertical">
 
-
                 <LinearLayout
+                    android:id="@+id/ll_clock"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="32dp"
-                    android:layout_marginTop="60dp"
-                    android:layout_marginRight="32dp"
-                    android:orientation="horizontal">
-
-                    <LinearLayout
-                        android:layout_width="0dp"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:orientation="vertical"
-                        android:paddingLeft="35dp">
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@string/week_work_hour"
-                            android:textColor="@color/white"
-                            android:textSize="@dimen/px42_14sp" />
-
-                        <LinearLayout
-                            android:layout_width="wrap_content"
-                            android:layout_height="33dp"
-                            android:layout_marginTop="4dp"
-                            android:orientation="horizontal">
-
-                            <TextView
-                                android:id="@+id/tv_work_hour"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:text="42.0"
-                                android:textColor="@color/white"
-                                android:textSize="@dimen/px99_33sp" />
-
-                            <TextView
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginLeft="5dp"
-                                android:text="@string/hour2"
-                                android:textColor="@color/white"
-                                android:textSize="@dimen/px39_13sp" />
-                        </LinearLayout>
+                    android:orientation="vertical">
 
-                    </LinearLayout>
 
                     <LinearLayout
-                        android:layout_width="0dp"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:orientation="vertical"
-                        android:paddingLeft="35dp">
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@string/week_repay"
-                            android:textColor="@color/white"
-                            android:textSize="@dimen/px42_14sp" />
+                        android:layout_marginLeft="32dp"
+                        android:layout_marginTop="60dp"
+                        android:layout_marginRight="32dp"
+                        android:orientation="horizontal">
 
                         <LinearLayout
-                            android:layout_width="wrap_content"
-                            android:layout_height="33dp"
-                            android:layout_marginTop="4dp"
-                            android:orientation="horizontal">
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:orientation="vertical"
+                            android:paddingLeft="35dp">
 
                             <TextView
-                                android:id="@+id/tv_week_repay"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text="100.94"
+                                android:text="@string/week_work_hour"
                                 android:textColor="@color/white"
-                                android:textSize="@dimen/px99_33sp" />
+                                android:textSize="@dimen/px42_14sp" />
 
-                            <TextView
+                            <LinearLayout
                                 android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginLeft="5dp"
-                                android:text="@string/yuan"
-                                android:textColor="@color/white"
-                                android:textSize="@dimen/px39_13sp" />
-                        </LinearLayout>
-                    </LinearLayout>
-                </LinearLayout>
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center_horizontal"
-                    android:layout_marginTop="14dp"
-                    android:text="@string/clock_tips"
-                    android:textColor="@color/white_70"
-                    android:textSize="@dimen/px33_11sp" />
-
-
-                <android.support.v7.widget.CardView
-                    android:layout_width="match_parent"
-                    android:layout_height="79dp"
-                    android:layout_marginLeft="14dp"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginRight="14dp"
-                    app:cardCornerRadius="15dp"
-                    app:cardElevation="2dp">
-
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginLeft="14dp"
-                        android:layout_marginRight="14dp"
-                        android:orientation="horizontal">
-
-                        <LinearLayout
-                            android:id="@+id/ll_statistics"
-                            android:layout_width="0dp"
-                            android:layout_height="match_parent"
-                            android:layout_weight="1"
-                            android:gravity="center"
-                            android:orientation="vertical">
+                                android:layout_height="33dp"
+                                android:layout_marginTop="4dp"
+                                android:orientation="horizontal">
 
-                            <View
-                                android:layout_width="23dp"
-                                android:layout_height="25dp"
-                                android:background="@mipmap/ic_clock_in_statistics" />
+                                <TextView
+                                    android:id="@+id/tv_work_hour"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:text="42.0"
+                                    android:textColor="@color/white"
+                                    android:textSize="@dimen/px99_33sp" />
 
-                            <TextView
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginTop="8dp"
-                                android:text="@string/statistics"
-                                android:textColor="@color/text_black_66"
-                                android:textSize="@dimen/px36_12sp" />
+                                <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginLeft="5dp"
+                                    android:text="@string/hour2"
+                                    android:textColor="@color/white"
+                                    android:textSize="@dimen/px39_13sp" />
+                            </LinearLayout>
 
                         </LinearLayout>
 
                         <LinearLayout
-                            android:id="@+id/ll_rules"
                             android:layout_width="0dp"
-                            android:layout_height="match_parent"
+                            android:layout_height="wrap_content"
                             android:layout_weight="1"
-                            android:gravity="center"
-                            android:orientation="vertical">
-
-                            <View
-                                android:layout_width="23dp"
-                                android:layout_height="25dp"
-                                android:background="@mipmap/ic_clock_in_rules" />
+                            android:orientation="vertical"
+                            android:paddingLeft="35dp">
 
                             <TextView
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:layout_marginTop="8dp"
-                                android:text="@string/rules"
-                                android:textColor="@color/text_black_66"
-                                android:textSize="@dimen/px36_12sp" />
-
-                        </LinearLayout>
-
-                        <LinearLayout
-                            android:id="@+id/ll_service"
-                            android:layout_width="0dp"
-                            android:layout_height="match_parent"
-                            android:layout_weight="1"
-                            android:gravity="center"
-                            android:orientation="vertical">
-
-                            <View
-                                android:layout_width="23dp"
-                                android:layout_height="25dp"
-                                android:background="@mipmap/ic_clock_in_service" />
+                                android:text="@string/week_repay"
+                                android:textColor="@color/white"
+                                android:textSize="@dimen/px42_14sp" />
 
-                            <TextView
+                            <LinearLayout
                                 android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginTop="8dp"
-                                android:text="@string/service"
-                                android:textColor="@color/text_black_66"
-                                android:textSize="@dimen/px36_12sp" />
+                                android:layout_height="33dp"
+                                android:layout_marginTop="4dp"
+                                android:orientation="horizontal">
 
+                                <TextView
+                                    android:id="@+id/tv_week_repay"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:text="100.94"
+                                    android:textColor="@color/white"
+                                    android:textSize="@dimen/px99_33sp" />
+
+                                <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginLeft="5dp"
+                                    android:text="@string/yuan"
+                                    android:textColor="@color/white"
+                                    android:textSize="@dimen/px39_13sp" />
+                            </LinearLayout>
                         </LinearLayout>
                     </LinearLayout>
 
-                </android.support.v7.widget.CardView>
-
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_marginTop="14dp"
+                        android:text="@string/clock_tips"
+                        android:textColor="@color/white_70"
+                        android:textSize="@dimen/px33_11sp" />
 
-                <android.support.v7.widget.CardView
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="14dp"
-                    android:layout_marginTop="10dp"
-                    android:layout_marginRight="14dp"
-                    android:layout_marginBottom="10dp"
-                    app:cardCornerRadius="15dp"
-                    app:cardElevation="2dp">
 
-                    <LinearLayout
+                    <android.support.v7.widget.CardView
                         android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="vertical">
+                        android:layout_height="79dp"
+                        android:layout_marginLeft="14dp"
+                        android:layout_marginTop="10dp"
+                        android:layout_marginRight="14dp"
+                        app:cardCornerRadius="15dp"
+                        app:cardElevation="2dp">
 
                         <LinearLayout
                             android:layout_width="match_parent"
-                            android:layout_height="47dp"
-                            android:layout_marginLeft="13dp"
-                            android:layout_marginTop="14dp"
-                            android:layout_marginRight="13dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginLeft="14dp"
+                            android:layout_marginRight="14dp"
                             android:orientation="horizontal">
 
-                            <RelativeLayout
+                            <LinearLayout
+                                android:id="@+id/ll_statistics"
                                 android:layout_width="0dp"
                                 android:layout_height="match_parent"
                                 android:layout_weight="1"
-                                android:background="@drawable/corners_gray_f5_5dp"
-                                android:paddingLeft="14dp">
+                                android:gravity="center"
+                                android:orientation="vertical">
 
-                                <TextView
-                                    android:id="@+id/tv_clock_in"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginTop="5dp"
-                                    android:text="@string/clock_in"
-                                    android:textColor="@color/text_black_33"
-                                    android:textSize="@dimen/px39_13sp" />
+                                <View
+                                    android:layout_width="23dp"
+                                    android:layout_height="25dp"
+                                    android:background="@mipmap/ic_clock_in_statistics" />
 
                                 <TextView
-                                    android:id="@+id/tv_clock_in_state"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_below="@id/tv_clock_in"
-                                    android:drawablePadding="3dp"
-                                    android:text="@string/no_finish"
-                                    android:textColor="@color/text_gray_99"
+                                    android:layout_marginTop="8dp"
+                                    android:text="@string/statistics"
+                                    android:textColor="@color/text_black_66"
                                     android:textSize="@dimen/px36_12sp" />
-                            </RelativeLayout>
 
-                            <RelativeLayout
+                            </LinearLayout>
+
+                            <LinearLayout
+                                android:id="@+id/ll_rules"
                                 android:layout_width="0dp"
                                 android:layout_height="match_parent"
-                                android:layout_marginLeft="6dp"
                                 android:layout_weight="1"
-                                android:background="@drawable/corners_gray_f5_5dp"
-                                android:paddingLeft="14dp">
+                                android:gravity="center"
+                                android:orientation="vertical">
+
+                                <View
+                                    android:layout_width="23dp"
+                                    android:layout_height="25dp"
+                                    android:background="@mipmap/ic_clock_in_rules" />
 
                                 <TextView
-                                    android:id="@+id/tv_clock_out"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_marginTop="5dp"
-                                    android:text="@string/clock_out"
-                                    android:textColor="@color/text_black_33"
-                                    android:textSize="@dimen/px39_13sp" />
+                                    android:layout_marginTop="8dp"
+                                    android:text="@string/rules"
+                                    android:textColor="@color/text_black_66"
+                                    android:textSize="@dimen/px36_12sp" />
+
+                            </LinearLayout>
+
+                            <LinearLayout
+                                android:id="@+id/ll_service"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="center"
+                                android:orientation="vertical">
+
+                                <View
+                                    android:layout_width="23dp"
+                                    android:layout_height="25dp"
+                                    android:background="@mipmap/ic_clock_in_service" />
 
                                 <TextView
-                                    android:id="@+id/tv_clock_out_state"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_below="@id/tv_clock_out"
-                                    android:drawablePadding="3dp"
-                                    android:text="@string/no_finish"
-                                    android:textColor="@color/text_gray_99"
+                                    android:layout_marginTop="8dp"
+                                    android:text="@string/service"
+                                    android:textColor="@color/text_black_66"
                                     android:textSize="@dimen/px36_12sp" />
-                            </RelativeLayout>
 
+                            </LinearLayout>
                         </LinearLayout>
 
-                        <TextView
-                            android:id="@+id/tv_rules"
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:layout_marginLeft="27dp"
-                            android:layout_marginTop="10dp"
-                            android:singleLine="true"
-                            android:text="规则:自由上下班打卡 00:00-24:00"
-                            android:textColor="@color/text_gray_99"
-                            android:textSize="@dimen/px36_12sp" />
+                    </android.support.v7.widget.CardView>
 
 
-                        <View
-                            android:id="@+id/v_clock"
-                            android:layout_width="125dp"
-                            android:layout_height="125dp"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_marginTop="48dp"
-                            android:background="@mipmap/ic_clock_btn_1" />
+                    <android.support.v7.widget.CardView
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="14dp"
+                        android:layout_marginTop="10dp"
+                        android:layout_marginRight="14dp"
+                        android:layout_marginBottom="10dp"
+                        app:cardCornerRadius="15dp"
+                        app:cardElevation="2dp">
 
-                        <RelativeLayout
-                            android:layout_width="wrap_content"
+                        <LinearLayout
+                            android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_marginTop="34dp"
-                            android:layout_marginBottom="48dp">
-
+                            android:orientation="vertical">
 
                             <LinearLayout
-                                android:id="@+id/ll_state"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:gravity="center_vertical"
+                                android:layout_width="match_parent"
+                                android:layout_height="47dp"
+                                android:layout_marginLeft="13dp"
+                                android:layout_marginTop="14dp"
+                                android:layout_marginRight="13dp"
                                 android:orientation="horizontal">
 
-                                <View
-                                    android:id="@+id/v_clock_range_state"
-                                    android:layout_width="14dp"
-                                    android:layout_height="14dp"
-                                    android:background="@mipmap/ic_clock_tips_range_in" />
-
-                                <TextView
-                                    android:id="@+id/tv_clock_range_state"
-                                    android:layout_width="wrap_content"
+                                <RelativeLayout
+                                    android:layout_width="0dp"
+                                    android:layout_height="match_parent"
+                                    android:layout_weight="1"
+                                    android:background="@drawable/corners_gray_f5_5dp"
+                                    android:paddingLeft="14dp">
+
+                                    <TextView
+                                        android:id="@+id/tv_clock_in"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_marginTop="5dp"
+                                        android:text="@string/clock_in"
+                                        android:textColor="@color/text_black_33"
+                                        android:textSize="@dimen/px39_13sp" />
+
+                                    <TextView
+                                        android:id="@+id/tv_clock_in_state"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_below="@id/tv_clock_in"
+                                        android:drawablePadding="3dp"
+                                        android:text="@string/no_finish"
+                                        android:textColor="@color/text_gray_99"
+                                        android:textSize="@dimen/px36_12sp" />
+                                </RelativeLayout>
+
+                                <RelativeLayout
+                                    android:layout_width="0dp"
                                     android:layout_height="match_parent"
                                     android:layout_marginLeft="6dp"
-                                    android:text="@string/have_in_clock_range"
-                                    android:textColor="@color/text_black_66"
-                                    android:textSize="@dimen/px36_12sp" />
-                            </LinearLayout>
+                                    android:layout_weight="1"
+                                    android:background="@drawable/corners_gray_f5_5dp"
+                                    android:paddingLeft="14dp">
+
+                                    <TextView
+                                        android:id="@+id/tv_clock_out"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_marginTop="5dp"
+                                        android:text="@string/clock_out"
+                                        android:textColor="@color/text_black_33"
+                                        android:textSize="@dimen/px39_13sp" />
+
+                                    <TextView
+                                        android:id="@+id/tv_clock_out_state"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_below="@id/tv_clock_out"
+                                        android:drawablePadding="3dp"
+                                        android:text="@string/no_finish"
+                                        android:textColor="@color/text_gray_99"
+                                        android:textSize="@dimen/px36_12sp" />
+                                </RelativeLayout>
 
+                            </LinearLayout>
 
                             <TextView
-                                android:id="@+id/tv_relocation"
-                                android:layout_width="wrap_content"
+                                android:id="@+id/tv_rules"
+                                android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_below="@id/ll_state"
-                                android:layout_centerHorizontal="true"
-                                android:layout_marginTop="19dp"
-                                android:drawableLeft="@mipmap/ic_refresh_blue"
-                                android:drawablePadding="3dp"
-                                android:text="@string/clock_relocation"
-                                android:textColor="@color/blue_00"
-                                android:textSize="@dimen/px36_12sp"
-                                android:visibility="gone" />
-                        </RelativeLayout>
-
-                        <RelativeLayout
-                            android:id="@+id/rl_today_money"
-                            android:layout_width="match_parent"
-                            android:layout_height="71dp"
-                            android:orientation="vertical"
-                            android:visibility="gone">
+                                android:layout_marginLeft="27dp"
+                                android:layout_marginTop="10dp"
+                                android:singleLine="true"
+                                android:text="规则:自由上下班打卡 00:00-24:00"
+                                android:textColor="@color/text_gray_99"
+                                android:textSize="@dimen/px36_12sp" />
+
 
                             <View
-                                android:layout_width="match_parent"
-                                android:layout_height="1px"
-                                android:background="@color/view_line_color_gray" />
+                                android:id="@+id/v_clock"
+                                android:layout_width="125dp"
+                                android:layout_height="125dp"
+                                android:layout_gravity="center_horizontal"
+                                android:layout_marginTop="48dp"
+                                android:background="@mipmap/ic_clock_btn_1" />
 
-                            <LinearLayout
-                                android:layout_width="match_parent"
+                            <RelativeLayout
+                                android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:layout_centerVertical="true"
-                                android:orientation="horizontal"
-                                android:paddingLeft="14dp"
-                                android:paddingRight="19dp">
+                                android:layout_gravity="center_horizontal"
+                                android:layout_marginTop="34dp"
+                                android:layout_marginBottom="48dp">
 
-                                <TextView
+
+                                <LinearLayout
+                                    android:id="@+id/ll_state"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:text="@string/clock_today_money"
-                                    android:textColor="@color/text_black"
-                                    android:textSize="@dimen/px36_12sp" />
+                                    android:layout_gravity="center_horizontal"
+                                    android:gravity="center_vertical"
+                                    android:orientation="horizontal">
+
+                                    <View
+                                        android:id="@+id/v_clock_range_state"
+                                        android:layout_width="14dp"
+                                        android:layout_height="14dp"
+                                        android:background="@mipmap/ic_clock_tips_range_in" />
+
+                                    <TextView
+                                        android:id="@+id/tv_clock_range_state"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="match_parent"
+                                        android:layout_marginLeft="6dp"
+                                        android:text="@string/have_in_clock_range"
+                                        android:textColor="@color/text_black_66"
+                                        android:textSize="@dimen/px36_12sp" />
+                                </LinearLayout>
 
-                                <TextView
-                                    android:id="@+id/tv_today_money"
-                                    android:layout_width="0px"
-                                    android:layout_height="wrap_content"
-                                    android:layout_weight="1"
-                                    android:gravity="right"
-                                    android:text="0.0"
-                                    android:textColor="@color/blue_01"
-                                    android:textSize="@dimen/px84_28sp" />
 
                                 <TextView
+                                    android:id="@+id/tv_relocation"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_marginLeft="5dp"
-                                    android:text="@string/yuan"
-                                    android:textColor="@color/text_black"
+                                    android:layout_below="@id/ll_state"
+                                    android:layout_centerHorizontal="true"
+                                    android:layout_marginTop="19dp"
+                                    android:drawableLeft="@mipmap/ic_refresh_blue"
+                                    android:drawablePadding="3dp"
+                                    android:text="@string/clock_relocation"
+                                    android:textColor="@color/blue_00"
                                     android:textSize="@dimen/px36_12sp"
-                                    android:textStyle="bold" />
-                            </LinearLayout>
-                        </RelativeLayout>
-                    </LinearLayout>
-                </android.support.v7.widget.CardView>
-            </LinearLayout>
+                                    android:visibility="gone" />
+                            </RelativeLayout>
 
+                            <RelativeLayout
+                                android:id="@+id/rl_today_money"
+                                android:layout_width="match_parent"
+                                android:layout_height="71dp"
+                                android:orientation="vertical"
+                                android:visibility="gone">
 
-            <android.support.v7.widget.CardView
-                android:id="@+id/cv_authentication"
-                android:layout_width="match_parent"
-                android:layout_height="403dp"
-                android:layout_marginLeft="14dp"
-                android:layout_marginTop="76dp"
-                android:layout_marginRight="14dp"
-                android:layout_marginBottom="10dp"
-                android:visibility="gone"
-                app:cardCornerRadius="15dp"
-                app:cardElevation="2dp">
-
-                <RelativeLayout
+                                <View
+                                    android:layout_width="match_parent"
+                                    android:layout_height="1px"
+                                    android:background="@color/view_line_color_gray" />
+
+                                <LinearLayout
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:layout_centerVertical="true"
+                                    android:orientation="horizontal"
+                                    android:paddingLeft="14dp"
+                                    android:paddingRight="19dp">
+
+                                    <TextView
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:text="@string/clock_today_money"
+                                        android:textColor="@color/text_black"
+                                        android:textSize="@dimen/px36_12sp" />
+
+                                    <TextView
+                                        android:id="@+id/tv_today_money"
+                                        android:layout_width="0px"
+                                        android:layout_height="wrap_content"
+                                        android:layout_weight="1"
+                                        android:gravity="right"
+                                        android:text="0.0"
+                                        android:textColor="@color/blue_01"
+                                        android:textSize="@dimen/px84_28sp" />
+
+                                    <TextView
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_marginLeft="5dp"
+                                        android:text="@string/yuan"
+                                        android:textColor="@color/text_black"
+                                        android:textSize="@dimen/px36_12sp"
+                                        android:textStyle="bold" />
+                                </LinearLayout>
+                            </RelativeLayout>
+                        </LinearLayout>
+                    </android.support.v7.widget.CardView>
+                </LinearLayout>
+
+
+                <android.support.v7.widget.CardView
+                    android:id="@+id/cv_authentication"
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:orientation="vertical">
+                    android:layout_height="403dp"
+                    android:layout_marginLeft="14dp"
+                    android:layout_marginTop="76dp"
+                    android:layout_marginRight="14dp"
+                    android:layout_marginBottom="10dp"
+                    android:visibility="gone"
+                    app:cardCornerRadius="15dp"
+                    app:cardElevation="2dp">
 
-                    <View
-                        android:id="@+id/v_authentication"
-                        android:layout_width="131dp"
-                        android:layout_height="87dp"
-                        android:layout_centerHorizontal="true"
-                        android:layout_marginTop="77dp"
-                        android:background="@mipmap/ic_clock_authentication_no" />
+                    <RelativeLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:orientation="vertical">
 
-                    <TextView
-                        android:id="@+id/tv_authentication_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="28dp"
-                        android:layout_below="@id/v_authentication"
-                        android:layout_centerHorizontal="true"
-                        android:layout_marginTop="48dp"
-                        android:gravity="center_vertical"
-                        android:text="@string/clock_authentication_no"
-                        android:textColor="@color/text_black"
-                        android:textSize="@dimen/px60_20sp" />
+                        <View
+                            android:id="@+id/v_authentication"
+                            android:layout_width="131dp"
+                            android:layout_height="87dp"
+                            android:layout_centerHorizontal="true"
+                            android:layout_marginTop="77dp"
+                            android:background="@mipmap/ic_clock_authentication_no" />
 
-                    <TextView
-                        android:id="@+id/tv_authentication_tips"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_below="@id/tv_authentication_title"
-                        android:layout_centerHorizontal="true"
-                        android:layout_marginTop="10dp"
-                        android:gravity="center_vertical"
-                        android:text="@string/clock_after_authentication"
-                        android:textColor="@color/text_black_66"
-                        android:textSize="@dimen/px36_12sp" />
-
-                    <Button
-                        android:id="@+id/btn_authentication"
-                        android:layout_width="269dp"
-                        android:layout_height="42dp"
-                        android:layout_alignParentBottom="true"
-                        android:layout_centerHorizontal="true"
-                        android:layout_marginBottom="52dp"
-                        android:background="@drawable/corners_blue_00_5dp"
-                        android:text="@string/clock_go_authentication"
-                        android:textColor="@color/white"
-                        android:textSize="@dimen/px42_14sp"
-                        android:textStyle="bold" />
-                </RelativeLayout>
-
-            </android.support.v7.widget.CardView>
-
-
-            <ImageView
-                android:id="@+id/v_clock_video"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="14dp"
-                android:layout_marginRight="14dp"
-                android:layout_marginBottom="10dp"
-                android:background="@mipmap/ic_clock_in_video" />
-        </LinearLayout>
-    </RelativeLayout>
-</ScrollView>
+                        <TextView
+                            android:id="@+id/tv_authentication_title"
+                            android:layout_width="wrap_content"
+                            android:layout_height="28dp"
+                            android:layout_below="@id/v_authentication"
+                            android:layout_centerHorizontal="true"
+                            android:layout_marginTop="48dp"
+                            android:gravity="center_vertical"
+                            android:text="@string/clock_authentication_no"
+                            android:textColor="@color/text_black"
+                            android:textSize="@dimen/px60_20sp" />
+
+                        <TextView
+                            android:id="@+id/tv_authentication_tips"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@id/tv_authentication_title"
+                            android:layout_centerHorizontal="true"
+                            android:layout_marginTop="10dp"
+                            android:gravity="center_vertical"
+                            android:text="@string/clock_after_authentication"
+                            android:textColor="@color/text_black_66"
+                            android:textSize="@dimen/px36_12sp" />
+
+                        <Button
+                            android:id="@+id/btn_authentication"
+                            android:layout_width="269dp"
+                            android:layout_height="42dp"
+                            android:layout_alignParentBottom="true"
+                            android:layout_centerHorizontal="true"
+                            android:layout_marginBottom="52dp"
+                            android:background="@drawable/corners_blue_00_5dp"
+                            android:text="@string/clock_go_authentication"
+                            android:textColor="@color/white"
+                            android:textSize="@dimen/px42_14sp"
+                            android:textStyle="bold" />
+                    </RelativeLayout>
+
+                </android.support.v7.widget.CardView>
+
+
+                <ImageView
+                    android:id="@+id/v_clock_video"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="14dp"
+                    android:layout_marginRight="14dp"
+                    android:layout_marginBottom="10dp"
+                    android:background="@mipmap/ic_clock_in_video" />
+            </LinearLayout>
+        </RelativeLayout>
+    </ScrollView>
+</com.tongyu.luck.happywork.baselibrary.widget.refresh.ProgressRefreshLayout>