Java Code Examples for android.support.annotation.CallSuper

The following are top voted examples for showing how to use android.support.annotation.CallSuper. 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: PotRoom   File: ListRoomsActivity_ViewBinding.java   View source code 7 votes vote down vote up
@Override
@CallSuper
public void unbind() {
  ListRoomsActivity target = this.target;
  if (target == null) throw new IllegalStateException("Bindings already cleared.");
  this.target = null;

  target.recyclerView = null;
  target.txtCurrentRooms = null;
  target.viewLoading = null;
  target.txtNoRoom = null;

  view2131689610.setOnClickListener(null);
  view2131689610 = null;
  view2131689612.setOnClickListener(null);
  view2131689612 = null;
}
 
Example 2
Project: Nird2   File: BaseContactSelectorFragment.java   View source code 7 votes vote down vote up
@Override
@CallSuper
public View onCreateView(LayoutInflater inflater,
		@Nullable ViewGroup container,
		@Nullable Bundle savedInstanceState) {

	View contentView = inflater.inflate(R.layout.list, container, false);

	list = (BriarRecyclerView) contentView.findViewById(R.id.list);
	list.setLayoutManager(new LinearLayoutManager(getActivity()));
	list.setEmptyText(getString(R.string.no_contacts_selector));
	adapter = getAdapter(getContext(), this);
	list.setAdapter(adapter);

	// restore selected contacts if available
	if (savedInstanceState != null) {
		ArrayList<Integer> intContacts =
				savedInstanceState.getIntegerArrayList(CONTACTS);
		if (intContacts != null) {
			selectedContacts = getContactsFromIntegers(intContacts);
		}
	}
	return contentView;
}
 
Example 3
Project: Nird2   File: BaseContactSelectorFragment.java   View source code 7 votes vote down vote up
@Override
@CallSuper
public View onCreateView(LayoutInflater inflater,
		@Nullable ViewGroup container,
		@Nullable Bundle savedInstanceState) {

	View contentView = inflater.inflate(R.layout.list, container, false);

	list = (BriarRecyclerView) contentView.findViewById(R.id.list);
	list.setLayoutManager(new LinearLayoutManager(getActivity()));
	list.setEmptyText(getString(R.string.no_contacts_selector));
	adapter = getAdapter(getContext(), this);
	list.setAdapter(adapter);

	// restore selected contacts if available
	if (savedInstanceState != null) {
		ArrayList<Integer> intContacts =
				savedInstanceState.getIntegerArrayList(CONTACTS);
		if (intContacts != null) {
			selectedContacts = getContactsFromIntegers(intContacts);
		}
	}
	return contentView;
}
 
Example 4
Project: XphotoView   File: MatrixImageView.java   View source code 6 votes vote down vote up
@CallSuper
protected void onImageMatrixUpdated(Matrix imageMatrix) {
    float angle = getImageAngle();
    if (angle != imageAngle) {
        imageAngle = angle;
        onImageRotate(angle);
    }

    float scaleX = getImageScaleX();
    float scaleY = getImageScaleY();
    if (imageScaleX != scaleX || imageScaleY != scaleY) {
        imageScaleX = scaleX;
        imageScaleY = scaleY;
        onImageScale(scaleX, scaleY);
    }

    float transX = getImageTranslateX();
    float transY = getImageTranslateY();
    if (imageTranslateX != transX || imageTranslateY != transY) {
        imageTranslateX = transX;
        imageTranslateY = transY;
        onImageTranslate(transX, transY);
    }
}
 
Example 5
Project: Nird2   File: BaseThreadItemViewHolder.java   View source code 6 votes vote down vote up
@CallSuper
public void bind(final I item, final ThreadItemListener<I> listener) {
	textView.setText(StringUtils.trim(item.getText()));

	author.setAuthor(item.getAuthor());
	author.setDate(item.getTimestamp());
	author.setAuthorStatus(item.getStatus());

	if (item.isHighlighted()) {
		layout.setActivated(true);
	} else if (!item.isRead()) {
		layout.setActivated(true);
		animateFadeOut();
		listener.onUnreadItemVisible(item);
	} else {
		layout.setActivated(false);
	}
}
 
Example 6
Project: Nird2   File: BaseFragment.java   View source code 6 votes vote down vote up
@CallSuper
@Override
public void runOnUiThreadUnlessDestroyed(final Runnable r) {
	final Activity activity = getActivity();
	if (activity != null) {
		activity.runOnUiThread(new Runnable() {
			@Override
			public void run() {
				// Note that we don't have to check if the activity has
				// been destroyed as the Fragment has not been detached yet
				if (!isDetached() && !activity.isFinishing()) {
					r.run();
				}
			}
		});
	}
}
 
Example 7
Project: RIBs   File: RibActivity.java   View source code 6 votes vote down vote up
@SuppressWarnings("CheckNullabilityTypes")
@Initializer
@CallSuper
@Override
protected void onCreate(@Nullable android.os.Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  ViewGroup rootViewGroup = ((ViewGroup) findViewById(android.R.id.content));

  lifecycleRelay.accept(ActivityLifecycleEvent.createOnCreateEvent(savedInstanceState));
  router = createRouter(rootViewGroup);

  Bundle wrappedBundle = null;
  if (savedInstanceState != null) {
    wrappedBundle = new Bundle(savedInstanceState);
  }
  router.dispatchAttach(wrappedBundle);

  rootViewGroup.addView(router.getView());
}
 
Example 8
Project: data-mediator   File: DataBindingRecyclerAdapter.java   View source code 6 votes vote down vote up
/**
 * called on bind item data.
 *
 * @param position the position (reject headers and footers)
 * @param supplier the supplier, which is used to data-binding. this is from
 *                 {@linkplain DataBindingRecyclerAdapter#onCreateParameterSupplier()}.
 * @see DataBinding
 * @see DataBinding#bind(Object, int, DataBinding.ParameterSupplier, PropertyInterceptor)
 */
@CallSuper
protected void onBindData(int position, @Nullable DataBinding.SimpleParameterSupplier supplier) {
    DataBindingRecyclerAdapter<T> adapter = getAdapter();
    if (adapter == null) {
        return;
    }
    Binder<T> binder = adapter.mBinderMap.get(position);
    if (binder != null) {
        if(DEBUG) {
            Logger.i(TAG, "onBindData", "unbindAll() >>> pos = " + position);
        }
        binder.unbindAll();
    }
    adapter.mBinderMap.put(position, mDataBinding.bindAndApply(
            adapter.getItem(position), 0, supplier, getPropertyInterceptor()));
}
 
Example 9
Project: RetrofitAppArchitecture   File: Request.java   View source code 6 votes vote down vote up
@CallSuper
@Override
public void onCacheResponse(K k, boolean isDone) {
    if (isCanceled()) {
        EventBus.getDefault().post(new EventRequestCanceled(this));
        LogUtils.d("请求被取消:" + mDataType);

        return;
    }


    mResult = k;
    setDone(isDone);

    //通知ui缓存数据返回
    EventBus.getDefault().post(new EventResponse(this, DataFrom.CACHE));

    LogUtils.d("请求:");
    LogUtils.d(mResult);

}
 
Example 10
Project: RIBs   File: RibActivity.java   View source code 6 votes vote down vote up
@Override
@CallSuper
protected void onResume() {
  super.onResume();

  lifecycleRelay.accept(ActivityLifecycleEvent.create(ActivityLifecycleEvent.Type.RESUME));
}
 
Example 11
Project: Nird2   File: ThreadListControllerImpl.java   View source code 6 votes vote down vote up
@CallSuper
@Override
public void eventOccurred(Event e) {
	if (e instanceof GroupRemovedEvent) {
		GroupRemovedEvent s = (GroupRemovedEvent) e;
		if (s.getGroup().getId().equals(getGroupId())) {
			LOG.info("Group removed");
			listener.runOnUiThreadUnlessDestroyed(new Runnable() {
				@Override
				public void run() {
					listener.onGroupRemoved();
				}
			});
		}
	}
}
 
Example 12
Project: BittrexApi   File: ToastCallback.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public void onResponse(Request<T> request, T response) {
    if (response == null) {
        Toast.makeText(_context, "Error executing " + request.getClass().getSimpleName() + ": Empty response returned", Toast.LENGTH_LONG).show();
    } else if (!response.success()) {
        Toast.makeText(_context, "Error executing " + request.getClass().getSimpleName() + ": " + response.message(), Toast.LENGTH_LONG).show();
    }
}
 
Example 13
Project: ZeroKit-Android-SDK   File: ComponentControllerFragment.java   View source code 5 votes vote down vote up
@Override
@CallSuper
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ComponentCache componentCache = getComponentCache();
    componentDelegate.onCreate(componentCache, savedInstanceState, componentFactory);
}
 
Example 14
Project: MVP-Architecture-Components   File: BasePresenter.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public void onPresenterDestroy() {
    if (stateBundle != null && !stateBundle.isEmpty()) {
        stateBundle.clear();
    }
}
 
Example 15
Project: weex-3d-map   File: AbstractWeexActivity.java   View source code 5 votes vote down vote up
@Override
@CallSuper
public void onRenderSuccess(WXSDKInstance instance, int width, int height) {
  if(mWxAnalyzerDelegate  != null){
    mWxAnalyzerDelegate.onWeexRenderSuccess(instance);
  }
}
 
Example 16
Project: GitHub   File: TiActivityPlugin.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public void onStop() {
    mDelegate.onStop_beforeSuper();
    super.onStop();
    mDelegate.onStop_afterSuper();
}
 
Example 17
Project: silly-android   File: EasyDialog.java   View source code 5 votes vote down vote up
@Override
@CallSuper
public void dismiss() {
    final View contentView = getContentView();
    if (contentView != null && mKeyboardListener != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        contentView.getViewTreeObserver().removeOnGlobalLayoutListener(mKeyboardListener);
        mKeyboardListener = null;
    } else if (contentView != null && mKeyboardListener != null) {
        // noinspection deprecation
        contentView.getViewTreeObserver().removeGlobalOnLayoutListener(mKeyboardListener);
    }
    super.dismiss();
}
 
Example 18
Project: PandwarfDefenderProject   File: StopGuardian.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public void run() {
    super.run();
    stopGuardian(new GollumCallbackGetBoolean() {
        @Override
        public void done(boolean stopSuccess) {
            Log.d(TAG, "Pandwarf stopped");
            toastShow("protection stopped");
            cbThreadDone.done(stopSuccess);
        }
    });
}
 
Example 19
Project: silly-android   File: BlockingLifecycleActivity.java   View source code 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
@CallSuper
protected void onRestart() {
    setStopInvoked(false);
    setDestroyInvoked(false);
    super.onRestart();
}
 
Example 20
Project: NSMPlayer-Android   File: AbstractPlayer.java   View source code 5 votes vote down vote up
@CallSuper
public void resetListeners() {
    mOnPreparedListener = null;
    mOnBufferingUpdateListener = null;
    mOnCompletionListener = null;
    mOnSeekCompleteListener = null;
    mOnVideoSizeChangedListener = null;
    mOnErrorListener = null;
    mOnInfoListener = null;
}
 
Example 21
Project: Synapse   File: WrapperActivity.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    mScalpelMenu = menu.add(Menu.NONE, R.id.scalpel_menu, Menu.NONE, "Enable Scalpel");

    return true;
}
 
Example 22
Project: javaide   File: JavaProjectFolder.java   View source code 5 votes vote down vote up
@CallSuper
public void mkdirs() {
    if (!dirRoot.exists()) dirRoot.mkdirs();
    if (!dirProject.exists()) dirProject.mkdirs();
    if (!dirLibs.exists()) dirLibs.mkdirs();
    if (!dirSrcMain.exists()) dirSrcMain.mkdirs();
    if (!dirJava.exists()) dirJava.mkdirs();
    if (!dirBuildClasses.exists()) dirBuildClasses.mkdirs();
    if (!dirGenerated.exists()) dirGenerated.mkdirs();
    if (!dirGeneratedSource.exists()) dirGeneratedSource.mkdirs();
}
 
Example 23
Project: MainCalendar   File: BottomPopup.java   View source code 5 votes vote down vote up
/**
 * Show.
 */
@CallSuper
public void show() {
    onShowPrepare();
    popup.show();
    LogUtils.debug("popup show");
}
 
Example 24
Project: DateTimePicker   File: NumberPicker.java   View source code 5 votes vote down vote up
@CallSuper
@Override
protected void drawableStateChanged() {
    super.drawableStateChanged();

    final Drawable selectionDivider = mSelectionDivider;
    if (selectionDivider != null && selectionDivider.isStateful()
            && selectionDivider.setState(getDrawableState())) {
        invalidateDrawable(selectionDivider);
    }
}
 
Example 25
Project: ChocoPie   File: LoaderFragment.java   View source code 5 votes vote down vote up
@CallSuper
protected void loadViews() {
    try {

        YumLoader.parse(this);

    } catch (YumLoader.ParsingException ignored) {}
}
 
Example 26
Project: Mvp   File: BasePresenter.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public void onAttach(@NonNull IView view) {
    try {
        mView = (T) view;
    } catch (ClassCastException e) {
        mView = null;
    }
}
 
Example 27
Project: RLibrary   File: UIIViewImpl.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public void release() {
    mOnUIViewListener = null;
    //mActivity = null;
    mChildILayout = null;
    //mParentILayout = null;
    //mILayout = null;
    mILifecycleList.clear();
}
 
Example 28
Project: genius-groupie   File: NestedGroup.java   View source code 5 votes vote down vote up
/**
 * Every item in the group still exists but the data in each has changed (e.g. should rebind).
 *
 * @param group
 */
@CallSuper
@Override
public void onChanged(Group group) {
    if (parentDataObserver != null) {
        parentDataObserver.onItemRangeChanged(this, getItemCountBeforeGroup(group), group.getItemCount());
    }
}
 
Example 29
Project: silly-android   File: ParsableActivity.java   View source code 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
@CallSuper
protected void onCreate(@Nullable final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AnnotationParser.parseType(this, this);
    if (getLayoutId() > 0) {
        setContentView(getLayoutId());
    }
}
 
Example 30
Project: ChipsLayoutManager   File: MeasureSupporter.java   View source code 5 votes vote down vote up
@Override
@CallSuper
public void onItemRangeRemoved(int positionStart, int itemCount) {
    super.onItemRangeRemoved(positionStart, itemCount);
    /** we detected removing event, so should process measuring manually
     * @see <a href="http://stackoverflow.com/questions/40242011/custom-recyclerviews-layoutmanager-automeasuring-after-animation-finished-on-i">Stack Overflow issue</a>
     */
    isAfterRemoving = true;

    beforeRemovingWidth = autoMeasureWidth;
    beforeRemovingHeight = autoMeasureHeight;
}
 
Example 31
Project: silly-android   File: EasyDialog.java   View source code 5 votes vote down vote up
@Override
@CallSuper
protected void onStart() {
    super.onStart();
    final View contentView = getContentView();
    if (contentView != null && mKeyboardListener != null) {
        contentView.getViewTreeObserver().addOnGlobalLayoutListener(mKeyboardListener);
    }
}
 
Example 32
Project: GitHub   File: ActionModeHelper.java   View source code 5 votes vote down vote up
/**
 * {@inheritDoc}
 * With FlexibleAdapter v5.0.0 the default mode is {@link SelectableAdapter#MODE_IDLE}, if
 * you want single selection enabled change default mode with {@link #withDefaultMode(int)}.
 */
@CallSuper
@Override
public void onDestroyActionMode(ActionMode actionMode) {
	if (SelectableAdapter.DEBUG)
		Log.i(TAG, "ActionMode is about to be destroyed! New mode will be " + defaultMode);
	// Change mode and deselect everything
	mAdapter.setMode(defaultMode);
	mAdapter.clearSelection();
	mActionMode = null;
	// Notify the provided callback
	if (mCallback != null) {
		mCallback.onDestroyActionMode(actionMode);
	}
}
 
Example 33
Project: GitHub   File: FlexibleAdapter.java   View source code 5 votes vote down vote up
/**
 * Initializes the listener(s) of this Adapter.
 * <p>This method is automatically called from the Constructor.</p>
 *
 * @param listener the object(s) instance(s) of any listener
 * @return this Adapter, so the call can be chained
 * @since 5.0.0-b6
 */
@CallSuper
public FlexibleAdapter<T> addListener(@Nullable Object listener) {
	if (DEBUG && listener != null) {
		Log.i(TAG, "Adding listener class " + getClassName(listener) + " as:");
	}
	if (listener instanceof OnItemClickListener) {
		if (DEBUG) Log.i(TAG, "- OnItemClickListener");
		mItemClickListener = (OnItemClickListener) listener;
	}
	if (listener instanceof OnItemLongClickListener) {
		if (DEBUG) Log.i(TAG, "- OnItemLongClickListener");
		mItemLongClickListener = (OnItemLongClickListener) listener;
	}
	if (listener instanceof OnItemMoveListener) {
		if (DEBUG) Log.i(TAG, "- OnItemMoveListener");
		mItemMoveListener = (OnItemMoveListener) listener;
	}
	if (listener instanceof OnItemSwipeListener) {
		if (DEBUG) Log.i(TAG, "- OnItemSwipeListener");
		mItemSwipeListener = (OnItemSwipeListener) listener;
	}
	if (listener instanceof OnStickyHeaderChangeListener) {
		if (DEBUG) Log.i(TAG, "- OnStickyHeaderChangeListener");
		mStickyHeaderChangeListener = (OnStickyHeaderChangeListener) listener;
	}
	if (listener instanceof OnUpdateListener) {
		if (DEBUG) Log.i(TAG, "- OnUpdateListener");
		mUpdateListener = (OnUpdateListener) listener;
		mUpdateListener.onUpdateEmptyView(getMainItemCount());
	}
	return this;
}
 
Example 34
Project: FireFiles   File: DocumentsProvider.java   View source code 5 votes vote down vote up
/**
 * Implementation is provided by the parent class. Can be overridden to
 * provide additional functionality, but subclasses <em>must</em> always
 * call the superclass. If the superclass returns {@code null}, the subclass
 * may implement custom behavior.
 */
@CallSuper
@Override
public Bundle call(String method, String arg, Bundle extras) {
    if (!method.startsWith("android:")) {
        // Ignore non-platform methods
        return super.call(method, arg, extras);
    }

    try {
        return callUnchecked(method, arg, extras);
    } catch (FileNotFoundException e) {
        throw new IllegalStateException("Failed call " + method, e);
    }
}
 
Example 35
Project: Auto.js   File: ScriptEngine.java   View source code 5 votes vote down vote up
@CallSuper
@Override
public synchronized void destroy() {
    mDestroyed = true;
    if (mOnDestroyListener != null) {
        mOnDestroyListener.onDestroy(this);
    }
}
 
Example 36
Project: android_arkhitekton   File: InstrumentedTestCase.java   View source code 5 votes vote down vote up
/**
 * Called after execution of each test method finishes.
 */
@After
@CallSuper
public void afterTest() throws Exception {
	// Inheritance hierarchies may for example release here resources acquired in beforeTest() call.
	this.mContext = null;
}
 
Example 37
Project: MDRXL   File: RxPresenter.java   View source code 5 votes vote down vote up
@CallSuper
@Override
protected void onFirstViewAttach() {
    super.onFirstViewAttach();
    for (final PresenterExtension extension : extensions) {
        extension.onFirstAttach();
    }
}
 
Example 38
Project: boohee_v5.6   File: FragmentManagerImpl.java   View source code 5 votes vote down vote up
@CallSuper
public void onAnimationEnd(Animation animation) {
    if (this.mView != null && this.mShouldRunOnHWLayer) {
        this.mView.post(new Runnable() {
            public void run() {
                ViewCompat.setLayerType(AnimateOnHWLayerIfNeededListener.this.mView, 0, null);
            }
        });
    }
    if (this.mOrignalListener != null) {
        this.mOrignalListener.onAnimationEnd(animation);
    }
}
 
Example 39
Project: recyclerview-android   File: ItemClickHelper.java   View source code 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@CallSuper
@Override
protected void onDetachedFromRecyclerView(@NonNull final RecyclerView recyclerView) {
    recyclerView.removeOnItemTouchListener(mOnItemTouchListener);
    mGestureDetector = null;
}
 
Example 40
Project: firefox-tv   File: MainActivityFirstrunTestRule.java   View source code 5 votes vote down vote up
@CallSuper
@Override
protected void beforeActivityLaunched() {
    super.beforeActivityLaunched();

    Context appContext = InstrumentationRegistry.getInstrumentation()
            .getTargetContext()
            .getApplicationContext();

    PreferenceManager.getDefaultSharedPreferences(appContext)
            .edit()
            .putBoolean(FIRSTRUN_PREF, !showFirstRun)
            .apply();
}