重构专题页面相关逻辑
其他toolbar逻辑移除
This commit is contained in:
@ -15,6 +15,7 @@ import com.gh.base.BaseToolBarActivity;
|
||||
import com.gh.base.OnListClickListener;
|
||||
import com.gh.base.OnRequestCallBackListener;
|
||||
import com.gh.gamecenter.eventbus.EBMiPush;
|
||||
import com.lightgame.OnTitleClickListener;
|
||||
import com.lightgame.utils.RuntimeUtils;
|
||||
import com.lightgame.utils.Utils;
|
||||
|
||||
@ -37,7 +38,7 @@ import static com.gh.common.util.EntranceUtils.KEY_ENTRANCE;
|
||||
* Fragment 基类
|
||||
*/
|
||||
public abstract class BaseFragment<T> extends Fragment implements OnRequestCallBackListener<T>,
|
||||
View.OnClickListener, OnListClickListener {
|
||||
View.OnClickListener, OnListClickListener, OnTitleClickListener {
|
||||
|
||||
protected View mCachedView;
|
||||
|
||||
@ -186,9 +187,17 @@ public abstract class BaseFragment<T> extends Fragment implements OnRequestCallB
|
||||
// 将所有的Fragment都置为隐藏状态。
|
||||
protected void hideFragments(FragmentTransaction transaction) {
|
||||
List<Fragment> list = getChildFragmentManager().getFragments();
|
||||
if (list != null) {
|
||||
for (Fragment fragment : list) {
|
||||
transaction.hide(fragment);
|
||||
for (Fragment fragment : list) {
|
||||
transaction.hide(fragment);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTitleClick() {
|
||||
List<Fragment> list = getChildFragmentManager().getFragments();
|
||||
for (Fragment fragment : list) {
|
||||
if (fragment instanceof OnTitleClickListener) {
|
||||
((OnTitleClickListener) fragment).onTitleClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user