android.view.View.setAccessibilityDelegate()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(613)

本文整理了Java中android.view.View.setAccessibilityDelegate()方法的一些代码示例,展示了View.setAccessibilityDelegate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.setAccessibilityDelegate()方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:setAccessibilityDelegate

View.setAccessibilityDelegate介绍

暂无

代码示例

代码示例来源:origin: wdullaer/MaterialDateTimePicker

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
  // Workaround for a JB MR1 issue where accessibility delegates on
  // top-level ListView items are overwritten.
  if (!mLockAccessibilityDelegate) {
    super.setAccessibilityDelegate(delegate);
  }
}

代码示例来源:origin: iSoron/uhabits

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
  // Workaround for a JB MR1 issue where accessibility delegates on
  // top-level ListView items are overwritten.
  if (!mLockAccessibilityDelegate) {
    super.setAccessibilityDelegate(delegate);
  }
}

代码示例来源:origin: facebook/facebook-android-sdk

CodelessLoggingEventListener.getAccessibilityDelegate(
        mapping, rootView, view);
view.setAccessibilityDelegate(delegate);
this.delegateMap.put(mapKey, mapping.getEventName());

代码示例来源:origin: bkhezry/PersianDateRangePicker

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
 // Workaround for a JB MR1 issue where accessibility delegates on
 // top-level ListView items are overwritten.
 if (!mLockAccessibilityDelegate) {
  super.setAccessibilityDelegate(delegate);
 }
}

代码示例来源:origin: CiTuX/datetimepicker

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
  // Workaround for a JB MR1 issue where accessibility delegates on
  // top-level ListView items are overwritten.
  if (!mLockAccessibilityDelegate) {
    super.setAccessibilityDelegate(delegate);
  }
}

代码示例来源:origin: mohamad-amin/PersianMaterialDateTimePicker

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
 // Workaround for a JB MR1 issue where accessibility delegates on
 // top-level ListView items are overwritten.
 if (!mLockAccessibilityDelegate) {
  super.setAccessibilityDelegate(delegate);
 }
}

代码示例来源:origin: com.google.android/support-v4

public static void setAccessibilityDelegate(View v, Object delegate) {
  v.setAccessibilityDelegate((AccessibilityDelegate) delegate);
}

代码示例来源:origin: alhazmy13/HijriDatePicker

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
  // Workaround for a JB MR1 issue where accessibility delegates on
  // top-level ListView items are overwritten.
  if (!mLockAccessibilityDelegate) {
    super.setAccessibilityDelegate(delegate);
  }
}

代码示例来源:origin: alhazmy13/HijriDatePicker

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
  // Workaround for a JB MR1 issue where accessibility delegates on
  // top-level ListView items are overwritten.
  if (!mLockAccessibilityDelegate) {
    super.setAccessibilityDelegate(delegate);
  }
}

代码示例来源:origin: mohamad-amin/PersianMaterialDateTimePicker

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
 // Workaround for a JB MR1 issue where accessibility delegates on
 // top-level ListView items are overwritten.
 if (!mLockAccessibilityDelegate) {
  super.setAccessibilityDelegate(delegate);
 }
}

代码示例来源:origin: henrichg/PhoneProfilesPlus

@Override
public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
  // Workaround for a JB MR1 issue where accessibility delegates on
  // top-level ListView items are overwritten.
  if (!mLockAccessibilityDelegate && Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    super.setAccessibilityDelegate(delegate);
  }
}

代码示例来源:origin: kingargyle/adt-leanback-support

public static void setAccessibilityDelegate(View v, Object delegate) {
  v.setAccessibilityDelegate((AccessibilityDelegate) delegate);
}

代码示例来源:origin: niezhiyang/NGallery

void addScrapView(View scrap, int position, int viewType) {
  if (viewTypeCount == 1) {
    currentScrapViews.put(position, scrap);
  } else {
    scrapViews[viewType].put(position, scrap);
  }
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    scrap.setAccessibilityDelegate(null);
  }
}

代码示例来源:origin: JakeWharton/salvage

/**
 * Put a view into the ScrapViews list. These views are unordered.
 *
 * @param scrap The view to add
 */
void addScrapView(View scrap, int position, int viewType) {
 if (viewTypeCount == 1) {
  currentScrapViews.put(position, scrap);
 } else {
  scrapViews[viewType].put(position, scrap);
 }
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
  scrap.setAccessibilityDelegate(null);
 }
}

代码示例来源:origin: hanhailong/tubatu-viewpager

/**
 * Put a view into the ScrapViews list. These views are unordered.
 *
 * @param scrap The view to add
 */
void addScrapView(View scrap, int position, int viewType) {
  if (viewTypeCount == 1) {
    currentScrapViews.put(position, scrap);
  } else {
    scrapViews[viewType].put(position, scrap);
  }
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    scrap.setAccessibilityDelegate(null);
  }
}

代码示例来源:origin: demoNo/ParallaxViewPager

/**
 * Put a view into the ScrapViews list. These views are unordered.
 *
 * @param scrap The view to add
 */
void addScrapView(View scrap, int position, int viewType) {
 if (viewTypeCount == 1) {
  currentScrapViews.put(position, scrap);
 } else {
  scrapViews[viewType].put(position, scrap);
 }
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
  scrap.setAccessibilityDelegate(null);
 }
}

代码示例来源:origin: smuyyh/SprintNBA

/**
 * Put a view into the ScrapViews list. These views are unordered.
 * 
 * @param scrap
 *            The view to add
 */
@SuppressLint("NewApi")
void addScrapView(View scrap, int position, int viewType) {
  if (viewTypeCount == 1) {
    currentScrapViews.put(position, scrap);
  } else {
    scrapViews[viewType].put(position, scrap);
  }
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    scrap.setAccessibilityDelegate(null);
  }
}

代码示例来源:origin: geniusgithub/AndroidDialer

/**
 * Add this delegate to the parent of @param view to filter out TYPE_WINDOW_CONTENT_CHANGED
 */
public static void addToParent(View view){
 View parent = (View) view.getParent();
 parent.setAccessibilityDelegate(new ContentChangedFilter(view));
}

代码示例来源:origin: alibaba/android_viewtracker

private void handleViewClick(Activity activity, MotionEvent event, HashMap<String, Object> commonInfo) {
  View view = activity.getWindow().getDecorView();
  View tagView = null;
  View clickView = getClickView(view, event, tagView);
  if (clickView != null) {
    if (mDelegate != null) {
      mDelegate.setCommonInfo(commonInfo);
    }
    clickView.setAccessibilityDelegate(mDelegate);
  }
}

代码示例来源:origin: derry/delion

@Override
public void onDetachedFromWindow() {
  if (mLayoutManager != null) mLayoutManager.destroy();
  flushInvalidation();
  mInvalidator.set(null);
  super.onDetachedFromWindow();
  // Removes the accessibility node provider from this view.
  if (mNodeProvider != null) {
    mAccessibilityView.setAccessibilityDelegate(null);
    mNodeProvider = null;
    removeView(mAccessibilityView);
    mAccessibilityView = null;
  }
}

相关文章

View类方法