Merge "Fix the unclickable learn more link." into main

This commit is contained in:
Treehugger Robot
2024-12-07 03:39:05 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}