AccountsEndpointPickerDialog.java 2.04 KB
package com.bitstrips.imoji.ui.views;

import android.content.Context;
import android.content.DialogInterface;
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 com.bitstrips.imoji.monouser.models.OAuth2Constants;
import javax.inject.Inject;

public class AccountsEndpointPickerDialog
  extends DialogPreference
{
  @Inject
  BehaviourHelper a;
  private EditText b;
  
  public AccountsEndpointPickerDialog(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    ((ImojiApplication)paramContext.getApplicationContext()).inject(this);
  }
  
  protected void onBindDialogView(View paramView)
  {
    super.onBindDialogView(paramView);
    String str = this.a.getAccountsEndpoint();
    this.b = ((EditText)paramView.findViewById(2131689684));
    this.b.setText(str);
    paramView.findViewById(2131689685).setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        AccountsEndpointPickerDialog.a(AccountsEndpointPickerDialog.this).setText(OAuth2Constants.OAUTH2_ACCOUNTS_ENDPOINT);
      }
    });
    paramView.findViewById(2131689686).setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        AccountsEndpointPickerDialog.a(AccountsEndpointPickerDialog.this).setText(OAuth2Constants.OAUTH2_DEV_ACCOUNTS_ENDPOINT);
      }
    });
  }
  
  public void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    super.onClick(paramDialogInterface, paramInt);
    if (paramInt == -1) {
      this.a.setAccountsEndpoint(this.b.getText().toString());
    }
  }
}


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