All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nikedlab.android.inject.InjectedActivity Maven / Gradle / Ivy

There is a newer version: 3.0.13
Show newest version
package com.nikedlab.android.inject;

import android.app.Activity;
import android.os.Bundle;

public abstract class InjectedActivity extends Activity {

	private InjectedApplication application;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        if ("Dalvik".equals(System.getProperty("java.vm.name"))) {
            InjectedApplication application = getInjectedApplication();
            application.injectInto(this);
        }
        super.onCreate(savedInstanceState);
    }

    private InjectedApplication getInjectedApplication() {
    	if (application == null) {
            application = (InjectedApplication) getApplication();
    	}
    	return application;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy