/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Crashlytics.start(this);
    Resize.setup(this, false);

    context = this;

    RelativeLayout bgLayout = new RelativeLayout(this);
    bgLayout.setLayoutParams(
        new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    bgLayout.setBackgroundResource(R.drawable.splash_bg);

    RelativeLayout.LayoutParams params =
        new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
    params.addRule(RelativeLayout.CENTER_IN_PARENT);

    splashImageView = new ImageView(this);
    splashImageView.setLayoutParams(params);
    splashImageView.setBackgroundResource(R.drawable.splash_logo);
    bgLayout.addView(splashImageView);

    setContentView(bgLayout);

    Handler h = new Handler();
    h.postDelayed(this, 2000);
  }
  @Override
  public void onCreate() {
    super.onCreate();

    applicationContext = this;

    Crashlytics.start(this);
    initImageLoader(getApplicationContext());
    dataSource = new DailyNewsDataSource(getApplicationContext());
    dataSource.open();
  }
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   Crashlytics.start(this);
   setContentView(R.layout.activity_signin);
 }
示例#4
0
 public static void start(Context context) {
   Crashlytics.start(context);
 }
 @Override
 public void pluginInitialize() {
   super.pluginInitialize();
   Crashlytics.start(cordova.getActivity());
 }