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

Commit 572afa59 authored by Yiling Chuang's avatar Yiling Chuang
Browse files

Fix the unclickable learn more link.

The UsageProgressBarPreference is replaced with BatteryHeaderTextPreference, and the movement method of the textview was not added, which leads to the unclickable link.

Hence, add back the movement method of the textview to allow the linkable text.

Fixes: 382395040
Test: manual test
Flag: EXEMPT bugfix
Change-Id: I6dd5b2c2fbec891035fa8b0fefa47de6962324b7
parent aa237996
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settings.fuelgauge;

import android.content.Context;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.util.AttributeSet;
import android.widget.TextView;

@@ -44,6 +45,7 @@ public class BatteryHeaderTextPreference extends Preference implements GroupSect
    public void onBindViewHolder(PreferenceViewHolder view) {
        final TextView textView = (TextView) view.findViewById(R.id.text);
        textView.setText(mText);
        textView.setMovementMethod(LinkMovementMethod.getInstance());
        if (!TextUtils.isEmpty(mContentDescription)) {
            textView.setContentDescription(mContentDescription);
        }