SettingsFragment.java 4.12 KB
package com.bitstrips.imoji.ui;

import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.support.v4.app.FragmentActivity;
import android.support.v4.preference.PreferenceFragment;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;
import com.bitstrips.imoji.ImojiApplication;
import com.bitstrips.imoji.abv3.model.AvatarStylePreviouslySaved;
import com.bitstrips.imoji.analytics.LegacyAnalyticsService;
import com.bitstrips.imoji.api.BitmojiApi;
import com.bitstrips.imoji.api.DeleteUserAccountResponse;
import com.bitstrips.imoji.behaviour.BehaviourHelper;
import com.bitstrips.imoji.identity.AvatarManager;
import com.bitstrips.imoji.util.PreferenceUtils;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import retrofit.Callback;
import retrofit.RetrofitError;

public class SettingsFragment
  extends PreferenceFragment
{
  @Inject
  PreferenceUtils a;
  @Inject
  LegacyAnalyticsService b;
  @Inject
  IntentCreatorService c;
  @Inject
  @Named("avatarId")
  Provider<String> d;
  @Inject
  BitmojiApi e;
  @Inject
  BehaviourHelper f;
  @Inject
  AvatarManager g;
  
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    ((ImojiApplication)getContext().getApplicationContext()).inject(this);
    getPreferenceManager().setSharedPreferencesName(getString(2131231305));
    addPreferencesFromResource(2131099657);
    getPreferenceScreen().findPreference(getString(2131231276)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
    {
      public final boolean onPreferenceClick(Preference paramAnonymousPreference)
      {
        ((BitmojiBaseActivity)SettingsFragment.this.getActivity()).logout();
        return true;
      }
    });
    getPreferenceScreen().findPreference(getString(2131231316)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
    {
      public final boolean onPreferenceClick(Preference paramAnonymousPreference)
      {
        new BitmojiAlertDialog(SettingsFragment.this.getContext()).withTitle(SettingsFragment.this.getString(2131231020)).withMessage(SettingsFragment.this.getString(2131231019)).withOnPositiveClick(new Runnable()
        {
          public final void run()
          {
            SettingsFragment.b(SettingsFragment.this);
          }
        }).withOnNegativeClick(null).show();
        return true;
      }
    });
    getPreferenceScreen().findPreference(getString(2131231187)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
    {
      public final boolean onPreferenceClick(Preference paramAnonymousPreference)
      {
        SettingsFragment.c(SettingsFragment.this);
        return true;
      }
    });
  }
  
  public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
  {
    paramLayoutInflater = paramLayoutInflater.inflate(2130903200, paramViewGroup, false);
    ((Toolbar)paramLayoutInflater.findViewById(2131689931)).setNavigationOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        SettingsFragment.this.getActivity().onBackPressed();
      }
    });
    ((TextView)paramLayoutInflater.findViewById(2131689932)).setText("v10.29.98");
    ((TextView)paramLayoutInflater.findViewById(2131689934)).setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        SettingsFragment.a(SettingsFragment.this);
      }
    });
    return paramLayoutInflater;
  }
}


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