package com.tealium.library;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

final class Q extends C
  implements View.OnClickListener
{
  private final Pattern a = Pattern.compile("^[a-zA-Z0-9]*$");
  private EditText b;

  Q(Context paramContext)
  {
    super(paramContext);
  }

  protected final View a()
  {
    TextView localTextView = new TextView(getContext());
    localTextView.setGravity(17);
    localTextView.setText("Enter AudienceStream Trace ID");
    localTextView.setTextSize(16.0F);
    this.b = new EditText(getContext());
    this.b.setInputType(2);
    Button localButton = new Button(getContext());
    localButton.setText("Join Trace");
    localButton.setTextSize(14.0F);
    localButton.setOnClickListener(this);
    int i = S.a(this, 8.0F);
    LinearLayout localLinearLayout = new LinearLayout(getContext());
    localLinearLayout.setPadding(i, i, i, i);
    localLinearLayout.setBackgroundColor(-1);
    localLinearLayout.setOrientation(1);
    localLinearLayout.addView(localTextView);
    localLinearLayout.addView(this.b);
    localLinearLayout.addView(localButton);
    return localLinearLayout;
  }

  public final void onClick(View paramView)
  {
    if (this.b == null)
    {
      b();
      return;
    }
    String str;
    try
    {
      str = this.b.getText().toString();
      if ((str == null) || (str.length() != 5))
      {
        Toast.makeText(getContext(), "Invalid Trace Id", 0).show();
        return;
      }
    }
    catch (Throwable localThrowable)
    {
      X.a(localThrowable);
      return;
    }
    if (!this.a.matcher(str).matches())
    {
      Toast.makeText(getContext(), String.format(Locale.ROOT, "\"%s\" is not a valid Trace Id", new Object[] { str }), 0).show();
      return;
    }
    d.a(str);
    b();
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.tealium.library.Q
 * JD-Core Version:    0.6.2
 */