Java Code Examples for android.support.v4.app.SupportActivity

The following are top voted examples for showing how to use android.support.v4.app.SupportActivity. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: CompositeAndroid   File: ActivityPlugin.java   View source code 5 votes vote down vote up
<T extends SupportActivity.ExtraData> T getExtraData(final CallFun1<T, Class<T>> superCall,
        final Class<T> extraDataClass) {
    synchronized (mSuperListeners) {
        mSuperListeners.push(superCall);
        return getExtraData(extraDataClass);
    }
}
 
Example 2
Project: CompositeAndroid   File: ActivityPlugin.java   View source code 5 votes vote down vote up
void putExtraData(final CallVoid1<SupportActivity.ExtraData> superCall,
        final SupportActivity.ExtraData extraData) {
    synchronized (mSuperListeners) {
        mSuperListeners.push(superCall);
        putExtraData(extraData);
    }
}
 
Example 3
Project: mobile-client   File: TwitterSearchFragment.java   View source code 5 votes vote down vote up
@Override
public void onAttach(SupportActivity activity) {
	super.onAttach(activity);

	setRetainInstance(true);

	if (mState == null) {
		mState = new State();
	}

	mState.mReceiver.setReceiver(this);
}
 
Example 4
Project: mobile-client   File: UIUtils.java   View source code 5 votes vote down vote up
/**
 * Set title and color of action bar.
 * 
 * @param activity
 * @param title
 * @param color
 */
public static void setActionBarData(SupportActivity activity, String title,
		int color) {
	if (activity != null) {
		final ActivityHelper activityHelper = ((BaseActivity) activity)
				.getActivityHelper();
		activity.setTitle(title);
		if (color != -1) {
			activityHelper.setActionBarColor(color);
		}
	}
}
 
Example 5
Project: CompositeAndroid   File: CompositeActivity.java   View source code 4 votes vote down vote up
@Override
public <T extends SupportActivity.ExtraData> T getExtraData(final Class<T> extraDataClass) {
    return delegate.getExtraData(extraDataClass);
}
 
Example 6
Project: CompositeAndroid   File: CompositeActivity.java   View source code 4 votes vote down vote up
@Override
public void putExtraData(final SupportActivity.ExtraData extraData) {
    delegate.putExtraData(extraData);
}
 
Example 7
Project: CompositeAndroid   File: CompositeActivity.java   View source code 4 votes vote down vote up
@Override
public <T extends SupportActivity.ExtraData> T super_getExtraData(
        final Class<T> extraDataClass) {
    return super.getExtraData(extraDataClass);
}
 
Example 8
Project: CompositeAndroid   File: CompositeActivity.java   View source code 4 votes vote down vote up
@Override
public void super_putExtraData(final SupportActivity.ExtraData extraData) {
    super.putExtraData(extraData);
}
 
Example 9
Project: CompositeAndroid   File: ActivityPlugin.java   View source code 4 votes vote down vote up
public <T extends SupportActivity.ExtraData> T getExtraData(final Class<T> extraDataClass) {
    verifyMethodCalledFromDelegate("getExtraData(Class<T>)");
    return ((CallFun1<T, Class<T>>) mSuperListeners.pop()).call(extraDataClass);
}
 
Example 10
Project: CompositeAndroid   File: ActivityPlugin.java   View source code 4 votes vote down vote up
public void putExtraData(final SupportActivity.ExtraData extraData) {
    verifyMethodCalledFromDelegate("putExtraData(SupportActivity.ExtraData)");
    ((CallVoid1<SupportActivity.ExtraData>) mSuperListeners.pop()).call(extraData);
}
 
Example 11
Project: mobile-client   File: ActivityHelper.java   View source code 4 votes vote down vote up
public static ActivityHelper createInstance(SupportActivity activity) {
	return new ActivityHelper(activity);
}
 
Example 12
Project: mobile-client   File: ActivityHelper.java   View source code 4 votes vote down vote up
protected ActivityHelper(SupportActivity activity) {
	mActivity = activity;
}
 
Example 13
Project: CompositeAndroid   File: ICompositeActivity.java   View source code votes vote down vote up
<T extends SupportActivity.ExtraData> T getExtraData(final Class<T> extraDataClass); 
Example 14
Project: CompositeAndroid   File: ICompositeActivity.java   View source code votes vote down vote up
void putExtraData(final SupportActivity.ExtraData extraData); 
Example 15
Project: CompositeAndroid   File: ICompositeActivity.java   View source code votes vote down vote up
<T extends SupportActivity.ExtraData> T super_getExtraData(final Class<T> extraDataClass); 
Example 16
Project: CompositeAndroid   File: ICompositeActivity.java   View source code votes vote down vote up
void super_putExtraData(final SupportActivity.ExtraData extraData);