hanjing лет назад: 7
Родитель
Сommit
6804548bad

+ 3 - 0
app/src/main/AndroidManifest.xml

@@ -311,6 +311,7 @@
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
         <activity
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActDownloadMgr"
             android:name="com.sheep.gamegroup.view.activity.ActDownloadMgr"
+            android:theme="@style/AppActionTheme"
             android:hardwareAccelerated="false"
             android:hardwareAccelerated="false"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
 
 
@@ -626,6 +627,7 @@
         <!-- div start -->
         <!-- div start -->
         <activity
         <activity
             android:name="com.sheep.gamegroup.view.activity.RechargeAct"
             android:name="com.sheep.gamegroup.view.activity.RechargeAct"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
         <activity
         <activity
             android:name="com.sheep.gamegroup.view.activity.RechargeQAct"
             android:name="com.sheep.gamegroup.view.activity.RechargeQAct"
@@ -752,6 +754,7 @@
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
         <activity
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActSearchApp"
             android:name="com.sheep.gamegroup.view.activity.ActSearchApp"
+            android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
         <activity
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActMsg"
             android:name="com.sheep.gamegroup.view.activity.ActMsg"

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

@@ -156,7 +156,7 @@ public abstract class BaseActivity extends RxAppCompatActivity {
 
 
     @Override
     @Override
     protected void onDestroy() {
     protected void onDestroy() {
-        fixHuaweiLeak();
+//        fixHuaweiLeak();
         try {
         try {
             super.onDestroy();
             super.onDestroy();
             if (needButterKnife() && this.unbinder != null) {
             if (needButterKnife() && this.unbinder != null) {

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

@@ -83,6 +83,8 @@ public class ActDownloadMgr extends BaseActivity {
     @Override
     @Override
     public void initView() {
     public void initView() {
         TitleBarUtils.getInstance().setTitleFinish(this)
         TitleBarUtils.getInstance().setTitleFinish(this)
+                .setShowOrHide(this, true)
+                .setTitleFinish(this)
                 .setTitle(this, getString(R.string.label_download_mgr))
                 .setTitle(this, getString(R.string.label_download_mgr))
                 .setRightBtn(this, "删除全部", 0, new View.OnClickListener() {
                 .setRightBtn(this, "删除全部", 0, new View.OnClickListener() {
                     @Override
                     @Override

+ 40 - 71
app/src/main/java/com/sheep/gamegroup/view/activity/ActSearchApp.java

@@ -17,7 +17,9 @@ import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.TextView;
 
 
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.absBase.IHomePageSearch;
 import com.sheep.gamegroup.model.entity.SearchAppRecord;
 import com.sheep.gamegroup.model.entity.SearchAppRecord;
+import com.sheep.gamegroup.util.ApiUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.MyDbManager;
 import com.sheep.gamegroup.util.MyDbManager;
@@ -26,6 +28,7 @@ import com.sheep.gamegroup.view.adapter.ArrayAdapter;
 import com.sheep.gamegroup.view.fragment.FgtSearchApp;
 import com.sheep.gamegroup.view.fragment.FgtSearchApp;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Collections;
@@ -35,21 +38,20 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 import butterknife.BindView;
 import butterknife.BindView;
-import butterknife.OnClick;
 
 
 /**
 /**
  * Created by realicing on 2018/9/13.
  * Created by realicing on 2018/9/13.
  * realicing@sina.com
  * realicing@sina.com
  */
  */
 public class ActSearchApp extends BaseActivity {
 public class ActSearchApp extends BaseActivity {
-    @BindView(R.id.title_search_input)
-    AppCompatAutoCompleteTextView title_search_input;
+    //    @BindView(R.id.title_search_input)
+//    AppCompatAutoCompleteTextView title_search_input;
     @BindView(R.id.search_app_list)
     @BindView(R.id.search_app_list)
     ListView search_app_list;
     ListView search_app_list;
     @BindView(R.id.frame_container)
     @BindView(R.id.frame_container)
     View frame_container;
     View frame_container;
-    @BindView(R.id.title_search_commit)
-    TextView title_search_commit;
+//    @BindView(R.id.title_search_commit)
+//    TextView title_search_commit;
 
 
     @Override
     @Override
     protected int getLayoutId() {
     protected int getLayoutId() {
@@ -75,11 +77,11 @@ public class ActSearchApp extends BaseActivity {
         }
         }
         if (fgtSearchApp == null && fragment instanceof FgtSearchApp)
         if (fgtSearchApp == null && fragment instanceof FgtSearchApp)
             fgtSearchApp = (FgtSearchApp) fragment;
             fgtSearchApp = (FgtSearchApp) fragment;
-        inputAdapter = new ArrayAdapter<SearchAppRecord>(SheepApp.getInstance(), R.layout.item_serach_record, searchRecordList){
+        inputAdapter = new ArrayAdapter<SearchAppRecord>(SheepApp.getInstance(), R.layout.item_serach_record, searchRecordList) {
             @Override
             @Override
             public boolean convert(int position, View view, ViewGroup parent, final SearchAppRecord item) {
             public boolean convert(int position, View view, ViewGroup parent, final SearchAppRecord item) {
-                TextView item_search_record_name = (TextView)view.findViewById(R.id.item_search_record_name);
-                ImageView item_search_record_x = (ImageView)view.findViewById(R.id.item_search_record_x);
+                TextView item_search_record_name = (TextView) view.findViewById(R.id.item_search_record_name);
+                ImageView item_search_record_x = (ImageView) view.findViewById(R.id.item_search_record_x);
                 ViewUtil.setText(item_search_record_name, item.getInput());
                 ViewUtil.setText(item_search_record_name, item.getInput());
                 item_search_record_x.setOnClickListener(new View.OnClickListener() {
                 item_search_record_x.setOnClickListener(new View.OnClickListener() {
                     @Override
                     @Override
@@ -90,7 +92,7 @@ public class ActSearchApp extends BaseActivity {
                         ListUtil.addAll(searchRecordList, allSearchRecordList, 10);
                         ListUtil.addAll(searchRecordList, allSearchRecordList, 10);
                         inputAdapter.notifyDataSetChanged();
                         inputAdapter.notifyDataSetChanged();
                         MyDbManager.getInstance().hideSearchApp(item);
                         MyDbManager.getInstance().hideSearchApp(item);
-                        if(searchRecordList.isEmpty()){
+                        if (searchRecordList.isEmpty()) {
                             frame_container.setVisibility(View.VISIBLE);
                             frame_container.setVisibility(View.VISIBLE);
                             search_app_list.setVisibility(View.INVISIBLE);
                             search_app_list.setVisibility(View.INVISIBLE);
                         }
                         }
@@ -106,73 +108,52 @@ public class ActSearchApp extends BaseActivity {
 
 
     @Override
     @Override
     public void initListener() {
     public void initListener() {
+        TitleBarUtils.getInstance()
+                .setShowOrHide(this, true)
+                .setTitleFinish(this)
+                .setSearchBox(this, "搜索任务名称/游戏名称",
+                        (v, actionId, event) -> {
+                            if (actionId == EditorInfo.IME_ACTION_SEARCH) {
+                                toSearchApp();
+                            }
+                            return false;
+                        },
+                        (text) -> {
+                            if (text.isEmpty() && !searchRecordList.isEmpty()) {//输入框内容为空且有搜索记录时显示搜索记录
+                                search_app_list.setVisibility(View.VISIBLE);
+                                frame_container.setVisibility(View.INVISIBLE);
+                            } else {
+                                frame_container.postDelayed(() -> toSearchApp(), 1000L);//1秒后自动搜索
+                            }
+                        })
+                .setRightBtn(this, "搜索", 0,
+                        v -> toSearchApp())
+                .setShowOrHide(this, true);
         search_app_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
         search_app_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             @Override
             public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
             public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
                 SearchAppRecord item = ListUtil.getItem(searchRecordList, position);
                 SearchAppRecord item = ListUtil.getItem(searchRecordList, position);
-                if(item != null){
-                    title_search_input.setText(item.getInput());
-                    title_search_input.setSelection(item.getInput().length());
-                }
-            }
-        });
-        title_search_input.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_SEARCH) {
-                    title_search_commit.performClick();
-                }
-                return false;
-            }
-        });
-        title_search_input.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
-
-            }
-
-            @Override
-            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
-            }
-
-            @Override
-            public void afterTextChanged(Editable editable) {
-                title_search_input.removeCallbacks(autoSearchRunnable);
-                if(editable.toString().isEmpty() && !searchRecordList.isEmpty()){//输入框内容为空且有搜索记录时显示搜索记录
-                    search_app_list.setVisibility(View.VISIBLE);
-                    frame_container.setVisibility(View.INVISIBLE);
-                } else {
-                    title_search_input.postDelayed(autoSearchRunnable, 1000L);//1秒后自动搜索
+                if (item != null) {
+                    TitleBarUtils.getInstance().setSearchText(ActSearchApp.this, item.getInput());
+                    if (item instanceof IHomePageSearch)
+                        ApiUtil.postTopSearchStatisticsClickTopSearch((IHomePageSearch) item);
                 }
                 }
             }
             }
         });
         });
     }
     }
 
 
-    private Runnable autoSearchRunnable = new Runnable() {
-        @Override
-        public void run() {
-            if(title_search_commit != null)
-                title_search_commit.performClick();
-        }
-    };
-    private Comparator<SearchAppRecord> comparator = new Comparator<SearchAppRecord>() {
-        @Override
-        public int compare(SearchAppRecord item1, SearchAppRecord item2) {
-            return item2.getCount() - item1.getCount();
-        }
-    };
     @Override
     @Override
     public void initData() {
     public void initData() {
         //初始化搜索历史
         //初始化搜索历史
         List<SearchAppRecord> newSgrList = MyDbManager.getInstance().getAllSearchAppRecord();
         List<SearchAppRecord> newSgrList = MyDbManager.getInstance().getAllSearchAppRecord();
         ListUtil.addAll(allSearchRecordList, newSgrList);
         ListUtil.addAll(allSearchRecordList, newSgrList);
-        Collections.sort(allSearchRecordList, comparator);
+        Collections.sort(allSearchRecordList, (item1,item2) -> item2.getCount() - item1.getCount());
         ListUtil.addAll(searchRecordList, allSearchRecordList, 10);
         ListUtil.addAll(searchRecordList, allSearchRecordList, 10);
         for (SearchAppRecord item : allSearchRecordList) {
         for (SearchAppRecord item : allSearchRecordList) {
             searchRecordMap.put(item.getInput(), item);
             searchRecordMap.put(item.getInput(), item);
         }
         }
         inputAdapter.notifyDataSetChanged();
         inputAdapter.notifyDataSetChanged();
-        if(searchRecordList.isEmpty()) {
+        if (searchRecordList.isEmpty()) {
             frame_container.setVisibility(View.VISIBLE);
             frame_container.setVisibility(View.VISIBLE);
             search_app_list.setVisibility(View.INVISIBLE);
             search_app_list.setVisibility(View.INVISIBLE);
         } else {
         } else {
@@ -181,18 +162,6 @@ public class ActSearchApp extends BaseActivity {
         }
         }
     }
     }
 
 
-    @OnClick({R.id.title_search_commit, R.id.title_img_back})
-    public void onViewClicked(View view) {
-        switch (view.getId()) {
-            case R.id.title_search_commit:
-                toSearchApp();
-                break;
-            case R.id.title_img_back:
-                finish();
-                break;
-        }
-    }
-
     List<SearchAppRecord> searchRecordList = new ArrayList<>();
     List<SearchAppRecord> searchRecordList = new ArrayList<>();
     List<SearchAppRecord> allSearchRecordList = new ArrayList<>();
     List<SearchAppRecord> allSearchRecordList = new ArrayList<>();
     Map<String, SearchAppRecord> searchRecordMap = new HashMap<>();
     Map<String, SearchAppRecord> searchRecordMap = new HashMap<>();
@@ -201,11 +170,11 @@ public class ActSearchApp extends BaseActivity {
     private void toSearchApp() {
     private void toSearchApp() {
         search_app_list.setVisibility(View.INVISIBLE);
         search_app_list.setVisibility(View.INVISIBLE);
         frame_container.setVisibility(View.VISIBLE);
         frame_container.setVisibility(View.VISIBLE);
-        String inputText = title_search_input.getText().toString();
+        String inputText = TitleBarUtils.getInstance().getSearchText(this).toString();
         if (!TextUtils.isEmpty(inputText)) {
         if (!TextUtils.isEmpty(inputText)) {
             //保存搜索到数据库
             //保存搜索到数据库
             SearchAppRecord searchRecord = searchRecordMap.get(inputText);
             SearchAppRecord searchRecord = searchRecordMap.get(inputText);
-            if(searchRecord == null) {
+            if (searchRecord == null) {
                 searchRecord = new SearchAppRecord();
                 searchRecord = new SearchAppRecord();
                 searchRecord.setInput(inputText);
                 searchRecord.setInput(inputText);
                 searchRecordList.add(searchRecord);
                 searchRecordList.add(searchRecord);

+ 23 - 8
app/src/main/java/com/sheep/gamegroup/view/activity/ActSearchAppOrTask.java

@@ -1,6 +1,8 @@
 package com.sheep.gamegroup.view.activity;
 package com.sheep.gamegroup.view.activity;
 
 
+import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
 import android.support.v7.widget.AppCompatAutoCompleteTextView;
 import android.support.v7.widget.AppCompatAutoCompleteTextView;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView;
@@ -15,6 +17,7 @@ import android.widget.TextView;
 
 
 import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
 import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
 import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
 import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
+import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.BaseContainerActivity;
 import com.sheep.gamegroup.absBase.BaseContainerActivity;
 import com.sheep.gamegroup.absBase.IHomePageSearch;
 import com.sheep.gamegroup.absBase.IHomePageSearch;
 import com.sheep.gamegroup.absBase.ISearch;
 import com.sheep.gamegroup.absBase.ISearch;
@@ -30,6 +33,7 @@ import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdpTitleInfoList;
 import com.sheep.gamegroup.view.adapter.AdpTitleInfoList;
+import com.sheep.gamegroup.view.fragment.FgtSearchApp;
 import com.sheep.gamegroup.view.fragment.FgtSearchAppOrTask;
 import com.sheep.gamegroup.view.fragment.FgtSearchAppOrTask;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -51,21 +55,33 @@ import io.reactivex.schedulers.Schedulers;
  * Created by realicing on 2018/9/13.
  * Created by realicing on 2018/9/13.
  * realicing@sina.com
  * realicing@sina.com
  */
  */
-public class ActSearchAppOrTask extends BaseContainerActivity {
+public class ActSearchAppOrTask extends BaseActivity {
     @BindView(R.id.search_app_list)
     @BindView(R.id.search_app_list)
     RecyclerView recyclerView;
     RecyclerView recyclerView;
     @BindView(R.id.frame_container)
     @BindView(R.id.frame_container)
     View frame_container;
     View frame_container;
 
 
+    FgtSearchAppOrTask fgtSearchAppOrTask;
+
     @Override
     @Override
     protected int getLayoutId() {
     protected int getLayoutId() {
         return R.layout.act_search_app_or_task;
         return R.layout.act_search_app_or_task;
     }
     }
 
 
-
     @Override
     @Override
-    protected Fragment initFragment() {
-        return new FgtSearchAppOrTask();
+    public void initView() {
+        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+        Fragment fragment = getSupportFragmentManager().findFragmentByTag("tag");
+        if (fragment == null) {
+            fragment = new FgtSearchAppOrTask();
+            transaction.add(R.id.frame_container, fragment, "tag");
+            transaction.commitAllowingStateLoss();
+        } else {
+            transaction.replace(R.id.frame_container, fragment);
+            transaction.commitAllowingStateLoss();
+        }
+        if (fgtSearchAppOrTask == null && fragment instanceof FgtSearchAppOrTask)
+            fgtSearchAppOrTask = (FgtSearchAppOrTask) fragment;
     }
     }
 
 
     private List<TitleInfoList> titleInfoListList = new ArrayList<>();
     private List<TitleInfoList> titleInfoListList = new ArrayList<>();
@@ -74,6 +90,7 @@ public class ActSearchAppOrTask extends BaseContainerActivity {
     public void initListener() {
     public void initListener() {
         TitleBarUtils.getInstance()
         TitleBarUtils.getInstance()
                 .setShowOrHide(this, true)
                 .setShowOrHide(this, true)
+                .setTitleFinish(this)
                 .setSearchBox(this, "搜索任务名称/游戏名称",
                 .setSearchBox(this, "搜索任务名称/游戏名称",
                         (v, actionId, event) -> {
                         (v, actionId, event) -> {
                             if (actionId == EditorInfo.IME_ACTION_SEARCH) {
                             if (actionId == EditorInfo.IME_ACTION_SEARCH) {
@@ -91,8 +108,7 @@ public class ActSearchAppOrTask extends BaseContainerActivity {
                             }
                             }
                         })
                         })
                 .setRightBtn(this, "搜索", 0,
                 .setRightBtn(this, "搜索", 0,
-                        v -> toSearchApp())
-                .setShowOrHide(this, true);
+                        v -> toSearchApp());
 
 
         recyclerView.setHasFixedSize(true);
         recyclerView.setHasFixedSize(true);
         recyclerView.setNestedScrollingEnabled(false);
         recyclerView.setNestedScrollingEnabled(false);
@@ -235,7 +251,6 @@ public class ActSearchAppOrTask extends BaseContainerActivity {
             DDProviderHelper.getInstance().addOrUpdateSearchRecord(searchRecord, null);
             DDProviderHelper.getInstance().addOrUpdateSearchRecord(searchRecord, null);
             recyclerView.getAdapter().notifyDataSetChanged();
             recyclerView.getAdapter().notifyDataSetChanged();
         }
         }
-        if (fragment instanceof ISearch)
-            ((ISearch) fragment).toSearch(inputText);
+        fgtSearchAppOrTask.toSearch(inputText);
     }
     }
 }
 }

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

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

+ 20 - 19
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGameCenter.java

@@ -35,7 +35,7 @@ public class FgtGameCenter extends BaseFragment {
     public void onViewCreated() {
     public void onViewCreated() {
         activity = getActivity();
         activity = getActivity();
         TitleBarUtils.getInstance().setTitleListen(activity, -2, null);
         TitleBarUtils.getInstance().setTitleListen(activity, -2, null);
-        if(activity instanceof ActGameCenter){
+        if (activity instanceof ActGameCenter) {
             fgt_game_center_top.setVisibility(View.GONE);
             fgt_game_center_top.setVisibility(View.GONE);
         }
         }
     }
     }
@@ -47,23 +47,23 @@ public class FgtGameCenter extends BaseFragment {
     protected void initViewOnVisibleToUser() {
     protected void initViewOnVisibleToUser() {
         final TitleBarUtils titleBarUtils = TitleBarUtils.getInstance();
         final TitleBarUtils titleBarUtils = TitleBarUtils.getInstance();
         titleBarUtils.addTabs(this, act_game_center_vp, "玩转游戏", new FgtPlayGame(), "福利中心", new FgtWelfareCenter(),
         titleBarUtils.addTabs(this, act_game_center_vp, "玩转游戏", new FgtPlayGame(), "福利中心", new FgtWelfareCenter(),
-                        new ViewPager.OnPageChangeListener() {
-                            @Override
-                            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+                new ViewPager.OnPageChangeListener() {
+                    @Override
+                    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
 
 
-                            }
+                    }
 
 
-                            @Override
-                            public void onPageSelected(int position) {
-                                FgtGameCenter.this.onPageSelected(titleBarUtils, position);
+                    @Override
+                    public void onPageSelected(int position) {
+                        FgtGameCenter.this.onPageSelected(titleBarUtils, position);
 
 
-                            }
+                    }
 
 
-                            @Override
-                            public void onPageScrollStateChanged(int state) {
+                    @Override
+                    public void onPageScrollStateChanged(int state) {
 
 
-                            }
-                        });
+                    }
+                });
         onPageSelected(titleBarUtils, 0);
         onPageSelected(titleBarUtils, 0);
 
 
     }
     }
@@ -71,12 +71,13 @@ public class FgtGameCenter extends BaseFragment {
     private void onPageSelected(TitleBarUtils titleBarUtils, int position) {
     private void onPageSelected(TitleBarUtils titleBarUtils, int position) {
         switch (position) {
         switch (position) {
             case 0:
             case 0:
-                titleBarUtils.setRightSecondBtn(mView, R.mipmap.search_black_img, new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        Jump2View.getInstance().goAppSearch(activity, null);
-                    }
-                })
+                titleBarUtils
+                        .setRightSecondBtn(mView, R.mipmap.search_black_img, new View.OnClickListener() {
+                            @Override
+                            public void onClick(View view) {
+                                Jump2View.getInstance().goAppSearch(activity, null);
+                            }
+                        })
                         .setRightImgBotton(mView, R.drawable.index_download, new View.OnClickListener() {
                         .setRightImgBotton(mView, R.drawable.index_download, new View.OnClickListener() {
                             @Override
                             @Override
                             public void onClick(View view) {
                             public void onClick(View view) {

+ 0 - 3
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtHomeTaskReleaseList.java

@@ -49,8 +49,6 @@ import butterknife.BindView;
  * 主页发布的任务列表或者即将开始的任务列表
  * 主页发布的任务列表或者即将开始的任务列表
  */
  */
 public class FgtHomeTaskReleaseList extends BaseFragment implements TryMakeMoneyContract.View {
 public class FgtHomeTaskReleaseList extends BaseFragment implements TryMakeMoneyContract.View {
-    @BindView(R.id.title)
-    protected View title;
     @BindView(R.id.view_list)
     @BindView(R.id.view_list)
     RecyclerView view_list;
     RecyclerView view_list;
     @BindView(R.id.empty_view)
     @BindView(R.id.empty_view)
@@ -160,7 +158,6 @@ public class FgtHomeTaskReleaseList extends BaseFragment implements TryMakeMoney
     private boolean isGameTask = false;
     private boolean isGameTask = false;
 
 
     public void initView() {
     public void initView() {
-        title.setVisibility(View.GONE);
         if (activity == null) {
         if (activity == null) {
             return;
             return;
         }
         }

+ 4 - 8
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMainAudit.java

@@ -35,10 +35,6 @@ import rx.functions.Action1;
  */
  */
 
 
 public class FgtMainAudit extends BaseFragment {
 public class FgtMainAudit extends BaseFragment {
-    @BindView(R.id.img_baseactivity_title)
-    ImageView imgBaseactivityTitle;
-    @BindView(R.id.txt_baseactivity_title)
-    TextView txtBaseactivityTitle;
     @BindView(R.id.number_tv)
     @BindView(R.id.number_tv)
     TextView numberTv;
     TextView numberTv;
     @BindView(R.id.audit_total_complete_tv)
     @BindView(R.id.audit_total_complete_tv)
@@ -92,12 +88,12 @@ public class FgtMainAudit extends BaseFragment {
         EventBus.getDefault().register(this);
         EventBus.getDefault().register(this);
         if(activity instanceof ActMain){
         if(activity instanceof ActMain){
             TitleBarUtils.getInstance()
             TitleBarUtils.getInstance()
-                    .setTitle(mView, "审核中心")
-                    .setTitleListen(mView, 0, null);
+                    .setTitle(getActivity(), "审核中心")
+                    .setTitleListen(getActivity(), 0, null);
         } else {
         } else {
             TitleBarUtils.getInstance()
             TitleBarUtils.getInstance()
-                    .setTitle(mView, "审核中心")
-                    .setTitleFinish(mView, activity);
+                    .setTitle(getActivity(), "审核中心")
+                    .setTitleFinish(getActivity());
         }
         }
 
 
         my_money_dingxiang_amount_iv.setOnClickListener(new View.OnClickListener() {
         my_money_dingxiang_amount_iv.setOnClickListener(new View.OnClickListener() {

+ 1 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/utils/TitleBarUtils.java

@@ -13,6 +13,7 @@ import android.support.v7.app.AppCompatActivity;
 import android.support.v7.widget.AppCompatAutoCompleteTextView;
 import android.support.v7.widget.AppCompatAutoCompleteTextView;
 import android.text.Editable;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.text.TextWatcher;
+import android.util.Log;
 import android.view.View;
 import android.view.View;
 import android.widget.Button;
 import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.ImageButton;

+ 36 - 44
app/src/main/res/layout/act_audit_layout.xml

@@ -5,65 +5,57 @@
     android:layout_height="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
     android:orientation="vertical">
 
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_marginTop="24dp" />
-
-    <android.support.constraint.ConstraintLayout
+    <LinearLayout
         android:id="@+id/root_1"
         android:id="@+id/root_1"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
         android:background="@mipmap/audit_top_bg"
         android:background="@mipmap/audit_top_bg"
-        android:paddingBottom="@dimen/content_padding_15"
-        android:paddingTop="5dp">
-
-
-        <ImageView
-            android:id="@+id/img_baseactivity_title"
-            android:layout_width="wrap_content"
-            android:layout_height="?attr/actionBarSize"
-            android:gravity="center_vertical"
-            android:paddingEnd="@dimen/content_padding_20"
-            android:paddingStart="@dimen/content_padding_20"
-            android:scaleType="centerInside"
-            android:src="@drawable/narrow_back_white"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
+        android:orientation="vertical">
 
 
-        <TextView
-            android:id="@+id/txt_baseactivity_title"
-            android:layout_width="wrap_content"
-            android:layout_height="?attr/actionBarSize"
-            android:layout_centerInParent="true"
-            android:gravity="center"
-            android:text="@string/app_name"
-            android:textColor="@color/white"
-            android:textSize="@dimen/text_size_5"
-            app:layout_constraintBottom_toBottomOf="@+id/img_baseactivity_title"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="@+id/img_baseactivity_title" />
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:fitsSystemWindows="true"
+            android:gravity="center_horizontal"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:id="@+id/img_baseactivity_title"
+                android:layout_width="wrap_content"
+                android:layout_height="?attr/actionBarSize"
+                android:gravity="center_vertical"
+                android:paddingEnd="@dimen/content_padding_20"
+                android:paddingStart="@dimen/content_padding_20"
+                android:scaleType="centerInside"
+                android:src="@drawable/narrow_back_white" />
+
+            <TextView
+                android:id="@+id/txt_baseactivity_title"
+                android:layout_width="wrap_content"
+                android:layout_height="?attr/actionBarSize"
+                android:layout_weight="1"
+                android:layout_marginRight="?attr/actionBarSize"
+                android:gravity="center"
+                android:text="@string/app_name"
+                android:textColor="@color/white"
+                android:textSize="@dimen/text_size_5" />
+
+        </LinearLayout>
 
 
         <TextView
         <TextView
             android:id="@+id/number_tv"
             android:id="@+id/number_tv"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:gravity="center"
             android:gravity="center"
-            android:text=""
+            android:text="111"
             android:textColor="@color/white"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_size_3"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/txt_baseactivity_title" />
+            android:textSize="@dimen/text_size_3" />
 
 
         <LinearLayout
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_below="@+id/number_tv"
             android:layout_below="@+id/number_tv"
-            android:layout_marginTop="@dimen/content_padding_15"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/number_tv">
+            android:layout_marginTop="@dimen/content_padding_15">
 
 
             <TextView
             <TextView
                 android:id="@+id/audit_total_complete_tv"
                 android:id="@+id/audit_total_complete_tv"
@@ -123,7 +115,7 @@
                     android:src="@mipmap/question_mark" />
                     android:src="@mipmap/question_mark" />
             </LinearLayout>
             </LinearLayout>
         </LinearLayout>
         </LinearLayout>
-    </android.support.constraint.ConstraintLayout>
+    </LinearLayout>
 
 
     <android.support.design.widget.TabLayout
     <android.support.design.widget.TabLayout
         android:id="@+id/indicator"
         android:id="@+id/indicator"

+ 2 - 8
app/src/main/res/layout/act_search_app.xml

@@ -5,21 +5,15 @@
     android:background="@color/white"
     android:background="@color/white"
     android:orientation="vertical">
     android:orientation="vertical">
 
 
-    <include
-        android:id="@+id/include_title"
-        layout="@layout/title_search" />
-
     <ListView
     <ListView
         android:id="@+id/search_app_list"
         android:id="@+id/search_app_list"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_height="match_parent"
         android:dividerHeight="0dp"
         android:dividerHeight="0dp"
-        android:divider="@color/transparent"
-        android:layout_below="@+id/include_title" />
+        android:divider="@color/transparent" />
 
 
     <FrameLayout
     <FrameLayout
         android:id="@+id/frame_container"
         android:id="@+id/frame_container"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_below="@+id/include_title" />
+        android:layout_height="match_parent" />
 </RelativeLayout>
 </RelativeLayout>

+ 2 - 4
app/src/main/res/layout/act_search_app_or_task.xml

@@ -9,12 +9,10 @@
     <android.support.v7.widget.RecyclerView
     <android.support.v7.widget.RecyclerView
         android:id="@+id/search_app_list"
         android:id="@+id/search_app_list"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_below="@+id/include_title" />
+        android:layout_height="match_parent" />
 
 
     <FrameLayout
     <FrameLayout
         android:id="@+id/frame_container"
         android:id="@+id/frame_container"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_below="@+id/include_title" />
+        android:layout_height="match_parent" />
 </RelativeLayout>
 </RelativeLayout>

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

@@ -7,8 +7,6 @@
     android:fitsSystemWindows="true"
     android:fitsSystemWindows="true"
     android:orientation="vertical">
     android:orientation="vertical">
 
 
-    <include layout="@layout/title" />
-
     <ListView
     <ListView
         android:id="@+id/download_mgr_listview"
         android:id="@+id/download_mgr_listview"
         android:layout_width="match_parent"
         android:layout_width="match_parent"

+ 0 - 4
app/src/main/res/layout/net_empty_rv.xml

@@ -5,10 +5,6 @@
     android:background="@color/white">
     android:background="@color/white">
 
 
     <include
     <include
-        android:id="@+id/title"
-        layout="@layout/title" />
-
-    <include
         android:id="@+id/check_net_ll"
         android:id="@+id/check_net_ll"
         layout="@layout/check_net_view"
         layout="@layout/check_net_view"
         android:layout_width="match_parent"
         android:layout_width="match_parent"