KeyboardSunsetController.java 2.99 KB
package com.bitstrips.imoji.keyboard;

import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.view.View;
import android.view.View.OnClickListener;
import com.bitstrips.imoji.onboarding.gboard.GboardOnboardingUtils;
import com.bitstrips.imoji.ui.IntentCreatorService;
import com.bitstrips.imoji.ui.LoginActivity;

public class KeyboardSunsetController
{
  private final Context a;
  private final View b;
  private final IntentCreatorService c;
  private final View d;
  private final View e;
  
  public KeyboardSunsetController(Context paramContext, View paramView, IntentCreatorService paramIntentCreatorService)
  {
    this.a = paramContext;
    this.b = paramView;
    this.c = paramIntentCreatorService;
    this.d = this.b.findViewById(2131689891);
    this.e = this.b.findViewById(2131689892);
  }
  
  public void hide()
  {
    this.b.setVisibility(8);
  }
  
  public void init()
  {
    View localView = this.b.findViewById(2131689893);
    GradientDrawable localGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.TL_BR, new int[] { this.a.getResources().getColor(2131624058), this.a.getResources().getColor(2131624059) });
    this.d.setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        KeyboardSunsetController.b(KeyboardSunsetController.this).goToGooglePlayStore("com.google.android.inputmethod.latin", KeyboardSunsetController.a(KeyboardSunsetController.this));
      }
    });
    this.e.setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        paramAnonymousView = new Intent(KeyboardSunsetController.a(KeyboardSunsetController.this), LoginActivity.class);
        paramAnonymousView.addFlags(268435456);
        paramAnonymousView.putExtra("open_gboard_onboarding_from_keyboard", true);
        KeyboardSunsetController.a(KeyboardSunsetController.this).startActivity(paramAnonymousView);
      }
    });
    localView.setOnClickListener(new View.OnClickListener()
    {
      public final void onClick(View paramAnonymousView)
      {
        KeyboardSunsetController.this.hide();
      }
    });
    this.b.setBackground(localGradientDrawable);
  }
  
  public void start()
  {
    int j = 0;
    boolean bool = GboardOnboardingUtils.hasSupportedGboardVersion(this.a);
    this.b.setVisibility(0);
    View localView = this.d;
    if (bool)
    {
      i = 8;
      localView.setVisibility(i);
      localView = this.e;
      if (!bool) {
        break label61;
      }
    }
    label61:
    for (int i = j;; i = 8)
    {
      localView.setVisibility(i);
      return;
      i = 0;
      break;
    }
  }
}


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