hanjing пре 7 година
родитељ
комит
43c6a11498
27 измењених фајлова са 75 додато и 84 уклоњено
  1. 12 1
      app/src/main/AndroidManifest.xml
  2. 24 0
      app/src/main/java/com/sheep/gamegroup/absBase/BaseActivity.java
  3. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActLoadH5.java
  4. 5 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActMsg.java
  5. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActSetting.java
  6. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActSignCard.java
  7. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActSignCardRecord.java
  8. 9 21
      app/src/main/java/com/sheep/gamegroup/view/activity/ActSysNfDetail.java
  9. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java
  10. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/FeedbackAct.java
  11. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/GameTaskOrderListAct.java
  12. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/SignRankingsAct.java
  13. 1 0
      app/src/main/java/com/sheep/gamegroup/view/activity/SignRechargeAct.java
  14. 2 2
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  15. 4 5
      app/src/main/java/com/sheep/jiuyan/samllsheep/ui/activity/SignActivity.java
  16. 1 4
      app/src/main/res/layout/act_feedback_layout.xml
  17. 1 2
      app/src/main/res/layout/act_load_h5.xml
  18. 1 1
      app/src/main/res/layout/act_msg.xml
  19. 0 2
      app/src/main/res/layout/act_setting.xml
  20. 1 2
      app/src/main/res/layout/act_sign_card.xml
  21. 1 2
      app/src/main/res/layout/act_web_x5.xml
  22. 1 2
      app/src/main/res/layout/activity_message_interaction.xml
  23. 1 29
      app/src/main/res/layout/activity_sign.xml
  24. 1 1
      app/src/main/res/layout/common_container_act.xml
  25. 0 3
      app/src/main/res/layout/recharge_act_layout.xml
  26. 1 2
      app/src/main/res/layout/sign_rankings_layout.xml
  27. 1 4
      app/src/main/res/layout/withdrawal_list.xml

+ 12 - 1
app/src/main/AndroidManifest.xml

@@ -243,6 +243,7 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.GameTaskOrderListAct"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.WithdrawalListAct"
@@ -401,30 +402,36 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActWebX5"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActMyMoney"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.FeedbackAct"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActSignCard"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActSignCardRecord"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.SignCardAct"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.SignRankingsAct"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.SignRecordAct"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.SignRechargeAct"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActUserNoviceGuidance"
@@ -646,6 +653,7 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActLoadH5"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActUserLabelList"
@@ -676,6 +684,7 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActSetting"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActGameCenter"
@@ -691,6 +700,7 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.MessageInteractionDetailActivity"
+            android:theme="@style/AppActionTheme"
             android:exported="true" />
 
         <!-- start幂动科技 -->
@@ -726,6 +736,7 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActMsg"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActGiftDetail"
@@ -810,7 +821,7 @@
         <activity
             android:name=".ui.activity.SignActivity"
             android:screenOrientation="portrait"
-            android:theme="@style/AppTheme.NoTitleBar.AlphaStatusBar" />
+            android:theme="@style/AppActionTheme" />
         <!-- 活动规则 -->
         <activity
             android:name=".ui.activity.ActiveRuleActivity"

+ 24 - 0
app/src/main/java/com/sheep/gamegroup/absBase/BaseActivity.java

@@ -1,10 +1,14 @@
 package com.sheep.gamegroup.absBase;
 
+import android.app.Activity;
+import android.content.Context;
 import android.graphics.Color;
 import android.os.Build;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
+import android.support.v4.app.FragmentActivity;
 import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
 import android.support.v7.widget.Toolbar;
 import android.view.View;
 import android.view.Window;
@@ -201,4 +205,24 @@ public abstract class BaseActivity extends RxAppCompatActivity {
             }
         }
     }
+
+    public void hideSystemStatusBar() {
+        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                WindowManager.LayoutParams.FLAG_FULLSCREEN);
+    }
+
+    public void hideSystemNavBar() {
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+            getWindow().getDecorView().setSystemUiVisibility(
+                    View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+                            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav
+                            // bar
+                            | View.SYSTEM_UI_FLAG_IMMERSIVE);
+        } else {
+            getWindow().getDecorView().setSystemUiVisibility(
+                    View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+                            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav
+            );
+        }
+    }
 }

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActLoadH5.java

@@ -58,6 +58,7 @@ public class ActLoadH5 extends BaseActivity {
         String content = getIntent().getStringExtra("content");
 
         TitleBarUtils.getInstance()
+                .setShowOrHide(this, true)
                 .setTitle(this, title)
                 .setTitleFinish(this);
 

+ 5 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActMsg.java

@@ -29,6 +29,7 @@ public class ActMsg extends BaseActivity {
     View title_tab_oval_0;
     @BindView(R.id.title_tab_oval_1)
     View title_tab_oval_1;
+
     @Override
     protected int getLayoutId() {
         return R.layout.act_msg;
@@ -36,9 +37,11 @@ public class ActMsg extends BaseActivity {
 
     private List<Fragment> fragmentList = new ArrayList<>();
     private List<View> ovalList = new ArrayList<>();
+
     @Override
     public void initView() {
         TitleBarUtils.getInstance()
+                .setShowOrHide(this, true)
                 .setTitleFinish(this)
                 .addMsgTab(this, act_msg_vp);
         fragmentList.add(new FgtMsgCenter());
@@ -53,8 +56,9 @@ public class ActMsg extends BaseActivity {
             view.setVisibility(View.INVISIBLE);
         }
     }
+
     //设置小红点的显示与隐藏
-    public void updateMsgOval(int index, boolean hasMsgNotRead){
+    public void updateMsgOval(int index, boolean hasMsgNotRead) {
         ovalList.get(index).setVisibility(hasMsgNotRead ? View.VISIBLE : View.INVISIBLE);
     }
 }

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActSetting.java

@@ -43,6 +43,7 @@ public class ActSetting extends BaseActivity {
     public void initView() {
         activity = this;
         TitleBarUtils.getInstance()
+                .setShowOrHide(this, true)
                 .setTitle(this, "设置")
                 .setTitleFinish(this);
 

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActSignCard.java

@@ -87,6 +87,7 @@ public class ActSignCard extends BaseActivity {
         activity = this;
         TitleBarUtils
                 .getInstance()
+                .setShowOrHide(this, true)
                 .setTitle(activity, "打卡挑战")
                 .setTitleFinish(activity)
 //                .setRightSecondBtn(activity, R.mipmap.question_black_img, new View.OnClickListener() {

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActSignCardRecord.java

@@ -29,6 +29,7 @@ public class ActSignCardRecord extends BaseActivity {
         activity = this;
         TitleBarUtils
                 .getInstance()
+                .setShowOrHide(this, true)
                 .setTitleFinish(activity)
                 .setTitle(activity, "我的战绩")
                 .setRightBtn(activity, "分享", 0, new View.OnClickListener() {

+ 9 - 21
app/src/main/java/com/sheep/gamegroup/view/activity/ActSysNfDetail.java

@@ -13,7 +13,9 @@ import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
+import butterknife.BindView;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
 
@@ -22,11 +24,12 @@ import io.reactivex.schedulers.Schedulers;
  * created by: YSL
  * 描述:
  */
-public class ActSysNfDetail extends BaseActivity implements View.OnClickListener {
+public class ActSysNfDetail extends BaseActivity {
+
+    @BindView(R.id.tv_content)
     TextView tvContent;
+    @BindView(R.id.tv_title)
     TextView tvTitle;
-    TextView tvBaseTitle;
-    View img_baseactivity_title;
 
     @Override
     protected boolean needButterKnife() {
@@ -40,17 +43,14 @@ public class ActSysNfDetail extends BaseActivity implements View.OnClickListener
 
     @Override
     public void initView() {
-        tvBaseTitle = findViewById(R.id.txt_baseactivity_title);
-        tvContent = findViewById(R.id.tv_content);
-        tvTitle = findViewById(R.id.tv_title);
-        img_baseactivity_title = findViewById(R.id.img_baseactivity_title);
+        TitleBarUtils.getInstance().setTitle(this,"消息详情")
+                .setShowOrHide(this, true)
+                .setTitleFinish(this);
     }
 
     @Override
     public void initListener() {
-        tvBaseTitle.setText("消息详情");
         tvTitle.setMovementMethod(new ScrollingMovementMethod());
-        img_baseactivity_title.setOnClickListener(this);
     }
     private void loadData(SystemNotification systemNotification) {
         if (systemNotification != null) {
@@ -59,18 +59,6 @@ public class ActSysNfDetail extends BaseActivity implements View.OnClickListener
         }
     }
 
-
-
-    @Override
-    public void onClick(View view) {
-        switch (view.getId()) {
-            case R.id.img_baseactivity_title:
-                ActSysNfDetail.this.finish();
-                break;
-        }
-
-    }
-
     @Override
     public void initData() {
         Intent intent = getIntent();

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

@@ -76,6 +76,7 @@ public class ActWebX5 extends BaseActWeb {
         }
         TitleBarUtils
                 .getInstance()
+                .setShowOrHide(this, true)
                 .setTitle(this, TextUtils.isEmpty(title) ? "加载中" : title)
                 .setTitleFinish(this);
         initWebViewSettings(mWebView);

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/FeedbackAct.java

@@ -51,6 +51,7 @@ public class FeedbackAct extends BaseActivity {
     @Override
     public void initView() {
         TitleBarUtils.getInstance()
+                .setShowOrHide(this, true)
                 .setTitle(this, "意见反馈")
                 .setTitleFinish(this);
     }

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/GameTaskOrderListAct.java

@@ -55,6 +55,7 @@ public class GameTaskOrderListAct extends BaseActivity {
     public void initView() {
         activity = this;
         TitleBarUtils.getInstance()
+                .setShowOrHide(this, true)
                 .setTitle(this, "订单管理")
                 .setTitleFinish(this);
         EventBus.getDefault().register(this);

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/SignRankingsAct.java

@@ -38,6 +38,7 @@ public class SignRankingsAct extends BaseActivity {
         activity = this;
         TitleBarUtils
                 .getInstance()
+                .setShowOrHide(this, true)
                 .setTitle(activity, "本月排行榜")
                 .setTitleFinish(activity);
     }

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/SignRechargeAct.java

@@ -61,6 +61,7 @@ public class SignRechargeAct extends BaseActivity {
     public void initView() {
         TitleBarUtils.getInstance()
                 .setTitle(this, "充值")
+                .setShowOrHide(this, true)
                 .setTitleFinish(this);
     }
 

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java

@@ -94,9 +94,9 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         try {
-            //恢复成默认主题
-            setTheme(R.style.FullScreenTheme);
             super.onCreate(savedInstanceState);
+            hideSystemStatusBar();
+            hideSystemNavBar();
             if (!isTaskRoot()) {
                 LogUtil.println("SheepApp SplashAct isTaskRoot");
                 finish();

+ 4 - 5
app/src/main/java/com/sheep/jiuyan/samllsheep/ui/activity/SignActivity.java

@@ -36,6 +36,7 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.jiuyan.samllsheep.ui.view.EggView;
 import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 import com.umeng.socialize.UMShareAPI;
 import com.umeng.socialize.UMShareListener;
 import com.umeng.socialize.bean.SHARE_MEDIA;
@@ -101,6 +102,9 @@ public class SignActivity extends BaseUMActivity {
 
     @Override
     public void initView() {
+        TitleBarUtils.getInstance().setTitleFinish(this)
+                .setShowOrHide(this, true)
+                .setTitle(this, "签到");
         ViewUtil.setText(sign_card_num, ViewUtil.BLOCK);
         ViewUtil.setImage(sheep_sign_machine, ViewUtil.getNetImgByName("sheep_sign_machine"));
         ViewUtil.setImage(sheep_sign_rectangle, ViewUtil.getNetImgByName("sheep_sign_rectangle"));
@@ -417,11 +421,6 @@ public class SignActivity extends BaseUMActivity {
         });
     }
 
-    @OnClick(R.id.back_but)
-    public void onBackButClicked() {
-        finish();
-    }
-
     @OnClick(R.id.active_info)
     public void onActiveInfoClicked() {
         startActivity(new Intent(SignActivity.this, ActiveRuleActivity.class));

+ 1 - 4
app/src/main/res/layout/act_feedback_layout.xml

@@ -5,12 +5,9 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:orientation="vertical"
     android:background="@color/bg_gray"
+    android:fitsSystemWindows="true"
     tools:context="com.sheep.gamegroup.view.activity.FeedbackAct">
 
-    <include
-        android:id="@+id/title"
-        layout="@layout/title"/>
-
     <ScrollView
         android:layout_below="@id/title"
         android:layout_width="match_parent"

+ 1 - 2
app/src/main/res/layout/act_load_h5.xml

@@ -2,10 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
     android:orientation="vertical">
 
-    <include layout="@layout/title" />
-
     <TextView
         android:id="@+id/act_notice_content_tv"
         android:layout_width="match_parent"

+ 1 - 1
app/src/main/res/layout/act_msg.xml

@@ -2,9 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
     android:orientation="vertical">
 
-    <include layout="@layout/title"/>
     <android.support.v4.view.ViewPager
         android:id="@+id/act_msg_vp"
         android:layout_width="match_parent"

+ 0 - 2
app/src/main/res/layout/act_setting.xml

@@ -5,8 +5,6 @@
     android:background="@color/white_light"
     android:orientation="vertical">
 
-    <include layout="@layout/title" />
-
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 1 - 2
app/src/main/res/layout/act_sign_card.xml

@@ -2,10 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
     android:orientation="vertical">
 
-    <include layout="@layout/title" />
-
     <android.support.v4.widget.NestedScrollView
         android:layout_width="match_parent"
         android:layout_height="match_parent"

+ 1 - 2
app/src/main/res/layout/act_web_x5.xml

@@ -3,10 +3,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
+    android:fitsSystemWindows="true"
     android:background="@color/white_F9F9F9">
 
-    <include
-        layout="@layout/title"/>
     <com.tencent.smtt.sdk.WebView
         android:id="@+id/webview"
         android:layout_width="match_parent"

+ 1 - 2
app/src/main/res/layout/activity_message_interaction.xml

@@ -2,11 +2,10 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
     android:background="@color/white"
     android:orientation="vertical">
 
-    <include layout="@layout/title" />
-
     <TextView
         android:id="@+id/tv_title"
         android:layout_width="wrap_content"

+ 1 - 29
app/src/main/res/layout/activity_sign.xml

@@ -2,40 +2,12 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
     android:background="#f8f8f8">
 
-    <RelativeLayout
-        android:id="@+id/title_bar"
-        android:layout_width="match_parent"
-        android:layout_height="?actionBarSize"
-        android:background="#ffffff"
-        android:gravity="center_vertical"
-        android:paddingLeft="16dp"
-        android:paddingRight="16dp">
-
-        <ImageView
-            android:id="@+id/back_but"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:contentDescription="@string/image_des"
-            android:padding="10dp"
-            android:src="@drawable/narrow_back_black" />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_centerInParent="true"
-            android:gravity="center"
-            android:text="签到"
-            android:textColor="#333333"
-            android:textSize="17sp" />
-    </RelativeLayout>
-
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_below="@id/title_bar"
         android:scrollbars="none">
 
         <LinearLayout

+ 1 - 1
app/src/main/res/layout/common_container_act.xml

@@ -2,8 +2,8 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
     android:orientation="vertical">
-    <include layout="@layout/title" />
     <FrameLayout
         android:id="@+id/frame_container"
         android:layout_width="match_parent"

+ 0 - 3
app/src/main/res/layout/recharge_act_layout.xml

@@ -6,9 +6,6 @@
     android:fitsSystemWindows="true"
     android:orientation="vertical">
 
-    <include layout="@layout/title" />
-
-
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 1 - 2
app/src/main/res/layout/sign_rankings_layout.xml

@@ -3,10 +3,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/white"
+    android:fitsSystemWindows="true"
     android:orientation="vertical">
 
-    <include layout="@layout/title" />
-
     <android.support.design.widget.TabLayout
         android:id="@+id/sign_tab"
         style="@style/style_tab" />

+ 1 - 4
app/src/main/res/layout/withdrawal_list.xml

@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:fitsSystemWindows="true"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
     <include
-        android:id="@+id/title"
-        layout="@layout/title" />
-
-    <include
         android:id="@+id/empty_view"
         layout="@layout/empty_view"
         android:layout_width="match_parent"