柬埔寨通 v6.1.5版本的 MD5 值为:9b68581ac30883219d6a25858a099d6b

以下内容为反编译后的 NavibarView.java 源代码,内容仅作参考


package net.duohuo.magappx.common.view;

import android.app.Activity;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.os.Build;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
import androidx.core.internal.view.SupportMenu;
import anetwork.channel.util.RequestConstant;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.jianpuzhaitong.forum.R;
import com.zxing.activity.CaptureActivity;
import net.duohuo.core.build.UrlSchemeProxy;
import net.duohuo.core.eventbus.EventBus;
import net.duohuo.core.fresco.FrescoImageView;
import net.duohuo.core.ioc.Ioc;
import net.duohuo.core.util.IUtil;
import net.duohuo.core.util.SafeJsonUtil;
import net.duohuo.magappx.API;
import net.duohuo.magappx.NotificationClickReceiver;
import net.duohuo.magappx.SiteConfig;
import net.duohuo.magappx.UrlScheme;
import net.duohuo.magappx.circle.show.story.model.RoleModel;
import net.duohuo.magappx.common.iconbadge.manager.IconBadgeNumManager;
import net.duohuo.magappx.common.model.TabConfig;
import net.duohuo.magappx.common.util.IntentUtils;
import net.duohuo.magappx.common.util.ShapeUtil;
import net.duohuo.magappx.common.view.ActionSheet;
import net.duohuo.magappx.findpeople.PeopleFilterActivity;
import net.duohuo.magappx.main.IndexTabActivity;
import net.duohuo.magappx.main.login.UserApi;
import net.duohuo.magappx.membermakefriends.ScreenActivity;
import net.duohuo.magappx.more.view.ShortPopupView;
import net.duohuo.magappx.remote.helper.NavibarHelper;
import net.lucode.hackware.magicindicator.MagicIndicator;
import org.apache.commons.lang3.CharUtils;

public class NavibarView extends LinearLayout implements ScrollToTopHelper {
    public static OnClickListenerCallback clickListenerCallback;

    @BindView(R.id.slide_bar_user_head)
    FrescoImageView headV;

    @BindView(R.id.left_box)
    RelativeLayout leftBoxV;

    @BindView(R.id.left_logo)
    ImageView leftlogoV;

    @BindView(R.id.navibar_magicIndicator)
    MagicIndicator magicIndicator;

    @BindView(R.id.middle_box)
    RelativeLayout middleBoxV;

    @BindView(R.id.middle_logo)
    ImageView middleLogoV;
    View.OnLongClickListener naviActionLongClick;

    @BindView(R.id.navi_title_text)
    TextView naviTitleV;
    OnShortPopupListener onShortPopupListener;
    private boolean openContentText;

    @BindView(R.id.right_box)
    LinearLayout rightBoxV;
    private View.OnClickListener rightImgListener;
    ScollerTopCallback scollerTopCallback;

    @BindView(R.id.search)
    View searchV;
    IconBadgeNumManager setIconBadgeNumManager;

    public interface OnClickListenerCallback {
        void onClick(String str);
    }

    public interface OnShortPopupListener {
        void onShortPopupListener();
    }

    public void showPost() {
        UserApi.afterLogin((Activity) getContext(), new UserApi.LoginCallBack() {
            @Override
            public void onLogin() {
                SiteConfig siteConfig = (SiteConfig) Ioc.get(SiteConfig.class);
                if (siteConfig == null) {
                    return;
                }
                if (TextUtils.isEmpty(siteConfig.jump_to_circle)) {
                    UrlScheme.toUrl(NavibarView.this.getContext(), UrlScheme.appcode + "://groupTree?type=1");
                    return;
                }
                try {
                    JSONObject parseObject = JSON.parseObject(siteConfig.jump_to_circle);
                    NavibarView.this.setAction(parseObject.getString("id"), parseObject.getString("name"));
                } catch (Exception e) {
                    e.getMessage();
                }
            }
        });
    }

    public void setAction(final String str, final String str2) {
        final Context context = getContext();
        ActionSheet actionSheet = new ActionSheet(context);
        View inflate = LayoutInflater.from(context).inflate(R.layout.action_sheet_item_select_pic, (ViewGroup) null);
        if ("1".equals(((SiteConfig) Ioc.get(SiteConfig.class)).global_is_open_senior_shoot) && TabConfig.getInstance().isQiniu_video()) {
            ((TextView) inflate.findViewById(R.id.name)).setText(R.string.post_shooting_advanced);
            ((TextView) inflate.findViewById(R.id.des)).setText(R.string.post_shooting_advanced_des);
        } else {
            ((TextView) inflate.findViewById(R.id.name)).setText(R.string.post_shooting);
            ((TextView) inflate.findViewById(R.id.des)).setVisibility(8);
        }
        View inflate2 = LayoutInflater.from(context).inflate(R.layout.action_sheet_item_select_pic, (ViewGroup) null);
        ((TextView) inflate2.findViewById(R.id.name)).setText(R.string.post_album);
        ((TextView) inflate2.findViewById(R.id.des)).setVisibility(8);
        View inflate3 = LayoutInflater.from(context).inflate(R.layout.action_sheet_item_select_pic, (ViewGroup) null);
        ((TextView) inflate3.findViewById(R.id.name)).setText(R.string.post_text);
        ((TextView) inflate3.findViewById(R.id.des)).setText(R.string.post_text_des);
        inflate.setOnClickListener(actionSheet);
        inflate.setTag("0");
        inflate2.setTag("1");
        inflate3.setTag("2");
        inflate2.setOnClickListener(actionSheet);
        actionSheet.addItemView(inflate);
        actionSheet.addItemView(inflate2);
        actionSheet.addItemView(inflate3);
        inflate3.setOnClickListener(actionSheet);
        actionSheet.show((Activity) context);
        actionSheet.setOnActionClickListener(new ActionSheet.OnActionClickListener<Integer>() {
            @Override
            public void onAction(Integer num) {
                int intValue = num.intValue();
                if (intValue == 0) {
                    UrlSchemeProxy.showPost(context).addVideoFromCamera(true).circle_id(str).circleTitle(str2).goForResult(4099);
                } else if (intValue == 1) {
                    UrlSchemeProxy.showPost(context).addPicFromPick(true).circle_id(str).circleTitle(str2).goForResult(4102);
                } else {
                    if (intValue != 2) {
                        return;
                    }
                    UrlSchemeProxy.showPost(context).circle_id(str).circleTitle(str2).go();
                }
            }
        });
    }

    public void forumPost() {
        UserApi.afterLogin((Activity) getContext(), new UserApi.LoginCallBack() {
            @Override
            public void onLogin() {
                JSONObject parseJSONObject = SafeJsonUtil.parseJSONObject(((SiteConfig) Ioc.get(SiteConfig.class)).jump_to_forum);
                if (parseJSONObject == null || parseJSONObject.isEmpty()) {
                    UrlScheme.toUrl(NavibarView.this.getContext(), UrlScheme.appcode + "://groupTree?type=1");
                    return;
                }
                try {
                    UrlSchemeProxy.threadPost(NavibarView.this.getContext()).circleId(parseJSONObject.getString("id")).fid(parseJSONObject.getString("fid")).name(parseJSONObject.getString("name")).go();
                } catch (Exception e) {
                    e.getMessage();
                }
            }
        });
    }

    public NavibarView(Context context) {
        this(context, null);
    }

    public NavibarView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.rightImgListener = new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SiteConfig siteConfig = (SiteConfig) Ioc.get(SiteConfig.class);
                TabConfig.TabBean.NaviActionsBean naviActionsBean = (TabConfig.TabBean.NaviActionsBean) view.getTag();
                if (naviActionsBean.getType() == null) {
                    return;
                }
                String type = naviActionsBean.getType();
                type.hashCode();
                char c = 65535;
                switch (type.hashCode()) {
                    case -2092154081:
                        if (type.equals("seek_filter")) {
                            c = 0;
                            break;
                        }
                        break;
                    case -1394956688:
                        if (type.equals(API.Event.MEET_FILTER)) {
                            c = 1;
                            break;
                        }
                        break;
                    case -1367751899:
                        if (type.equals("camera")) {
                            c = 2;
                            break;
                        }
                        break;
                    case -1194134789:
                        if (type.equals("seek_nearby_style_switch")) {
                            c = 3;
                            break;
                        }
                        break;
                    case -906336856:
                        if (type.equals("search")) {
                            c = 4;
                            break;
                        }
                        break;
                    case -841101058:
                        if (type.equals("forum_post")) {
                            c = 5;
                            break;
                        }
                        break;
                    case -840979460:
                        if (type.equals("forum_tree")) {
                            c = 6;
                            break;
                        }
                        break;
                    case 108417:
                        if (type.equals("msg")) {
                            c = 7;
                            break;
                        }
                        break;
                    case 3198785:
                        if (type.equals("help")) {
                            c = '\b';
                            break;
                        }
                        break;
                    case 3360977:
                        if (type.equals("msg2")) {
                            c = '\t';
                            break;
                        }
                        break;
                    case 3524221:
                        if (type.equals("scan")) {
                            c = '\n';
                            break;
                        }
                        break;
                    case 3530173:
                        if (type.equals("sign")) {
                            c = 11;
                            break;
                        }
                        break;
                    case 606175198:
                        if (type.equals("customer")) {
                            c = '\f';
                            break;
                        }
                        break;
                    case 1223440372:
                        if (type.equals("weather")) {
                            c = CharUtils.CR;
                            break;
                        }
                        break;
                    case 1282255454:
                        if (type.equals("group_list")) {
                            c = 14;
                            break;
                        }
                        break;
                    case 1282380384:
                        if (type.equals("group_post")) {
                            c = 15;
                            break;
                        }
                        break;
                }
                switch (c) {
                    case 0:
                        UserApi.afterLogin((Activity) NavibarView.this.getContext(), new UserApi.LoginCallBack() {
                            @Override
                            public void onLogin() {
                                NavibarView.this.getContext().startActivity(new Intent(NavibarView.this.getContext(), (Class<?>) PeopleFilterActivity.class));
                            }
                        });
                        return;
                    case 1:
                        UserApi.afterLogin((Activity) NavibarView.this.getContext(), new UserApi.LoginCallBack() {
                            @Override
                            public void onLogin() {
                                Intent intent = new Intent();
                                intent.setClass(NavibarView.this.getContext(), ScreenActivity.class);
                                ((Activity) NavibarView.this.getContext()).startActivityForResult(intent, IntentUtils.code_meet_screen);
                            }
                        });
                        return;
                    case 2:
                        UserApi.afterLogin((Activity) NavibarView.this.getContext(), new UserApi.LoginCallBack() {
                            @Override
                            public void onLogin() {
                                try {
                                    JSONObject parseObject = JSON.parseObject(((SiteConfig) Ioc.get(SiteConfig.class)).jump_to_circle);
                                    String string = parseObject.getString("id");
                                    UrlSchemeProxy.showPost(NavibarView.this.getContext()).addVideoFromCamera(true).circle_id(string).circleTitle(parseObject.getString("name")).goForResult(4099);
                                } catch (Exception unused) {
                                }
                            }
                        });
                        return;
                    case 3:
                        UserApi.afterLogin((Activity) NavibarView.this.getContext(), new UserApi.LoginCallBack() {
                            @Override
                            public void onLogin() {
                                ((EventBus) Ioc.get(EventBus.class)).fireEvent(API.Event.FINDPEOPLE_nearby_fragment_style_type_change, new Object[0]);
                            }
                        });
                        return;
                    case 4:
                        UrlSchemeProxy.search(NavibarView.this.getContext()).url(siteConfig.seekUrl).go();
                        return;
                    case 5:
                        NavibarView.this.forumPost();
                        return;
                    case 6:
                        UrlScheme.toUrl(NavibarView.this.getContext(), UrlScheme.appcode + "://groupTree");
                        return;
                    case 7:
                        UrlScheme.toUrl(NavibarView.this.getContext(), UrlScheme.appcode + "://message?style=1");
                        return;
                    case '\b':
                        UrlScheme.toUrl(NavibarView.this.getContext(), siteConfig.helpUrl);
                        return;
                    case '\t':
                        UrlScheme.toUrl(NavibarView.this.getContext(), UrlScheme.appcode + "://message?style=2");
                        return;
                    case '\n':
                        Intent intent = new Intent(NavibarView.this.getContext(), (Class<?>) CaptureActivity.class);
                        intent.putExtra("deal", RequestConstant.TRUE);
                        NavibarView.this.getContext().startActivity(intent);
                        return;
                    case 11:
                        if (UserApi.checkLogin()) {
                            if (TextUtils.isEmpty(siteConfig.signin)) {
                                UrlScheme.toUrl(NavibarView.this.getContext(), "https://app.jpztong.com//mag/addon/v1/sign/signView");
                                return;
                            } else {
                                UrlScheme.toUrl(NavibarView.this.getContext(), siteConfig.signin);
                                return;
                            }
                        }
                        UrlSchemeProxy.login(NavibarView.this.getContext()).go();
                        return;
                    case '\f':
                        UrlScheme.toUrl(NavibarView.this.getContext(), naviActionsBean.getLink());
                        return;
                    case '\r':
                        return;
                    case 14:
                        UrlSchemeProxy.groupCateIndex(NavibarView.this.getContext()).go();
                        return;
                    case 15:
                        NavibarView.this.showPost();
                        return;
                    default:
                        UrlScheme.toUrl(NavibarView.this.getContext(), naviActionsBean.getLink());
                        return;
                }
            }
        };
        this.naviActionLongClick = new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View view) {
                TabConfig.TabBean.NaviActionsBean naviActionsBean = (TabConfig.TabBean.NaviActionsBean) view.getTag();
                if (naviActionsBean.getType() == null) {
                    return false;
                }
                String type = naviActionsBean.getType();
                type.hashCode();
                if (type.equals("group_post")) {
                    UserApi.afterLogin((Activity) NavibarView.this.getContext(), new UserApi.LoginCallBack() {
                        @Override
                        public void onLogin() {
                            SiteConfig siteConfig = (SiteConfig) Ioc.get(SiteConfig.class);
                            if (siteConfig == null) {
                                return;
                            }
                            if (TextUtils.isEmpty(siteConfig.jump_to_circle)) {
                                UrlScheme.toUrl(NavibarView.this.getContext(), UrlScheme.appcode + "://groupTree?type=1");
                                return;
                            }
                            try {
                                JSONObject parseObject = JSON.parseObject(siteConfig.jump_to_circle);
                                UrlSchemeProxy.showPost(NavibarView.this.getContext()).circle_id(parseObject.getString("id")).circleTitle(parseObject.getString("name")).go();
                            } catch (Exception unused) {
                            }
                        }
                    });
                }
                return false;
            }
        };
        this.setIconBadgeNumManager = new IconBadgeNumManager();
        if (((SiteConfig) Ioc.get(SiteConfig.class)).isFrameworkGrey()) {
            Paint paint = new Paint();
            ColorMatrix colorMatrix = new ColorMatrix();
            colorMatrix.setSaturation(0.0f);
            paint.setColorFilter(new ColorMatrixColorFilter(colorMatrix));
            setLayerType(2, paint);
        }
        setOrientation(1);
        View inflate = LayoutInflater.from(context).inflate(R.layout.navibar_layout, (ViewGroup) null, false);
        ButterKnife.bind(this, inflate);
        inflate.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (NavibarView.this.scollerTopCallback != null) {
                    NavibarView.this.scollerTopCallback.scollToTop();
                }
            }
        });
        setBackgroundColor(ContextCompat.getColor(context, R.color.white));
        if (Build.VERSION.SDK_INT >= 19) {
            View view = new View(context);
            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
            layoutParams.height = IUtil.getStatusHeight();
            if (layoutParams.height > IUtil.dip2px(context, 50.0f) || layoutParams.height < IUtil.dip2px(context, 18.0f)) {
                layoutParams.height = IUtil.dip2px(context, 24.0f);
            }
            addView(view, layoutParams);
        }
        ShapeUtil.shapeRect(this.searchV, IUtil.dip2px(getContext(), 35.0f), "#ffffff");
        ViewGroup.LayoutParams layoutParams2 = new ViewGroup.LayoutParams(-1, -2);
        layoutParams2.height = IUtil.dip2px(context, 48.0f);
        addView(inflate, layoutParams2);
    }

    public void setData(final int i) {
        final TabConfig.TabBean tabBean;
        int i2;
        int i3;
        TabConfig tabConfig = TabConfig.getInstance();
        if (tabConfig == null || tabConfig.getTabs() == null || i < 0 || i > tabConfig.getTabs().size() || (tabBean = tabConfig.getTabs().get(i)) == null) {
            return;
        }
        if ("#ffffff".equals(tabBean.getNavi_color().toLowerCase()) && Build.VERSION.SDK_INT < 23) {
            getChildAt(0).setBackgroundColor(Color.parseColor("#22000000"));
        }
        if (NavibarHelper.checkNaviCustomBg(tabBean.getNavi_color_type())) {
            NavibarHelper.setNaviBarBackground(this, i);
        } else {
            setBackgroundColor(Color.parseColor(tabBean.getNavi_color()));
        }
        int navi_left = tabBean.getNavi_left();
        if (navi_left == 0) {
            this.leftBoxV.setVisibility(8);
        } else if (navi_left == 1) {
            this.headV.setVisibility(4);
        } else if (navi_left == 2) {
            this.headV.setVisibility(8);
            this.leftlogoV.setVisibility(0);
            NavibarHelper.setImageRes(this.leftlogoV, "navi_", i, "_left_logo");
        }
        int navi_middle = tabBean.getNavi_middle();
        if (navi_middle == 0) {
            this.middleBoxV.setVisibility(8);
        } else if (navi_middle == 1) {
            this.naviTitleV.setText(tabBean.getNavi_title());
            this.naviTitleV.setTextColor(Color.parseColor(tabBean.getNavi_title_color()));
            this.naviTitleV.setVisibility(0);
        } else if (navi_middle == 2) {
            this.naviTitleV.setVisibility(8);
            this.middleLogoV.setVisibility(0);
            NavibarHelper.setImageRes(this.middleLogoV, "navi_", i, "_middle_logo");
        } else if (navi_middle == 3) {
            this.naviTitleV.setVisibility(8);
            this.middleLogoV.setVisibility(8);
            this.searchV.setVisibility(0);
            RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.middleBoxV.getLayoutParams();
            layoutParams.addRule(0, R.id.right_box);
            layoutParams.addRule(1, R.id.left_box);
            this.middleBoxV.setLayoutParams(layoutParams);
            View findViewById = findViewById(R.id.iv_search_scan);
            findViewById.setVisibility(tabBean.getNaviMiddleSearchScan() == 1 ? 0 : 8);
            findViewById.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent intent = new Intent(NavibarView.this.getContext(), (Class<?>) CaptureActivity.class);
                    intent.putExtra("deal", RequestConstant.TRUE);
                    NavibarView.this.getContext().startActivity(intent);
                }
            });
            if (tabBean.getNavi_search_type() == 2) {
                ShapeUtil.shapeRect(this.searchV, IUtil.dip2px(getContext(), 35.0f), RoleModel.Content_BOX_COLOR_LEFT);
            }
        } else if (navi_middle == 4) {
            this.naviTitleV.setVisibility(8);
            this.searchV.setVisibility(8);
            this.magicIndicator.setVisibility(0);
        }
        int size = tabBean.getNavi_actions_line() == null ? 0 : tabBean.getNavi_actions_line().size();
        String str = "navi_" + i + "_action_";
        this.rightBoxV.removeAllViews();
        if (tabBean.getNavi_actions_type_line() == 1) {
            while (i3 < size) {
                if (SafeJsonUtil.getBoolean(((SiteConfig) Ioc.get(SiteConfig.class)).global_aka)) {
                    i3 = tabBean.getNavi_actions_line().get(i3).getHoliday() != 1 ? i3 + 1 : 0;
                    String str2 = str + i3;
                    if (!tabBean.getNavi_actions_line().get(i3).getType().startsWith("msg")) {
                        ViewGroup viewGroup = (ViewGroup) LayoutInflater.from(getContext()).inflate(R.layout.navibar_layout_item_msg, (ViewGroup) null);
                        this.rightBoxV.addView(viewGroup);
                        NavibarHelper.setImageRes((ImageView) viewGroup.findViewById(R.id.icon), str2);
                        final TextView textView = (TextView) viewGroup.findViewById(R.id.msg_num);
                        textView.setText("33");
                        final View findViewById2 = viewGroup.findViewById(R.id.msg_dot);
                        viewGroup.setTag(tabBean.getNavi_actions_line().get(i3));
                        viewGroup.setOnClickListener(this.rightImgListener);
                        viewGroup.setOnLongClickListener(this.naviActionLongClick);
                        IndexTabActivity.addMsgCountSubcriber(new IndexTabActivity.MsgCountSubcriber() {
                            @Override
                            public void notify(int i4, boolean z) {
                                if (i4 > 0) {
                                    textView.setText(i4 + "");
                                    textView.setVisibility(0);
                                    findViewById2.setVisibility(8);
                                } else {
                                    textView.setText(i4 + "");
                                    textView.setVisibility(8);
                                    findViewById2.setVisibility(z ? 0 : 8);
                                }
                                NavibarView.this.sendIconNumNotification(i4);
                            }
                        });
                    } else {
                        ImageView imageView = new ImageView(getContext());
                        NavibarHelper.setImageRes(imageView, str2);
                        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-2, -2);
                        layoutParams2.height = IUtil.dip2px(getContext(), 40.0f);
                        layoutParams2.width = layoutParams2.height;
                        imageView.setLayoutParams(layoutParams2);
                        this.rightBoxV.addView(imageView);
                        imageView.setTag(tabBean.getNavi_actions_line().get(i3));
                        imageView.setOnClickListener(this.rightImgListener);
                        imageView.setOnLongClickListener(this.naviActionLongClick);
                    }
                } else {
                    if (tabBean.getNavi_actions_line().get(i3).getWeekday() != 1) {
                    }
                    String str22 = str + i3;
                    if (!tabBean.getNavi_actions_line().get(i3).getType().startsWith("msg")) {
                    }
                }
            }
        }
        if (tabBean.getNavi_actions_type_vertical() == 1) {
            boolean z = false;
            while (i2 < tabBean.getNavi_actions_vertical().size()) {
                TabConfig.TabBean.NaviActionsBean naviActionsBean = tabBean.getNavi_actions_vertical().get(i2);
                if (SafeJsonUtil.getBoolean(((SiteConfig) Ioc.get(SiteConfig.class)).global_aka)) {
                    i2 = naviActionsBean.getHoliday() != 1 ? i2 + 1 : 0;
                    z = true;
                } else {
                    if (naviActionsBean.getWeekday() != 1) {
                    }
                    z = true;
                }
            }
            if (z) {
                ImageView imageView2 = new ImageView(getContext());
                NavibarHelper.setImageRes(imageView2, "navi_", i, "_action_group");
                LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-2, -2);
                layoutParams3.height = IUtil.dip2px(getContext(), 40.0f);
                layoutParams3.width = layoutParams3.height;
                imageView2.setLayoutParams(layoutParams3);
                this.rightBoxV.addView(imageView2);
                imageView2.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        ShortPopupView shortPopupView = new ShortPopupView(NavibarView.this.getContext(), tabBean.getNavi_actions_vertical(), i);
                        shortPopupView.setOpenContentText(NavibarView.this.openContentText);
                        shortPopupView.showAtLocation(NavibarView.this, 17, 0, 0);
                    }
                });
            }
        }
    }

    public void sendIconNumNotification(int i) {
        NotificationManager notificationManager = (NotificationManager) getContext().getSystemService("notification");
        if (notificationManager == null) {
            return;
        }
        String str = null;
        if (Build.VERSION.SDK_INT >= 26) {
            NotificationChannel createNotificationChannel = createNotificationChannel();
            notificationManager.createNotificationChannel(createNotificationChannel);
            str = createNotificationChannel.getId();
        }
        try {
            notificationManager.notify(32154, this.setIconBadgeNumManager.setIconBadgeNum(Ioc.getApplication(), new NotificationCompat.Builder(getContext(), str).setSmallIcon(getContext().getApplicationInfo().icon).setContentTitle("有" + i + "条未读消息").setTicker(RemoteMessageConst.Notification.TICKER).setAutoCancel(true).setContentIntent(PendingIntent.getBroadcast(getContext(), 0, new Intent(getContext(), (Class<?>) NotificationClickReceiver.class), 67108864)).setNumber(i).build(), i));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static NotificationChannel createNotificationChannel() {
        NotificationChannel notificationChannel = new NotificationChannel(RequestConstant.ENV_TEST, "Channel1", 3);
        notificationChannel.enableLights(true);
        notificationChannel.setLightColor(SupportMenu.CATEGORY_MASK);
        notificationChannel.setShowBadge(true);
        return notificationChannel;
    }

    @OnClick({R.id.search})
    public void searchClick() {
        UrlSchemeProxy.search(getContext()).go();
    }

    public void setOnShortPopupListener(OnShortPopupListener onShortPopupListener) {
        this.onShortPopupListener = onShortPopupListener;
    }

    public void setOpenContentText(boolean z) {
        this.openContentText = z;
    }

    @Override
    public void setScollerToTopCallback(ScollerTopCallback scollerTopCallback) {
        this.scollerTopCallback = scollerTopCallback;
    }

    public static void setOnClickListenerCallback(OnClickListenerCallback onClickListenerCallback) {
        clickListenerCallback = onClickListenerCallback;
    }

    public MagicIndicator getMagicIndicator() {
        return this.magicIndicator;
    }
}