导航菜单

页面标题

页面副标题

bbinstant v6.24.0 - PlayStoreRatingDialogFragment.java 源代码

正在查看: bbinstant v6.24.0 应用的 PlayStoreRatingDialogFragment.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.bigbasket.bbinstant.ui.feedback;

import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.bigbasket.bbinstant.core.Constants;

public class PlayStoreRatingDialogFragment extends BaseBottomSheetDialogFragment {
    private final String TAG = PlayStoreRatingDialogFragment.class.getSimpleName();

    class a implements View.OnClickListener {
        a() {
        }

        @Override
        public void onClick(View view) {
            if (PlayStoreRatingDialogFragment.this.getActivity() != null) {
                PlayStoreRatingDialogFragment.this.dismiss();
                PlayStoreRatingDialogFragment.this.dispatchEvent(view.getId());
            }
        }
    }

    public void dispatchEvent(int i) {
        g gVar = this.onBottomSheetActionsCallback;
        if (gVar != null) {
            gVar.onBottomSheetAction(i);
        }
    }

    public void lambda$onViewCreated$0(View view) {
        if (getContext() != null) {
            dismiss();
            dispatchEvent(view.getId());
            com.bigbasket.bbinstant.core.persistance.c.get().setDefaultsBoolean(Constants.Preference.HAS_USER_ALREADY_TAPPED_RATE_NOW, true);
            String packageName = getContext().getPackageName();
            try {
                startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + packageName)));
            } catch (ActivityNotFoundException unused) {
                startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + packageName)));
            }
        }
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(2131558510, viewGroup, false);
    }

    public void onViewCreated(View view, Bundle bundle) {
        super/*androidx.fragment.app.Fragment*/.onViewCreated(view, bundle);
        TextView textView = (TextView) view.findViewById(2131362704);
        ((TextView) view.findViewById(2131362702)).setOnClickListener(new a());
        textView.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view2) {
                PlayStoreRatingDialogFragment.this.lambda$onViewCreated$0(view2);
            }
        });
    }
}