h.java 3.05 KB
package com.instabug.library;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.instabug.library.util.InstabugSDKLogger;

public abstract class h
  extends Fragment
{
  private View a;
  private Activity b;
  private boolean c;
  
  public abstract void a();
  
  public abstract void a(Bundle paramBundle);
  
  public void a(String paramString)
  {
    if (this.a == null)
    {
      InstabugSDKLogger.v(this, "Calling setTitle before inflating the view! Ignoring call");
      return;
    }
    TextView localTextView = (TextView)this.a.findViewById(R.id.instabug_fragment_title);
    if (localTextView != null)
    {
      InstabugSDKLogger.v(this, "Setting fragment title to \"" + paramString + "\"");
      localTextView.setText(paramString);
      return;
    }
    InstabugSDKLogger.v(this, "instabug_fragment_title wasn't found, make sure your layout.xml contains it");
  }
  
  @LayoutRes
  public abstract int b();
  
  public abstract void b(Bundle paramBundle);
  
  public abstract String c();
  
  public boolean d()
  {
    return this.c;
  }
  
  public Activity e()
  {
    InstabugSDKLogger.v(this, "Returning preserved activity " + this.b);
    return this.b;
  }
  
  public void onAttach(Activity paramActivity)
  {
    super.onAttach(paramActivity);
    this.b = paramActivity;
  }
  
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    InstabugSDKLogger.v(this, "onCreateView called");
    if (getArguments() != null)
    {
      InstabugSDKLogger.v(this, "Arguments found, calling consumeNewInstanceSavedArguments with " + getArguments());
      a();
    }
    this.c = false;
  }
  
  public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
  {
    InstabugSDKLogger.v(this, "onCreateView called");
    this.a = paramLayoutInflater.inflate(b(), paramViewGroup, false);
    a(c());
    return this.a;
  }
  
  public void onPause()
  {
    super.onPause();
    InstabugSDKLogger.v(this, "onPause called, calling saveState");
  }
  
  public void onResume()
  {
    super.onResume();
    InstabugSDKLogger.v(this, "onResume called, calling saveState");
  }
  
  public void onSaveInstanceState(Bundle paramBundle)
  {
    super.onSaveInstanceState(paramBundle);
    InstabugSDKLogger.v(this, "onSaveInstanceState called, calling saveState");
    a(paramBundle);
  }
  
  public void onViewCreated(View paramView, Bundle paramBundle)
  {
    InstabugSDKLogger.v(this, "onViewCreated called");
    super.onViewCreated(paramView, paramBundle);
    if (paramBundle != null)
    {
      InstabugSDKLogger.v(this, "savedInstanceState found, calling restoreState");
      b(paramBundle);
      this.c = true;
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/h.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */