79597456

Date: 2025-04-29 01:13:30
Score: 2.5
Natty:
Report link

How about solving it with code like below?


public class CustomPreference extends Preference {
    
    ..............

    @Override
    public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
        super.onBindViewHolder(holder);

        TextView tv (TextView)holder.findViewById(android.R.id.summary);
        if(tv != null) {
            if(mSummaryTextSize > 0) tv.setTextSize(mSummaryTextSize);
        }
    }

    private int mSummaryTextSize = 0;
    public void setSummaryTextSize(int size) {
        if(mSummaryTextSize != size) {
            mSummaryTextSize = size;
            notifyChanged();
        }
    }
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): How
  • Low reputation (1):
Posted by: Alex Hong