BitmojiBaseFragment.java 2.18 KB
package com.bitstrips.imoji.ui.fragments;

import android.content.Context;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bitstrips.imoji.ImojiApplication;

public abstract class BitmojiBaseFragment
  extends Fragment
{
  public String getFragmentIdentity()
  {
    return getFragmentSuperTag();
  }
  
  public abstract String getFragmentSuperTag();
  
  public abstract int getLayout();
  
  public abstract void initSubViews(View paramView);
  
  protected boolean isActivityValid()
  {
    if (getActivity() == null) {
      if ("release".equals("debug")) {
        String.format("Fragment is not attached to activity, not initializing views for %s", new Object[] { getFragmentIdentity() });
      }
    }
    do
    {
      do
      {
        return false;
        if (!getActivity().isFinishing()) {
          break;
        }
      } while (!"release".equals("debug"));
      String.format("Attached activity is finishing, not initializing views for %s", new Object[] { getFragmentIdentity() });
      return false;
      if ((Build.VERSION.SDK_INT < 17) || (!getActivity().isDestroyed())) {
        break;
      }
    } while (!"release".equals("debug"));
    String.format("Attached activity is destroyed, not initializing views for %s", new Object[] { getFragmentIdentity() });
    return false;
    return true;
  }
  
  public void onCreate(@Nullable Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    ((ImojiApplication)getContext().getApplicationContext()).inject(this);
  }
  
  public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
  {
    paramLayoutInflater = paramLayoutInflater.inflate(getLayout(), paramViewGroup, false);
    initSubViews(paramLayoutInflater);
    return paramLayoutInflater;
  }
}


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