Java 类android.support.annotation.CallSuper 实例源码
项目:PotRoom
文件:ListRoomsActivity_ViewBinding.java
@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;
}
项目:Nird2
文件:BaseContactSelectorFragment.java
@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;
}
项目:Nird2
文件:BaseContactSelectorFragment.java
@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;
}
项目:XphotoView
文件:MatrixImageView.java
@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);
}
}
项目:Nird2
文件:BaseThreadItemViewHolder.java
@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);
}
}
项目:Nird2
文件:BaseFragment.java
@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();
}
}
});
}
}
项目:RIBs
文件:RibActivity.java
@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());
}
项目:data-mediator
文件:DataBindingRecyclerAdapter.java
/**
* 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()));
}
项目:RetrofitAppArchitecture
文件:Request.java
@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);
}
项目:RIBs
文件:RibActivity.java
@Override
@CallSuper
protected void onResume() {
super.onResume();
lifecycleRelay.accept(ActivityLifecycleEvent.create(ActivityLifecycleEvent.Type.RESUME));
}
项目:Nird2
文件:ThreadListControllerImpl.java
@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();
}
});
}
}
}
项目:BittrexApi
文件:ToastCallback.java
@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();
}
}
项目:ZeroKit-Android-SDK
文件:ComponentControllerFragment.java
@Override
@CallSuper
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ComponentCache componentCache = getComponentCache();
componentDelegate.onCreate(componentCache, savedInstanceState, componentFactory);
}
项目:MVP-Architecture-Components
文件:BasePresenter.java
@CallSuper
@Override
public void onPresenterDestroy() {
if (stateBundle != null && !stateBundle.isEmpty()) {
stateBundle.clear();
}
}
项目:weex-3d-map
文件:AbstractWeexActivity.java
@Override
@CallSuper
public void onRenderSuccess(WXSDKInstance instance, int width, int height) {
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onWeexRenderSuccess(instance);
}
}
项目:GitHub
文件:TiActivityPlugin.java
@CallSuper
@Override
public void onStop() {
mDelegate.onStop_beforeSuper();
super.onStop();
mDelegate.onStop_afterSuper();
}
项目:silly-android
文件:EasyDialog.java
@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();
}
项目:PandwarfDefenderProject
文件:StopGuardian.java
@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);
}
});
}
项目:silly-android
文件:BlockingLifecycleActivity.java
/**
* {@inheritDoc}
*/
@Override
@CallSuper
protected void onRestart() {
setStopInvoked(false);
setDestroyInvoked(false);
super.onRestart();
}
项目:NSMPlayer-Android
文件:AbstractPlayer.java
@CallSuper
public void resetListeners() {
mOnPreparedListener = null;
mOnBufferingUpdateListener = null;
mOnCompletionListener = null;
mOnSeekCompleteListener = null;
mOnVideoSizeChangedListener = null;
mOnErrorListener = null;
mOnInfoListener = null;
}
项目:Synapse
文件:WrapperActivity.java
@CallSuper
@Override
public boolean onCreateOptionsMenu(Menu menu) {
mScalpelMenu = menu.add(Menu.NONE, R.id.scalpel_menu, Menu.NONE, "Enable Scalpel");
return true;
}
项目:javaide
文件:JavaProjectFolder.java
@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();
}
项目:MainCalendar
文件:BottomPopup.java
/**
* Show.
*/
@CallSuper
public void show() {
onShowPrepare();
popup.show();
LogUtils.debug("popup show");
}
项目:DateTimePicker
文件:NumberPicker.java
@CallSuper
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
final Drawable selectionDivider = mSelectionDivider;
if (selectionDivider != null && selectionDivider.isStateful()
&& selectionDivider.setState(getDrawableState())) {
invalidateDrawable(selectionDivider);
}
}
项目:ChocoPie
文件:LoaderFragment.java
@CallSuper
protected void loadViews() {
try {
YumLoader.parse(this);
} catch (YumLoader.ParsingException ignored) {}
}
项目:Mvp
文件:BasePresenter.java
@CallSuper
@Override
public void onAttach(@NonNull IView view) {
try {
mView = (T) view;
} catch (ClassCastException e) {
mView = null;
}
}
项目:RLibrary
文件:UIIViewImpl.java
@CallSuper
@Override
public void release() {
mOnUIViewListener = null;
//mActivity = null;
mChildILayout = null;
//mParentILayout = null;
//mILayout = null;
mILifecycleList.clear();
}
项目:genius-groupie
文件:NestedGroup.java
/**
* 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());
}
}
项目:silly-android
文件:ParsableActivity.java
/**
* {@inheritDoc}
*/
@Override
@CallSuper
protected void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AnnotationParser.parseType(this, this);
if (getLayoutId() > 0) {
setContentView(getLayoutId());
}
}
项目:ChipsLayoutManager
文件:MeasureSupporter.java
@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;
}
项目:silly-android
文件:EasyDialog.java
@Override
@CallSuper
protected void onStart() {
super.onStart();
final View contentView = getContentView();
if (contentView != null && mKeyboardListener != null) {
contentView.getViewTreeObserver().addOnGlobalLayoutListener(mKeyboardListener);
}
}
项目:GitHub
文件:ActionModeHelper.java
/**
* {@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);
}
}
项目:GitHub
文件:FlexibleAdapter.java
/**
* 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;
}
项目:FireFiles
文件:DocumentsProvider.java
/**
* 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);
}
}
项目:Auto.js
文件:ScriptEngine.java
@CallSuper
@Override
public synchronized void destroy() {
mDestroyed = true;
if (mOnDestroyListener != null) {
mOnDestroyListener.onDestroy(this);
}
}
项目:android_arkhitekton
文件:InstrumentedTestCase.java
/**
* 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;
}
项目:MDRXL
文件:RxPresenter.java
@CallSuper
@Override
protected void onFirstViewAttach() {
super.onFirstViewAttach();
for (final PresenterExtension extension : extensions) {
extension.onFirstAttach();
}
}
项目:boohee_v5.6
文件:FragmentManagerImpl.java
@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);
}
}
项目:recyclerview-android
文件:ItemClickHelper.java
/**
* {@inheritDoc}
*/
@CallSuper
@Override
protected void onDetachedFromRecyclerView(@NonNull final RecyclerView recyclerView) {
recyclerView.removeOnItemTouchListener(mOnItemTouchListener);
mGestureDetector = null;
}
项目:firefox-tv
文件:MainActivityFirstrunTestRule.java
@CallSuper
@Override
protected void beforeActivityLaunched() {
super.beforeActivityLaunched();
Context appContext = InstrumentationRegistry.getInstrumentation()
.getTargetContext()
.getApplicationContext();
PreferenceManager.getDefaultSharedPreferences(appContext)
.edit()
.putBoolean(FIRSTRUN_PREF, !showFirstRun)
.apply();
}