EndpointPickerDialog.java 2.33 KB
package com.bitstrips.imoji.ui.views;

import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import com.bitstrips.imoji.ImojiApplication;
import com.bitstrips.imoji.behaviour.BehaviourHelper;
import javax.inject.Inject;

public class EndpointPickerDialog
  extends DialogPreference
{
  @Inject
  BehaviourHelper a;
  private EditText b;
  
  public EndpointPickerDialog(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    ((ImojiApplication)paramContext.getApplicationContext()).inject(this);
  }
  
  protected void onBindDialogView(View paramView)
  {
    super.onBindDialogView(paramView);
    final String str1 = paramView.getResources().getString(2131231308);
    final String str2 = paramView.getResources().getString(2131231323);
    final String str3 = paramView.getResources().getString(2131231200);
    String str4 = this.a.getEndpoint();
    this.b = ((EditText)paramView.findViewById(2131689684));
    this.b.setText(str4);
    paramView.findViewById(2131689685).setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        EndpointPickerDialog.a(EndpointPickerDialog.this).setText(str1);
      }
    });
    paramView.findViewById(2131689686).setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        EndpointPickerDialog.a(EndpointPickerDialog.this).setText(str2);
      }
    });
    paramView.findViewById(2131689687).setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        EndpointPickerDialog.a(EndpointPickerDialog.this).setText(str3);
      }
    });
  }
  
  public void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    super.onClick(paramDialogInterface, paramInt);
    if (paramInt == -1) {
      this.a.setEndpoint(this.b.getText().toString());
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/views/EndpointPickerDialog.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */