android.support.v4.widget.DrawerLayout.setFocusableInTouchMode()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(122)

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

DrawerLayout.setFocusableInTouchMode介绍

暂无

代码示例

代码示例来源:origin: trezor/trezor-android

drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN, drawerContent);
drawerLayout.setScrimColor(Color.TRANSPARENT);
drawerLayout.setFocusableInTouchMode(false);

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

public DrawerLayout(Context context, AttributeSet attrs, int defStyle) {
  super(context, attrs, defStyle);
  setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
  final float density = getResources().getDisplayMetrics().density;
  mMinDrawerMargin = (int) (MIN_DRAWER_MARGIN * density + 0.5f);
  final float minVel = MIN_FLING_VELOCITY * density;
  mLeftCallback = new ViewDragCallback(Gravity.LEFT);
  mRightCallback = new ViewDragCallback(Gravity.RIGHT);
  mLeftDragger = ViewDragHelper.create(this, TOUCH_SLOP_SENSITIVITY, mLeftCallback);
  mLeftDragger.setEdgeTrackingEnabled(ViewDragHelper.EDGE_LEFT);
  mLeftDragger.setMinVelocity(minVel);
  mLeftCallback.setDragger(mLeftDragger);
  mRightDragger = ViewDragHelper.create(this, TOUCH_SLOP_SENSITIVITY, mRightCallback);
  mRightDragger.setEdgeTrackingEnabled(ViewDragHelper.EDGE_RIGHT);
  mRightDragger.setMinVelocity(minVel);
  mRightCallback.setDragger(mRightDragger);
  // So that we can catch the back button
  setFocusableInTouchMode(true);
  ViewCompat.setImportantForAccessibility(this,
      ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
  ViewCompat.setAccessibilityDelegate(this, new AccessibilityDelegate());
  ViewGroupCompat.setMotionEventSplittingEnabled(this, false);
  if (ViewCompat.getFitsSystemWindows(this)) {
    IMPL.configureApplyInsets(this);
  }
}

相关文章