当前位置: 首页>>代码示例>>Java>>正文


Java View.OnAttachStateChangeListener方法代码示例

本文整理汇总了Java中android.view.View.OnAttachStateChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java View.OnAttachStateChangeListener方法的具体用法?Java View.OnAttachStateChangeListener怎么用?Java View.OnAttachStateChangeListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.View的用法示例。


在下文中一共展示了View.OnAttachStateChangeListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bind

import android.view.View; //导入方法依赖的package包/类
@UiThread
public static void bind(View view, KolibriProvider provider) {
  final KolibriCoordinator coordinator = provider.provideCoordinator(view);
  if (coordinator == null) {
    return;
  }

  View.OnAttachStateChangeListener binding = new Binding(view, coordinator);
  view.addOnAttachStateChangeListener(binding);
  // Sometimes we missed the first attach because the child's already been added.
  // Sometimes we didn't. The binding keeps track to avoid double attachment of the Coordinator,
  // and to guard against attachment to two different views simultaneously.
  binding.onViewAttachedToWindow(view);
}
 
开发者ID:azmedien,项目名称:kolibri-android,代码行数:15,代码来源:Kolibri.java

示例2: CompatAttachStateChangeListener

import android.view.View; //导入方法依赖的package包/类
CompatAttachStateChangeListener(View view, View.OnAttachStateChangeListener listener) {
    mView = view;
    mListener = listener;
    myAttached = isAttachedToWindow(mView);
    yourAttached = false;
    if (myAttached) mView.getViewTreeObserver().addOnPreDrawListener(this);
    mView.addOnAttachStateChangeListener(this);
    update();
}
 
开发者ID:lizhangqu,项目名称:FrescoLoader,代码行数:10,代码来源:ViewCompat.java

示例3: addOnAttachStateChangeListener

import android.view.View; //导入方法依赖的package包/类
public static void addOnAttachStateChangeListener(View view, View.OnAttachStateChangeListener listener) {
    CompatAttachStateChangeListener.addOnAttachStateChangeListener(view, listener);
}
 
开发者ID:lizhangqu,项目名称:FrescoLoader,代码行数:4,代码来源:ViewCompat.java

示例4: getAttachStateChangeListeners

import android.view.View; //导入方法依赖的package包/类
/**
 * Manually retrieve the view's attach state change listeners of an event. Robolectric
 * doesn't currently support manually firing these, and it would seem the events are not called
 * in normal Robolectric usage either.
 *
 * @param view View with listeners to notify
 */
static CopyOnWriteArrayList<View.OnAttachStateChangeListener> getAttachStateChangeListeners(View view) {
    Object listenerInfo = ReflectionHelpers.callInstanceMethod(view, "getListenerInfo");
    return ReflectionHelpers.getField(listenerInfo, "mOnAttachStateChangeListeners");
}
 
开发者ID:xufreshman,项目名称:RxLifeCycle,代码行数:12,代码来源:TestUtil.java

示例5: addOnAttachStateChangeListener

import android.view.View; //导入方法依赖的package包/类
/**
 * Delegiert von android.widget.Button
 *
 * @param listener siehe {@link Button}
 */
public void addOnAttachStateChangeListener(View.OnAttachStateChangeListener listener) {
    b.addOnAttachStateChangeListener(listener);
}
 
开发者ID:LCA311,项目名称:leoapp-sources,代码行数:9,代码来源:InfoButton.java

示例6: removeOnAttachStateChangeListener

import android.view.View; //导入方法依赖的package包/类
/**
 * Delegiert von android.widget.Button
 *
 * @param listener siehe {@link Button}
 */
public void removeOnAttachStateChangeListener(View.OnAttachStateChangeListener listener) {
    b.removeOnAttachStateChangeListener(listener);
}
 
开发者ID:LCA311,项目名称:leoapp-sources,代码行数:9,代码来源:InfoButton.java


注:本文中的android.view.View.OnAttachStateChangeListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。