|
|
@@ -1,11 +1,8 @@
|
|
|
package com.kfzs.duanduan.react;
|
|
|
|
|
|
-import android.app.Activity;
|
|
|
import android.support.v4.app.Fragment;
|
|
|
import android.support.v4.view.ViewPager;
|
|
|
-import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
-import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
|
import android.widget.RelativeLayout;
|
|
|
import android.widget.TextView;
|
|
|
@@ -14,8 +11,6 @@ import com.kf.utils.ToastBuilder;
|
|
|
import com.kfzs.duanduan.ActMain;
|
|
|
import com.kfzs.duanduan.KFZSApp;
|
|
|
import com.kfzs.duanduan.adp.ViewPagerFragmentAdapter;
|
|
|
-import com.kfzs.duanduan.utils.dlg.HelperUtils;
|
|
|
-import com.kfzs.duanduan.utils.dlg.ViewFindUtils;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
@@ -98,25 +93,22 @@ public class TabsHelper {
|
|
|
private void checkViewState(int position) {
|
|
|
int top;
|
|
|
int bottom;
|
|
|
- switch (position) {
|
|
|
- case 1:
|
|
|
- top = activity.getResources().getDimensionPixelSize(R.dimen.app_nav_toolbar_height);
|
|
|
- bottom = 0;
|
|
|
- layout_main_activity_toolbar.setVisibility(View.VISIBLE);
|
|
|
- if(!isGetAdvertisementDialogData) {
|
|
|
- isGetAdvertisementDialogData = true;
|
|
|
- activity.getAdvertisementDialogData();//获取广告弹窗信息
|
|
|
- }
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- top = activity.getResources().getDimensionPixelSize(R.dimen.app_nav_toolbar_height);
|
|
|
- bottom = activity.getResources().getDimensionPixelSize(R.dimen.tab_height);
|
|
|
- layout_main_activity_toolbar.setVisibility(View.VISIBLE);
|
|
|
- break;
|
|
|
- default:
|
|
|
- top = 0;
|
|
|
- bottom = 0;
|
|
|
- layout_main_activity_toolbar.setVisibility(View.GONE);
|
|
|
+ if(position == MainTab.FgtMainGame.getPosition()) {
|
|
|
+ top = activity.getResources().getDimensionPixelSize(R.dimen.app_nav_toolbar_height);
|
|
|
+ bottom = 0;
|
|
|
+ layout_main_activity_toolbar.setVisibility(View.VISIBLE);
|
|
|
+ if (!isGetAdvertisementDialogData) {
|
|
|
+ isGetAdvertisementDialogData = true;
|
|
|
+ activity.getAdvertisementDialogData();//获取广告弹窗信息
|
|
|
+ }
|
|
|
+ }else if(position == MainTab.FgtMainCategory.getPosition()) {
|
|
|
+ top = activity.getResources().getDimensionPixelSize(R.dimen.app_nav_toolbar_height);
|
|
|
+ bottom = activity.getResources().getDimensionPixelSize(R.dimen.tab_height);
|
|
|
+ layout_main_activity_toolbar.setVisibility(View.VISIBLE);
|
|
|
+ } else {
|
|
|
+ top = 0;
|
|
|
+ bottom = 0;
|
|
|
+ layout_main_activity_toolbar.setVisibility(View.GONE);
|
|
|
}
|
|
|
RelativeLayout.LayoutParams layout = (RelativeLayout.LayoutParams) other_container
|
|
|
.getLayoutParams();
|