瀏覽代碼

修改文案以及部分新功能完善

文案修改:
1.修改主页的查看更多为更多
2.修改主页的收起更多为收起
功能增改
1.增加首页的更多列表展开的下滑动画
2.增加首页的每日必做标题栏浮动固定功能
zhoujuncai 7 年之前
父節點
當前提交
918df6cd70

+ 134 - 25
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java

@@ -9,6 +9,7 @@ import android.content.Context;
 import android.content.DialogInterface;
 import android.graphics.Color;
 import android.graphics.drawable.BitmapDrawable;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
@@ -21,6 +22,8 @@ import android.support.v7.app.AlertDialog;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.TextUtils;
+import android.transition.ChangeBounds;
+import android.transition.TransitionManager;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
@@ -41,13 +44,11 @@ import com.alibaba.fastjson.JSONArray;
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.request.RequestOptions;
 import com.google.gson.Gson;
-import com.sheep.gamegroup.event.BigEvent;
-import com.sheep.gamegroup.model.entity.RobTask;
-import com.sheep.gamegroup.util.ConfigUtil;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.di.components.DaggerSmallSheepComponent;
 import com.sheep.gamegroup.di.modules.SmallSheepModule;
 import com.sheep.gamegroup.di.modules.TryMakeMoneyModule;
+import com.sheep.gamegroup.event.BigEvent;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BulletinEnty;
 import com.sheep.gamegroup.model.entity.CashAwarsEntity;
@@ -56,6 +57,7 @@ import com.sheep.gamegroup.model.entity.MoreDataEntity;
 import com.sheep.gamegroup.model.entity.RecyleObj;
 import com.sheep.gamegroup.model.entity.RecyleType;
 import com.sheep.gamegroup.model.entity.RequestParamEty;
+import com.sheep.gamegroup.model.entity.RobTask;
 import com.sheep.gamegroup.model.entity.SlideshowEty;
 import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
 import com.sheep.gamegroup.model.entity.TaskReleaseEty;
@@ -67,6 +69,7 @@ import com.sheep.gamegroup.presenter.SmallSheepPresenter;
 import com.sheep.gamegroup.presenter.TryMakeMoneyContract;
 import com.sheep.gamegroup.presenter.TryMakeMoneyPresenter;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ConfigUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
@@ -193,7 +196,11 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     TextView test_change;
     @BindView(R.id.test_change_user)
     TextView test_change_user;
-
+    @BindView(R.id.list_title)
+    LinearLayout listTitle;
+    LinearLayout titleCardLayout;
+    /* 记录滑动坐标的数组 */
+    int[] locate = new int[2];
 
     @Inject
     SmallSheepPresenter pagePresenter;
@@ -228,6 +235,8 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     public static final int WHAT_UPDATE_BOTTOM_LINE = 3;//刷新底线(双击我回到顶部)
     public static final int WHAT_UPDATE_FOOT_VIEW_CALL_BACK = 4;//刷新发布任务列表的加载更多的状态回调
     public static final int WHAT_TRY_SHOW_HB = 7;//尝试显示红包
+
+    private int clickCount = 0;
     public Handler mHandler = new Handler(Looper.getMainLooper()) {
         @Override
         public void handleMessage(Message msg) {
@@ -267,7 +276,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                     break;
                 case WHAT_UPDATE_FOOT_VIEW_CALL_BACK://发布任务列表的加载更多的回调
                     String obj = (String) msg.obj;
-                    switch (obj){
+                    switch (obj) {
                         case "onLoadingMore":
                             bottom_line_text.setText("羊羊努力加载中...");
                             break;
@@ -283,7 +292,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                     if (mViewPager == null || item == null) {
                         return;
                     }
-                    bottom_line_text.setText(item.isNoMore() ?"我是有底线的,双击我回到顶部" : "双击我回到顶部");
+                    bottom_line_text.setText(item.isNoMore() ? "我是有底线的,双击我回到顶部" : "双击我回到顶部");
                     break;
                 case WHAT_TRY_SHOW_HB:
                     isShowRedPackages(activity);
@@ -292,6 +301,10 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
         }
     };
+    private TextView doIt;
+    private TextView willStart;
+    private View doItLine;
+    private LinearLayout lines;
 
     /**
      * @return 是否显示兑换邀请码红包
@@ -359,7 +372,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 if (clipData != null && clipData.getItemCount() > 0) {
                     // 从数据集中获取(粘贴)第一条文本数据
                     CharSequence codetext = clipData.getItemAt(0).getText();
-                    if (!TextUtils.isEmpty(codetext)){
+                    if (!TextUtils.isEmpty(codetext)) {
                         edInvitationCode.setText(codetext);
                     }
                 }
@@ -501,11 +514,11 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         if (userEntity == null) {
             userEntity = DataUtil.getInstance().getUserEntity();
         }
-        if(userEntity == null){
+        if (userEntity == null) {
             CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
                 @Override
                 public void call(UserEntity result) {
-                    if(result != null){
+                    if (result != null) {
                         userEntity = result;
                         showRedPackageNext();
                     }
@@ -526,6 +539,82 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         }
     }
 
+    /**
+     * 初始化选项卡
+     *
+     * @param context 上下文参数
+     */
+    @SuppressLint("InflateParams")
+    private void initTitleCardLayout(final Context context) {
+        WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+        titleCardLayout = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.view_float_title_card, null);
+        doIt = titleCardLayout.findViewById(R.id.do_it_text);
+        willStart = titleCardLayout.findViewById(R.id.will_start_text);
+        doItLine = titleCardLayout.findViewById(R.id.do_it_every_day_line);
+        lines = titleCardLayout.findViewById(R.id.but_will_start);
+        int linex = (wm.getDefaultDisplay().getWidth() / 6) - (getViewWidth(doItLine) / 2);
+        lines.setX(linex);
+        ViewGroup.LayoutParams layoutParams = lines.getLayoutParams();
+        layoutParams.width = wm.getDefaultDisplay().getWidth() - (linex * 2);
+        doIt.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (mViewPager != null) {
+                    mViewPager.setCurrentItem(0);
+                }
+                toDayClick();
+            }
+        });
+        willStart.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (mViewPager != null) {
+                    mViewPager.setCurrentItem(1);
+                }
+                willStartClick();
+            }
+        });
+        ((ViewGroup) this.getActivity().getWindow().getDecorView()).addView(titleCardLayout);
+        titleCardLayout.setVisibility(View.GONE);
+    }
+
+    /**
+     * 每日必做按钮事件回调
+     */
+    private void toDayClick() {
+        doIt.setTextColor(getContext().getResources().getColor(R.color.blue_34a6e7));
+        willStart.setTextColor(getContext().getResources().getColor(R.color.black_444444));
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+            TransitionManager.beginDelayedTransition(titleCardLayout, new ChangeBounds());
+        }
+        lines.setGravity(Gravity.LEFT);
+    }
+
+    /**
+     * 即将开始按钮事件回调
+     */
+    private void willStartClick() {
+        doIt.setTextColor(getContext().getResources().getColor(R.color.black_444444));
+        willStart.setTextColor(getContext().getResources().getColor(R.color.blue_34a6e7));
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+            TransitionManager.beginDelayedTransition(titleCardLayout, new ChangeBounds());
+        }
+        lines.setGravity(Gravity.RIGHT);
+    }
+
+    /**
+     * 获取控件宽度
+     *
+     * @param view 视图控件
+     * @return 返回视图控件的宽度
+     */
+    private int getViewWidth(View view) {
+        int Kw = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
+        int Kh = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
+        view.measure(Kw, Kh);
+        return view.getMeasuredWidth();
+    }
+
     @Override
     public int getLayoutId() {
         return R.layout.homepage_act_layout;
@@ -537,6 +626,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         showPDialog();
         initView();
         initListener();
+        initTitleCardLayout(this.getContext());
         TestUtil.testChange(activity, test_change);
         TestUtil.testChangeUser(activity, test_change_user);
         GlideImageLoader.setImage(bg_newbie_task, "http://cdngame.kuaifazs.com/bg_newbie_task.png");
@@ -568,7 +658,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
          */
         adpViewPagerDetail = new AdpTryMakemoney(getChildFragmentManager(), activity);
         FgtTryMakeMoney firstItem = FgtTryMakeMoney.newInstance(0, "is_hot");
-        adpViewPagerDetail.add(firstItem,"每日必做");
+        adpViewPagerDetail.add(firstItem, "每日必做");
         adpViewPagerDetail.add(FgtTryMakeMoney.newInstance(1, "about_to_begin"), "即将开始");
 
         mViewPager.setOffscreenPageLimit(2);
@@ -584,6 +674,11 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
             @Override
             public void onPageSelected(int position) {
+                if (position == 0) {
+                    toDayClick();
+                } else if (position == 1) {
+                    willStartClick();
+                }
                 FgtTryMakeMoney lastItem = (FgtTryMakeMoney) adpViewPagerDetail.getItem(position);
                 curPosition = position;
                 FgtTryMakeMoney item = (FgtTryMakeMoney) adpViewPagerDetail.getItem(curPosition);
@@ -604,7 +699,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         full_home_list_rv.setHasFixedSize(true);
         full_home_list_rv.setNestedScrollingEnabled(false);
         full_home_list_rv.setLayoutManager(new LinearLayoutManager(activity));
-        full_home_list_rv.setAdapter(new AdbCommonRecycler<HomeListEntity>(activity, fullHomeList){
+        full_home_list_rv.setAdapter(new AdbCommonRecycler<HomeListEntity>(activity, fullHomeList) {
             @Override
             public int getViewIdByType(int type) {
                 return R.layout.item_image_full_home_list;
@@ -637,7 +732,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         animation.setDuration(150);
         animation.setRepeatCount(Integer.MAX_VALUE);//根据产品要求,要一直晃动
         animation.setRepeatMode(Animation.REVERSE);
-        if(imageView != null)
+        if (imageView != null)
             imageView.startAnimation(animation);
     }
 
@@ -659,6 +754,17 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
     @SuppressLint("ClickableViewAccessibility")
     public void initListener() {
+        scrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
+            @Override
+            public void onScrollChange(NestedScrollView nestedScrollView, int i, int i1, int i2, int i3) {
+                listTitle.getLocationInWindow(locate);
+                if (locate[1] < 0 && titleCardLayout.getVisibility() == View.GONE) {
+                    titleCardLayout.setVisibility(View.VISIBLE);
+                } else if (locate[1] > 20 && titleCardLayout.getVisibility() == View.VISIBLE) {
+                    titleCardLayout.setVisibility(View.GONE);
+                }
+            }
+        });
         scrollView.setOnTouchListener(new View.OnTouchListener() {
             @Override
             public boolean onTouch(View v, MotionEvent event) {
@@ -891,6 +997,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 }
                 UMConfigUtils.IdEvent.HOME_LIST.commit(homeListEntity.getId());
                 if ("-2".equals(homeListEntity.getJump())) {
+                    clickCount += 1;
                     setValueList(!homeListEntity.isSelect());
                 } else {
                     CommonUtil.getInstance()
@@ -919,12 +1026,12 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
     @OnClick({R.id.recharge, R.id.withdrawal, R.id.view_rob_duty,
             R.id.newbie_task, R.id.icon_img_iv, R.id.user_layout,
-            R.id.bottom_line,R.id.homepage_item_money_tv
+            R.id.bottom_line, R.id.homepage_item_money_tv
     })
     public void onViewClicked(View view) {
         switch (view.getId()) {
             case R.id.homepage_item_money_tv:
-                Jump2View.getInstance().goTryplayView(activity,null);
+                Jump2View.getInstance().goTryplayView(activity, null);
                 break;
             case R.id.withdrawal://提现
                 Jump2View.getInstance().tryGoWithdrawal(activity, userEntity);
@@ -949,10 +1056,10 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 CommonUtil.getInstance().robTask(new Action1<RobTask>() {
                     @Override
                     public void call(RobTask robTask) {
-                        if(robTask != null){
+                        if (robTask != null) {
                             SheepApp.getInstance().setOrder(robTask.getOrder());
                             ViewUtil.newInstance().showRobDutyDialog(getActivity(), getView(), robTask);
-                        }else {
+                        } else {
                             G.showToast("任务已被抢光!请实时关注任务发布!");
                         }
                     }
@@ -1168,8 +1275,8 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     }
 
     private void checkAndInitView() {
-        if (recyclerview == null){
-            if(unbinder != null){
+        if (recyclerview == null) {
+            if (unbinder != null) {
                 try {
                     unbinder.unbind();
                 } catch (Exception e) {
@@ -1332,7 +1439,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 .setOnBannerListener(new OnBannerListener() {
                     @Override
                     public void OnBannerClick(int i) {
-                        CommonUtil.getInstance().clickBanner(activity,i, slideshowEtyLists);
+                        CommonUtil.getInstance().clickBanner(activity, i, slideshowEtyLists);
                     }
                 });
 
@@ -1546,8 +1653,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
      */
     private void addNewTask() {
 
-        if (CommonUtil.getInstance().addNewTask(activity, userEntity) && homeListEntitysGridview != null)
-        {
+        if (CommonUtil.getInstance().addNewTask(activity, userEntity) && homeListEntitysGridview != null) {
             HomeListEntity homeListEntityNewTask = new HomeListEntity();
             homeListEntityNewTask.setTitle("新手任务");
             homeListEntityNewTask.setDesc("新手任务");
@@ -1557,7 +1663,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
         }
         if (homeListEntitys.size() > 8) {
             HomeListEntity homeListEntity = new HomeListEntity();
-            homeListEntity.setTitle("查看更多");
+            homeListEntity.setTitle("更多");
             homeListEntity.setDesc("查看更多");
             homeListEntity.setJump("-2");
             homeListEntity.setIcon("http://cdngame.kuaifazs.com/homepage_chakangd.png");
@@ -1576,23 +1682,26 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                     homeListEntitysGridview.add(homeListEntitys.get(i));
                 }
             }
-
         }
         if (homeListEntitysGridview.size() > 8) {
             HomeListEntity homeListEntity = new HomeListEntity();
             homeListEntity.setJump("-2");
             homeListEntity.setSelect(flag);
             if (flag) {
-                homeListEntity.setTitle("收起模块");
+                homeListEntity.setTitle("收起");
                 homeListEntity.setDesc("收起模块");
                 homeListEntity.setIcon("http://cdngame.kuaifazs.com/homepage_chakangd_click.png");
             } else {
-                homeListEntity.setTitle("查看更多");
+                homeListEntity.setTitle("更多");
                 homeListEntity.setDesc("查看更多");
                 homeListEntity.setIcon("http://cdngame.kuaifazs.com/homepage_chakangd.png");
             }
             homeListEntitysGridview.set(7, homeListEntity);
         }
+        /* 为了避免第一次点击时网络图片未加载到本地导致UI混乱,第一次点击不执行此动画,转而使用View自带的变换动画 */
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && clickCount > 1) {
+            TransitionManager.beginDelayedTransition(home_list_gridview_gv, new ChangeBounds());
+        }
         adpHomeListGrideview.notifyDataSetChanged();
     }
 }

+ 13 - 12
app/src/main/res/layout/homepage_act_layout.xml

@@ -45,7 +45,7 @@
                     android:id="@+id/full_home_list_rv"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:visibility="gone"/>
+                    android:visibility="gone" />
 
                 <View
                     android:layout_width="match_parent"
@@ -53,6 +53,7 @@
                     android:background="#fff5f5f5" />
 
                 <include layout="@layout/homepage_item_get_award" />
+
                 <View
                     android:layout_width="match_parent"
                     android:layout_height="1dp"
@@ -91,15 +92,15 @@
                     android:id="@+id/recyclerview_line"
                     android:layout_width="match_parent"
                     android:layout_height="10dp"
-                    android:layout_marginBottom="@dimen/content_padding_8"
                     android:layout_marginTop="@dimen/content_padding_8"
+                    android:layout_marginBottom="@dimen/content_padding_8"
                     android:background="#fff5f5f5"
                     android:visibility="gone" />
 
                 <!--选项卡-->
                 <include layout="@layout/tablayout_viewpager_layout" />
 
-                <include layout="@layout/find_item_bottom"/>
+                <include layout="@layout/find_item_bottom" />
 
             </LinearLayout>
 
@@ -110,13 +111,13 @@
         android:id="@+id/newbie_task"
         android:layout_width="40dp"
         android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
         android:layout_alignParentEnd="true"
-        android:layout_marginBottom="@dimen/content_padding_20"
+        android:layout_alignParentBottom="true"
         android:layout_marginEnd="@dimen/content_padding_10"
+        android:layout_marginBottom="@dimen/content_padding_20"
         android:gravity="center"
-        android:paddingBottom="@dimen/content_padding_10"
         android:paddingTop="@dimen/content_padding_10"
+        android:paddingBottom="@dimen/content_padding_10"
         android:visibility="gone">
 
         <ImageView
@@ -131,13 +132,13 @@
         android:id="@+id/view_rob_duty"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
         android:layout_alignParentEnd="true"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentBottom="true"
         android:layout_marginBottom="@dimen/content_padding_20"
         android:gravity="right"
-        android:layout_alignParentRight="true"
-        android:paddingBottom="@dimen/content_padding_10"
         android:paddingTop="@dimen/content_padding_10"
+        android:paddingBottom="@dimen/content_padding_10"
         android:visibility="visible">
 
         <ImageView
@@ -154,11 +155,11 @@
         style="@style/style_button_small_yellow"
         android:layout_width="wrap_content"
         android:layout_height="30dp"
-        android:layout_alignParentBottom="true"
         android:layout_alignParentStart="true"
+        android:layout_alignParentBottom="true"
         android:layout_margin="@dimen/content_padding_10"
-        android:paddingEnd="@dimen/content_padding_10"
         android:paddingStart="@dimen/content_padding_10"
+        android:paddingEnd="@dimen/content_padding_10"
         android:text="切换账号"
         android:visibility="gone" />
 
@@ -170,8 +171,8 @@
         android:layout_above="@+id/test_change_user"
         android:layout_alignParentStart="true"
         android:layout_margin="@dimen/content_padding_10"
-        android:paddingEnd="@dimen/content_padding_10"
         android:paddingStart="@dimen/content_padding_10"
+        android:paddingEnd="@dimen/content_padding_10"
         android:text="切换服务器"
         android:visibility="gone" />
 </RelativeLayout>

+ 10 - 8
app/src/main/res/layout/homepage_item_gridview_listview.xml

@@ -10,23 +10,25 @@
         android:id="@+id/home_list_gridview_gv"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginBottom="@dimen/content_padding_5"
+        android:animateLayoutChanges="true"
+        android:animationCache="true"
         android:gravity="center_horizontal"
-        android:scrollbars="none"
-        android:numColumns="4"
         android:listSelector="@color/transparent"
-        android:verticalSpacing="@dimen/content_padding_5"
-        android:layout_marginBottom="@dimen/content_padding_5"/>
+        android:numColumns="4"
+        android:scrollbars="none"
+        android:verticalSpacing="@dimen/content_padding_5" />
 
     <com.sheep.gamegroup.util.MyListview
         android:id="@+id/home_list_gridview_listview"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:scrollbars="none"
-        android:divider="@null"
         android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+        android:divider="@null"
+        android:listSelector="@color/transparent"
         android:paddingStart="@dimen/content_padding_10"
         android:paddingEnd="@dimen/content_padding_10"
-        android:listSelector="@color/transparent"
-        android:visibility="gone"/>
+        android:scrollbars="none"
+        android:visibility="gone" />
 
 </LinearLayout>

+ 7 - 5
app/src/main/res/layout/tablayout_viewpager_layout.xml

@@ -1,9 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/list_title"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:orientation="vertical">
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="48dp"
@@ -13,8 +15,8 @@
         <android.support.design.widget.TabLayout
             android:id="@+id/tabLayout"
             style="@style/style_tab"
-            app:tabIndicatorHeight="2dp"
-            android:layout_height="48dp"/>
+            android:layout_height="48dp"
+            app:tabIndicatorHeight="2dp" />
         <include layout="@layout/line_1px_hor" />
     </LinearLayout>
 
@@ -24,6 +26,6 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_marginTop="@dimen/content_padding_15"
-        app:layout_behavior="@string/appbar_scrolling_view_behavior"
-        android:minHeight="@dimen/view_size_100" />
+        android:minHeight="@dimen/view_size_100"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior" />
 </LinearLayout>

+ 67 - 0
app/src/main/res/layout/view_float_title_card.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/title_car"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="#ffffff"
+        android:orientation="vertical"
+        android:paddingTop="30dp"
+        android:paddingBottom="10dp">
+
+        <LinearLayout
+            android:id="@+id/but_do_it_every_day"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/do_it_text"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="每日必做"
+                android:textColor="@color/blue_34a6e7"
+                android:textSize="16sp" />
+
+            <TextView
+                android:id="@+id/will_start_text"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="即将开始"
+                android:textColor="@color/black_444444"
+                android:textSize="16sp" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/but_will_start"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="left"
+            android:orientation="horizontal">
+
+            <View
+                android:id="@+id/do_it_every_day_line"
+                android:layout_width="70dp"
+                android:layout_height="2dp"
+                android:background="@color/blue_34a6e7" />
+
+            <!--<View-->
+            <!--android:id="@+id/will_start_line"-->
+            <!--android:layout_width="70dp"-->
+            <!--android:layout_height="2dp"-->
+            <!--android:background="@color/blue_34a6e7"-->
+            <!--android:visibility="invisible" />-->
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>