Линт и совместимость - PullRequest
       53

Линт и совместимость

0 голосов
/ 02 февраля 2020

Я пишу проект в android studio

Теперь я проанализирую свой проект с помощью Lint

Может ли Lint обнаружить проблему совместимости ??

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cheat);
        mAsweristrue = getIntent().getBooleanExtra(Extra_Answer_Is_True, false);
        mAnswerTextView = findViewById(R.id.AnswerTextView);
        mShowAnswerButton = findViewById(R.id.ShowAnswerButton);
        mShowAnswerButton.setOnClickListener(new View.OnClickListener() {
            @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
            @Override
            public void onClick(View view) {
                if (mAsweristrue) {
                    mAnswerTextView.setText(R.string.Button_True);
                } else {
                    mAnswerTextView.setText(R.string.Button_False);
                }
                setAnswerShownResult(true);
                int cx = mShowAnswerButton.getWidth() / 2;
                int cy = mShowAnswerButton.getHeight() / 2;
                float radius = mShowAnswerButton.getWidth();
                Animator anim = ViewAnimationUtils.createCircularReveal(mShowAnswerButton, cx, cy, radius, 0);
                anim.addListener(new AnimatorListenerAdapter() {
                                     @Override
                                     public void onAnimationEnd(Animator animation) {
                                         super.onAnimationEnd(animation);
                                         mShowAnswerButton.setVisibility(View.INVISIBLE);
                                     }
                                 });
                        anim.start();
            }
        });
...