WeChat.apk(点击下载) / TextPreference.java


package com.tencent.mm.ui.base.preference;

import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.tencent.mm.R;
import com.tencent.mm.plugin.profile.NewContactWidgetNormal;
import com.tencent.mm.ui.MMActivity;
import hz.h;
import java.util.ArrayList;
import yz3.j;

public class TextPreference extends Preference {
    public int L;
    public CharSequence M;
    public TextView N;
    public Context P;
    public a Q;

    public interface a {
    }

    public TextPreference(Context context) {
        this(context, null);
    }

    @Override // com.tencent.mm.ui.base.preference.Preference
    public void E(View view) {
        int i15;
        super.E(view);
        TextView textView = (TextView) view.findViewById(16908310);
        this.N = textView;
        if (textView != null) {
            textView.setText(this.M);
            this.N.setGravity(this.L);
        }
        a aVar = this.Q;
        if (aVar != null) {
            TextView textView2 = this.N;
            NewContactWidgetNormal.n nVar = (NewContactWidgetNormal.n) aVar;
            TextPreference textPreference = nVar.f137461a;
            String str = nVar.f137462b;
            NewContactWidgetNormal.this.f137411d.getResources().getDimension(R.dimen.f359038bl);
            TextView textView3 = textPreference.N;
            if (textView3 != null) {
                textPreference.M = str;
                textPreference.L = 17;
                textView3.setGravity(17);
            }
            MMActivity mMActivity = NewContactWidgetNormal.this.f137411d;
            ArrayList arrayList = new ArrayList();
            arrayList.add("https://www.wechat.com/tpl/oversea/new/page/difference_of_users/index");
            ((h) j.c(h.class)).mN(mMActivity, arrayList, nVar.f137462b, nVar.f137463c, textView2);
        }
        if (TextUtils.isEmpty(this.N.getText())) {
            i15 = 4;
        } else {
            i15 = 0;
        }
        view.setImportantForAccessibility(i15);
    }

    @Override // com.tencent.mm.ui.base.preference.Preference
    public View F(ViewGroup viewGroup) {
        return super.F(viewGroup);
    }

    public TextPreference(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.P = context;
        this.H = R.layout.c0d;
    }
}