Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3adc981e authored by Vincent Breitmoser's avatar Vincent Breitmoser
Browse files

extract method for making links clickable

parent 9f51ab62
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ public class ApgDeprecationWarningDialog extends DialogFragment {
        LayoutInflater inflater = LayoutInflater.from(context);
        View contentView = inflater.inflate(R.layout.dialog_apg_deprecated, null, false);

        ((TextView) contentView.findViewById(R.id.apg_learn_more)).setMovementMethod(LinkMovementMethod.getInstance());
        TextView textViewLearnMore = (TextView) contentView.findViewById(R.id.apg_learn_more);
        makeTextViewLinksClickable(textViewLearnMore);

        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setIcon(R.drawable.ic_apg_small);
@@ -49,4 +50,8 @@ public class ApgDeprecationWarningDialog extends DialogFragment {

        return builder.create();
    }

    private void makeTextViewLinksClickable(TextView textView) {
        textView.setMovementMethod(LinkMovementMethod.getInstance());
    }
}