Search in sources :

Example 76 with CallSuper

use of android.annotation.CallSuper in project android_frameworks_base by ResurrectionRemix.

the class Activity method onCreate.

/**
     * Called when the activity is starting.  This is where most initialization
     * should go: calling {@link #setContentView(int)} to inflate the
     * activity's UI, using {@link #findViewById} to programmatically interact
     * with widgets in the UI, calling
     * {@link #managedQuery(android.net.Uri , String[], String, String[], String)} to retrieve
     * cursors for data being displayed, etc.
     *
     * <p>You can call {@link #finish} from within this function, in
     * which case onDestroy() will be immediately called without any of the rest
     * of the activity lifecycle ({@link #onStart}, {@link #onResume},
     * {@link #onPause}, etc) executing.
     *
     * <p><em>Derived classes must call through to the super class's
     * implementation of this method.  If they do not, an exception will be
     * thrown.</em></p>
     *
     * @param savedInstanceState If the activity is being re-initialized after
     *     previously being shut down then this Bundle contains the data it most
     *     recently supplied in {@link #onSaveInstanceState}.  <b><i>Note: Otherwise it is null.</i></b>
     *
     * @see #onStart
     * @see #onSaveInstanceState
     * @see #onRestoreInstanceState
     * @see #onPostCreate
     */
@MainThread
@CallSuper
protected void onCreate(@Nullable Bundle savedInstanceState) {
    if (DEBUG_LIFECYCLE)
        Slog.v(TAG, "onCreate " + this + ": " + savedInstanceState);
    if (mLastNonConfigurationInstances != null) {
        mFragments.restoreLoaderNonConfig(mLastNonConfigurationInstances.loaders);
    }
    if (mActivityInfo.parentActivityName != null) {
        if (mActionBar == null) {
            mEnableDefaultActionBarUp = true;
        } else {
            mActionBar.setDefaultDisplayHomeAsUpEnabled(true);
        }
    }
    if (savedInstanceState != null) {
        Parcelable p = savedInstanceState.getParcelable(FRAGMENTS_TAG);
        mFragments.restoreAllState(p, mLastNonConfigurationInstances != null ? mLastNonConfigurationInstances.fragments : null);
    }
    mFragments.dispatchCreate();
    getApplication().dispatchActivityCreated(this, savedInstanceState);
    if (mVoiceInteractor != null) {
        mVoiceInteractor.attachActivity(this);
    }
    mCalled = true;
}
Also used : Parcelable(android.os.Parcelable) MainThread(android.annotation.MainThread) CallSuper(android.annotation.CallSuper)

Example 77 with CallSuper

use of android.annotation.CallSuper in project android_frameworks_base by ResurrectionRemix.

the class Activity method onPostResume.

/**
     * Called when activity resume is complete (after {@link #onResume} has
     * been called). Applications will generally not implement this method;
     * it is intended for system classes to do final setup after application
     * resume code has run.
     *
     * <p><em>Derived classes must call through to the super class's
     * implementation of this method.  If they do not, an exception will be
     * thrown.</em></p>
     *
     * @see #onResume
     */
@CallSuper
protected void onPostResume() {
    final Window win = getWindow();
    if (win != null)
        win.makeActive();
    if (mActionBar != null)
        mActionBar.setShowHideAnimationEnabled(true);
    mCalled = true;
}
Also used : PhoneWindow(com.android.internal.policy.PhoneWindow) Window(android.view.Window) CallSuper(android.annotation.CallSuper)

Example 78 with CallSuper

use of android.annotation.CallSuper in project android_frameworks_base by ResurrectionRemix.

the class NumberPicker method drawableStateChanged.

@CallSuper
@Override
protected void drawableStateChanged() {
    super.drawableStateChanged();
    final Drawable selectionDivider = mSelectionDivider;
    if (selectionDivider != null && selectionDivider.isStateful() && selectionDivider.setState(getDrawableState())) {
        invalidateDrawable(selectionDivider);
    }
}
Also used : Drawable(android.graphics.drawable.Drawable) CallSuper(android.annotation.CallSuper)

Example 79 with CallSuper

use of android.annotation.CallSuper in project android_frameworks_base by DirtyUnicorns.

the class NumberPicker method drawableStateChanged.

@CallSuper
@Override
protected void drawableStateChanged() {
    super.drawableStateChanged();
    final Drawable selectionDivider = mSelectionDivider;
    if (selectionDivider != null && selectionDivider.isStateful() && selectionDivider.setState(getDrawableState())) {
        invalidateDrawable(selectionDivider);
    }
}
Also used : Drawable(android.graphics.drawable.Drawable) CallSuper(android.annotation.CallSuper)

Example 80 with CallSuper

use of android.annotation.CallSuper in project android_frameworks_base by ResurrectionRemix.

the class Preference method onCreateView.

/**
     * Creates the View to be shown for this Preference in the
     * {@link PreferenceActivity}. The default behavior is to inflate the main
     * layout of this Preference (see {@link #setLayoutResource(int)}. If
     * changing this behavior, please specify a {@link ViewGroup} with ID
     * {@link android.R.id#widget_frame}.
     * <p>
     * Make sure to call through to the superclass's implementation.
     * 
     * @param parent The parent that this View will eventually be attached to.
     * @return The View that displays this Preference.
     * @see #onBindView(View)
     */
@CallSuper
protected View onCreateView(ViewGroup parent) {
    final LayoutInflater layoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    final View layout = layoutInflater.inflate(mLayoutResId, parent, false);
    final ViewGroup widgetFrame = (ViewGroup) layout.findViewById(com.android.internal.R.id.widget_frame);
    if (widgetFrame != null) {
        if (mWidgetLayoutResId != 0) {
            layoutInflater.inflate(mWidgetLayoutResId, widgetFrame);
        } else {
            widgetFrame.setVisibility(View.GONE);
        }
    }
    return layout;
}
Also used : ViewGroup(android.view.ViewGroup) LayoutInflater(android.view.LayoutInflater) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) ListView(android.widget.ListView) CallSuper(android.annotation.CallSuper)

Aggregations

CallSuper (android.annotation.CallSuper)89 IBinder (android.os.IBinder)20 View (android.view.View)15 TextView (android.widget.TextView)15 Point (android.graphics.Point)13 Drawable (android.graphics.drawable.Drawable)13 Context (android.content.Context)10 ImageView (android.widget.ImageView)10 ListView (android.widget.ListView)10 Paint (android.graphics.Paint)8 ColorDrawable (android.graphics.drawable.ColorDrawable)8 InputMethodManager (android.view.inputmethod.InputMethodManager)8 ScrollBarDrawable (android.widget.ScrollBarDrawable)8 MainThread (android.annotation.MainThread)5 TypedArray (android.content.res.TypedArray)5 Uri (android.net.Uri)5 Parcelable (android.os.Parcelable)5 DocumentsContract.buildDocumentUri (android.provider.DocumentsContract.buildDocumentUri)5 DocumentsContract.buildTreeDocumentUri (android.provider.DocumentsContract.buildTreeDocumentUri)5 DocumentsContract.isTreeUri (android.provider.DocumentsContract.isTreeUri)5