package com.tencent.mm.plugin.radar.ui;

import a.f.b.j;
import a.l;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.Button;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ui.widget.a.c;

@l(dWo = {1, 1, 13}, dWp = {"\u0000%\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\r\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J(\u0010\u0006\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\u000b\u001a\u00020\tH\u0016J(\u0010\f\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\r\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\tH\u0016¨\u0006\u000e"}, dWq = {"com/tencent/mm/plugin/radar/ui/RadarMemberView$showModifyDialog$1", "Landroid/text/TextWatcher;", "afterTextChanged", "", "s", "Landroid/text/Editable;", "beforeTextChanged", "", "start", "", "count", "after", "onTextChanged", "before", "plugin-radar_release"})
public final class RadarMemberView$j implements TextWatcher {
    final /* synthetic */ RadarMemberView pCy;

    RadarMemberView$j(RadarMemberView radarMemberView) {
        this.pCy = radarMemberView;
    }

    public final void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        AppMethodBeat.i(102958);
        j.p(charSequence, "s");
        AppMethodBeat.o(102958);
    }

    public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        AppMethodBeat.i(102959);
        j.p(charSequence, "s");
        AppMethodBeat.o(102959);
    }

    public final void afterTextChanged(Editable editable) {
        boolean z = false;
        AppMethodBeat.i(102960);
        j.p(editable, "s");
        int length = 50 - editable.length();
        if (length < 0) {
            length = 0;
        }
        TextView f = RadarMemberView.f(this.pCy);
        if (f != null) {
            f.setText(String.valueOf(length));
        }
        c g = RadarMemberView.g(this.pCy);
        if (g != null) {
            Button button = g.getButton(-1);
            if (button != null) {
                if (editable.length() > 0) {
                    z = true;
                }
                button.setEnabled(z);
                AppMethodBeat.o(102960);
                return;
            }
        }
        AppMethodBeat.o(102960);
    }
}
