本文整理汇总了Java中android.support.v4.view.ViewCompat.setImportantForAccessibility方法的典型用法代码示例。如果您正苦于以下问题:Java ViewCompat.setImportantForAccessibility方法的具体用法?Java ViewCompat.setImportantForAccessibility怎么用?Java ViewCompat.setImportantForAccessibility使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.view.ViewCompat
的用法示例。
在下文中一共展示了ViewCompat.setImportantForAccessibility方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SideMenu
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public SideMenu(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
final float density = context.getResources().getDisplayMetrics().density;
mOverhangSize = (int) (DEFAULT_OVERHANG_SIZE * density + 0.5f);
final ViewConfiguration viewConfig = ViewConfiguration.get(context);
setWillNotDraw(false);
ViewCompat.setAccessibilityDelegate(this, new AccessibilityDelegate());
ViewCompat.setImportantForAccessibility(this, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
mDragHelper = ViewDragHelper.create(this, 0.5f, new DragHelperCallback());
mDragHelper.setMinVelocity(MIN_FLING_VELOCITY * density);
setPanelSlideListener(new SimpleMenuPanelSlideListener());
setSliderFadeColor(ContextCompat.getColor(context, android.R.color.transparent));
setParallaxDistance(PARALLAX_DISTANCE);
}
示例2: updateChildrenImportantForAccessibility
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void updateChildrenImportantForAccessibility(View drawerView, boolean isDrawerOpen) {
final int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
final View child = getChildAt(i);
if (!isDrawerOpen && !isDrawerView(child)
|| isDrawerOpen && child == drawerView) {
// Drawer is closed and this is a content view or this is an
// open drawer view, so it should be visible.
ViewCompat.setImportantForAccessibility(child,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
} else {
ViewCompat.setImportantForAccessibility(child,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
}
}
示例3: addView
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void addView(View child, int index, ViewGroup.LayoutParams params) {
super.addView(child, index, params);
final View openDrawer = findOpenDrawer();
if (openDrawer != null || isDrawerView(child)) {
// A drawer is already open or the new view is a drawer, so the
// new view should start out hidden.
ViewCompat.setImportantForAccessibility(child,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
} else {
// Otherwise this is a content view and no drawer is open, so the
// new view should start out visible.
ViewCompat.setImportantForAccessibility(child,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
// We only need a delegate here if the framework doesn't understand
// NO_HIDE_DESCENDANTS importance.
if (!CAN_HIDE_DESCENDANTS) {
ViewCompat.setAccessibilityDelegate(child, mChildAccessibilityDelegate);
}
}
示例4: initViewPager
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
void initViewPager() {
setWillNotDraw(false);
setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
setFocusable(true);
final Context context = getContext();
mScroller = new Scroller(context, sInterpolator);
final ViewConfiguration configuration = ViewConfiguration.get(context);
final float density = context.getResources().getDisplayMetrics().density;
mTouchSlop = ViewConfigurationCompat.getScaledPagingTouchSlop(configuration);
mMinimumVelocity = (int) (MIN_FLING_VELOCITY * density);
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
mLeftEdge = new EdgeEffectCompat(context);
mRightEdge = new EdgeEffectCompat(context);
mFlingDistance = (int) (MIN_DISTANCE_FOR_FLING * density);
mCloseEnough = (int) (CLOSE_ENOUGH * density);
mDefaultGutterSize = (int) (DEFAULT_GUTTER_SIZE * density);
ViewCompat.setAccessibilityDelegate(this, new MyAccessibilityDelegate());
if (ViewCompat.getImportantForAccessibility(this) == ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
ViewCompat.setImportantForAccessibility(this,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
}
示例5: onInitializeAccessibilityNodeInfo
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
final AccessibilityNodeInfoCompat superNode = AccessibilityNodeInfoCompat.obtain(info);
super.onInitializeAccessibilityNodeInfo(host, superNode);
copyNodeInfoNoChildren(info, superNode);
superNode.recycle();
info.setClassName(BGASwipeBackLayout2.class.getName());
info.setSource(host);
final ViewParent parent = ViewCompat.getParentForAccessibility(host);
if (parent instanceof View) {
info.setParent((View) parent);
}
// This is a best-approximation of addChildrenForAccessibility()
// that accounts for filtering.
final int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
final View child = getChildAt(i);
if (!filter(child) && (child.getVisibility() == View.VISIBLE)) {
// Force importance to "yes" since we can't read the value.
ViewCompat.setImportantForAccessibility(
child, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
info.addChild(child);
}
}
}
示例6: DrawerLayout
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public DrawerLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this.mChildAccessibilityDelegate = new ChildAccessibilityDelegate();
this.mScrimColor = DEFAULT_SCRIM_COLOR;
this.mScrimPaint = new Paint();
this.mFirstLayout = true;
this.mLockModeLeft = 3;
this.mLockModeRight = 3;
this.mLockModeStart = 3;
this.mLockModeEnd = 3;
this.mShadowStart = null;
this.mShadowEnd = null;
this.mShadowLeft = null;
this.mShadowRight = null;
setDescendantFocusability(262144);
float density = getResources().getDisplayMetrics().density;
this.mMinDrawerMargin = (int) ((64.0f * density) + 0.5f);
float minVel = 400.0f * density;
this.mLeftCallback = new ViewDragCallback(3);
this.mRightCallback = new ViewDragCallback(5);
this.mLeftDragger = ViewDragHelper.create(this, TOUCH_SLOP_SENSITIVITY, this.mLeftCallback);
this.mLeftDragger.setEdgeTrackingEnabled(1);
this.mLeftDragger.setMinVelocity(minVel);
this.mLeftCallback.setDragger(this.mLeftDragger);
this.mRightDragger = ViewDragHelper.create(this, TOUCH_SLOP_SENSITIVITY, this.mRightCallback);
this.mRightDragger.setEdgeTrackingEnabled(2);
this.mRightDragger.setMinVelocity(minVel);
this.mRightCallback.setDragger(this.mRightDragger);
setFocusableInTouchMode(true);
ViewCompat.setImportantForAccessibility(this, 1);
ViewCompat.setAccessibilityDelegate(this, new AccessibilityDelegate());
ViewGroupCompat.setMotionEventSplittingEnabled(this, false);
if (ViewCompat.getFitsSystemWindows(this)) {
IMPL.configureApplyInsets(this);
this.mStatusBarBackground = IMPL.getDefaultStatusBarBackground(context);
}
this.mDrawerElevation = TitleBar.SHAREBTN_RIGHT_MARGIN * density;
this.mNonDrawerViews = new ArrayList();
}
示例7: DrawerLayout
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public DrawerLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this.mChildAccessibilityDelegate = new ChildAccessibilityDelegate();
this.mScrimColor = DEFAULT_SCRIM_COLOR;
this.mScrimPaint = new Paint();
this.mFirstLayout = true;
this.mLockModeLeft = 3;
this.mLockModeRight = 3;
this.mLockModeStart = 3;
this.mLockModeEnd = 3;
this.mShadowStart = null;
this.mShadowEnd = null;
this.mShadowLeft = null;
this.mShadowRight = null;
setDescendantFocusability(262144);
float density = getResources().getDisplayMetrics().density;
this.mMinDrawerMargin = (int) ((64.0f * density) + 0.5f);
float minVel = 400.0f * density;
this.mLeftCallback = new ViewDragCallback(3);
this.mRightCallback = new ViewDragCallback(5);
this.mLeftDragger = ViewDragHelper.create(this, 1.0f, this.mLeftCallback);
this.mLeftDragger.setEdgeTrackingEnabled(1);
this.mLeftDragger.setMinVelocity(minVel);
this.mLeftCallback.setDragger(this.mLeftDragger);
this.mRightDragger = ViewDragHelper.create(this, 1.0f, this.mRightCallback);
this.mRightDragger.setEdgeTrackingEnabled(2);
this.mRightDragger.setMinVelocity(minVel);
this.mRightCallback.setDragger(this.mRightDragger);
setFocusableInTouchMode(true);
ViewCompat.setImportantForAccessibility(this, 1);
ViewCompat.setAccessibilityDelegate(this, new AccessibilityDelegate());
ViewGroupCompat.setMotionEventSplittingEnabled(this, false);
if (ViewCompat.getFitsSystemWindows(this)) {
IMPL.configureApplyInsets(this);
this.mStatusBarBackground = IMPL.getDefaultStatusBarBackground(context);
}
this.mDrawerElevation = 10.0f * density;
this.mNonDrawerViews = new ArrayList();
}
示例8: attachAccessibilityDelegate
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void attachAccessibilityDelegate(View itemView) {
if (isAccessibilityEnabled()) {
if (ViewCompat.getImportantForAccessibility(itemView) ==
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
ViewCompat.setImportantForAccessibility(itemView,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
if (!ViewCompat.hasAccessibilityDelegate(itemView)) {
ViewCompat.setAccessibilityDelegate(itemView,
mAccessibilityDelegate.getItemDelegate());
}
}
}
示例9: TextInputLayout
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public TextInputLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs);
this.mCollapsingTextHelper = new CollapsingTextHelper(this);
ThemeUtils.checkAppCompatTheme(context);
setOrientation(1);
setWillNotDraw(false);
setAddStatesFromChildren(true);
this.mCollapsingTextHelper.setTextSizeInterpolator(AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR);
this.mCollapsingTextHelper.setPositionInterpolator(new AccelerateInterpolator());
this.mCollapsingTextHelper.setCollapsedTextGravity(8388659);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TextInputLayout, defStyleAttr, R.style.Widget_Design_TextInputLayout);
this.mHintEnabled = a.getBoolean(R.styleable.TextInputLayout_hintEnabled, true);
setHint(a.getText(R.styleable.TextInputLayout_android_hint));
this.mHintAnimationEnabled = a.getBoolean(R.styleable.TextInputLayout_hintAnimationEnabled, true);
if (a.hasValue(R.styleable.TextInputLayout_android_textColorHint)) {
ColorStateList colorStateList = a.getColorStateList(R.styleable.TextInputLayout_android_textColorHint);
this.mFocusedTextColor = colorStateList;
this.mDefaultTextColor = colorStateList;
}
if (a.getResourceId(R.styleable.TextInputLayout_hintTextAppearance, -1) != -1) {
setHintTextAppearance(a.getResourceId(R.styleable.TextInputLayout_hintTextAppearance, 0));
}
this.mErrorTextAppearance = a.getResourceId(R.styleable.TextInputLayout_errorTextAppearance, 0);
boolean errorEnabled = a.getBoolean(R.styleable.TextInputLayout_errorEnabled, false);
boolean counterEnabled = a.getBoolean(R.styleable.TextInputLayout_counterEnabled, false);
setCounterMaxLength(a.getInt(R.styleable.TextInputLayout_counterMaxLength, -1));
this.mCounterTextAppearance = a.getResourceId(R.styleable.TextInputLayout_counterTextAppearance, 0);
this.mCounterOverflowTextAppearance = a.getResourceId(R.styleable.TextInputLayout_counterOverflowTextAppearance, 0);
a.recycle();
setErrorEnabled(errorEnabled);
setCounterEnabled(counterEnabled);
if (ViewCompat.getImportantForAccessibility(this) == 0) {
ViewCompat.setImportantForAccessibility(this, 1);
}
ViewCompat.setAccessibilityDelegate(this, new TextInputAccessibilityDelegate());
}
示例10: initViewPager
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
void initViewPager() {
setWillNotDraw(false);
setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
setFocusable(true);
final Context context = getContext();
mScroller = new Scroller(context, sInterpolator);
final ViewConfiguration configuration = ViewConfiguration.get(context);
final float density = context.getResources().getDisplayMetrics().density;
mTouchSlop = ViewConfigurationCompat.getScaledPagingTouchSlop(configuration);
mMinimumVelocity = (int) (MIN_FLING_VELOCITY * density);
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
mLeftEdge = new EdgeEffectCompat(context);
mRightEdge = new EdgeEffectCompat(context);
mFlingDistance = (int) (MIN_DISTANCE_FOR_FLING * density);
mCloseEnough = (int) (CLOSE_ENOUGH * density);
mDefaultGutterSize = (int) (DEFAULT_GUTTER_SIZE * density);
ViewCompat.setAccessibilityDelegate(this, new MyAccessibilityDelegate());
if (ViewCompat.getImportantForAccessibility(this)
== ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
ViewCompat.setImportantForAccessibility(this,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
}
示例11: RecyclerView
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public RecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
setScrollContainer(true);
setFocusableInTouchMode(true);
final int version = Build.VERSION.SDK_INT;
mPostUpdatesOnAnimation = version >= 16;
final ViewConfiguration vc = ViewConfiguration.get(context);
mTouchSlop = vc.getScaledTouchSlop();
mMinFlingVelocity = vc.getScaledMinimumFlingVelocity();
mMaxFlingVelocity = vc.getScaledMaximumFlingVelocity();
setWillNotDraw(ViewCompat.getOverScrollMode(this) == ViewCompat.OVER_SCROLL_NEVER);
mItemAnimator.setListener(mItemAnimatorListener);
initAdapterManager();
initChildrenHelper();
// If not explicitly specified this view is important for accessibility.
if (ViewCompat.getImportantForAccessibility(this)
== ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
ViewCompat.setImportantForAccessibility(this,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
mAccessibilityManager = (AccessibilityManager) getContext()
.getSystemService(Context.ACCESSIBILITY_SERVICE);
setAccessibilityDelegateCompat(new RecyclerViewAccessibilityDelegate(this));
// Create the layoutManager if specified.
// Re-set whether nested scrolling is enabled so that it is set on all API levels
setNestedScrollingEnabled(true);
}
示例12: attachAccessibilityDelegate
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void attachAccessibilityDelegate(View itemView) {
if (RecyclerView.this.isAccessibilityEnabled()) {
if (ViewCompat.getImportantForAccessibility(itemView) == 0) {
ViewCompat.setImportantForAccessibility(itemView, 1);
}
if (!ViewCompat.hasAccessibilityDelegate(itemView)) {
ViewCompat.setAccessibilityDelegate(itemView, RecyclerView.this.mAccessibilityDelegate.getItemDelegate());
}
}
}
示例13: updateChildrenImportantForAccessibility
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void updateChildrenImportantForAccessibility(View drawerView, boolean isDrawerOpen) {
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
if ((isDrawerOpen || isDrawerView(child)) && !(isDrawerOpen && child == drawerView)) {
ViewCompat.setImportantForAccessibility(child, 4);
} else {
ViewCompat.setImportantForAccessibility(child, 1);
}
}
}
示例14: initViewPager
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
void initViewPager() {
setWillNotDraw(false);
setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
setFocusable(true);
final Context context = getContext();
mScroller = new Scroller(context, sInterpolator);
final ViewConfiguration configuration = ViewConfiguration.get(context);
final float density = context.getResources().getDisplayMetrics().density;
mTouchSlop = ViewConfigurationCompat.getScaledPagingTouchSlop(configuration);
mMinimumVelocity = (int) (MIN_FLING_VELOCITY * density);
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
mLeftEdge = new EdgeEffectCompat(context);
mRightEdge = new EdgeEffectCompat(context);
mTopEdge = new EdgeEffectCompat(context);
mBottomEdge = new EdgeEffectCompat(context);
mFlingDistance = (int) (MIN_DISTANCE_FOR_FLING * density);
mCloseEnough = (int) (CLOSE_ENOUGH * density);
mDefaultGutterSize = (int) (DEFAULT_GUTTER_SIZE * density);
ViewCompat.setAccessibilityDelegate(this, new MyAccessibilityDelegate());
if (ViewCompat.getImportantForAccessibility(this)
== ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
ViewCompat.setImportantForAccessibility(this,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
ViewCompat.setOnApplyWindowInsetsListener(this,
new android.support.v4.view.OnApplyWindowInsetsListener() {
private final Rect mTempRect = new Rect();
@Override
public WindowInsetsCompat onApplyWindowInsets(final View v,
final WindowInsetsCompat originalInsets) {
// First let the ViewPager itself try and consume them...
final WindowInsetsCompat applied =
ViewCompat.onApplyWindowInsets(v, originalInsets);
if (applied.isConsumed()) {
// If the ViewPager consumed all insets, return now
return applied;
}
// Now we'll manually dispatch the insets to our children. Since ViewPager
// children are always full-height, we do not want to use the standard
// ViewGroup dispatchApplyWindowInsets since if child 0 consumes them,
// the rest of the children will not receive any insets. To workaround this
// we manually dispatch the applied insets, not allowing children to
// consume them from each other. We do however keep track of any insets
// which are consumed, returning the union of our children's consumption
final Rect res = mTempRect;
res.left = applied.getSystemWindowInsetLeft();
res.top = applied.getSystemWindowInsetTop();
res.right = applied.getSystemWindowInsetRight();
res.bottom = applied.getSystemWindowInsetBottom();
for (int i = 0, count = getChildCount(); i < count; i++) {
final WindowInsetsCompat childInsets = ViewCompat
.dispatchApplyWindowInsets(getChildAt(i), applied);
// Now keep track of any consumed by tracking each dimension's min
// value
res.left = Math.min(childInsets.getSystemWindowInsetLeft(),
res.left);
res.top = Math.min(childInsets.getSystemWindowInsetTop(),
res.top);
res.right = Math.min(childInsets.getSystemWindowInsetRight(),
res.right);
res.bottom = Math.min(childInsets.getSystemWindowInsetBottom(),
res.bottom);
}
// Now return a new WindowInsets, using the consumed window insets
return applied.replaceSystemWindowInsets(
res.left, res.top, res.right, res.bottom);
}
});
}
示例15: MonthView
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public MonthView(Context context, AttributeSet attr, DatePickerController controller) {
boolean darkTheme = false;
super(context, attr);
this.mEdgePadding = 0;
this.mFirstJulianDay = -1;
this.mFirstMonth = -1;
this.mLastMonth = -1;
this.mRowHeight = DEFAULT_HEIGHT;
this.mHasToday = false;
this.mSelectedDay = -1;
this.mToday = -1;
this.mWeekStart = 1;
this.mNumDays = 7;
this.mNumCells = this.mNumDays;
this.mSelectedLeft = -1;
this.mSelectedRight = -1;
this.mNumRows = 6;
this.mDayOfWeekStart = 0;
this.mController = controller;
Resources res = context.getResources();
this.mDayLabelCalendar = Calendar.getInstance();
this.mCalendar = Calendar.getInstance();
this.mDayOfWeekTypeface = res.getString(R.string.mdtp_day_of_week_label_typeface);
this.mMonthTitleTypeface = res.getString(R.string.mdtp_sans_serif);
if (this.mController != null && this.mController.isThemeDark()) {
darkTheme = true;
}
if (darkTheme) {
this.mDayTextColor = res.getColor(R.color.mdtp_date_picker_text_normal_dark_theme);
this.mMonthDayTextColor = res.getColor(R.color.mdtp_date_picker_month_day_dark_theme);
this.mDisabledDayTextColor = res.getColor(R.color
.mdtp_date_picker_text_disabled_dark_theme);
this.mHighlightedDayTextColor = res.getColor(R.color
.mdtp_date_picker_text_highlighted_dark_theme);
} else {
this.mDayTextColor = res.getColor(R.color.mdtp_date_picker_text_normal);
this.mMonthDayTextColor = res.getColor(R.color.mdtp_date_picker_month_day);
this.mDisabledDayTextColor = res.getColor(R.color.mdtp_date_picker_text_disabled);
this.mHighlightedDayTextColor = res.getColor(R.color.mdtp_date_picker_text_highlighted);
}
this.mSelectedDayTextColor = res.getColor(R.color.mdtp_white);
this.mTodayNumberColor = this.mController.getAccentColor();
this.mMonthTitleColor = res.getColor(R.color.mdtp_white);
this.mStringBuilder = new StringBuilder(50);
this.mFormatter = new Formatter(this.mStringBuilder, Locale.getDefault());
MINI_DAY_NUMBER_TEXT_SIZE = res.getDimensionPixelSize(R.dimen.mdtp_day_number_size);
MONTH_LABEL_TEXT_SIZE = res.getDimensionPixelSize(R.dimen.mdtp_month_label_size);
MONTH_DAY_LABEL_TEXT_SIZE = res.getDimensionPixelSize(R.dimen
.mdtp_month_day_label_text_size);
MONTH_HEADER_SIZE = res.getDimensionPixelOffset(R.dimen.mdtp_month_list_item_header_height);
DAY_SELECTED_CIRCLE_SIZE = res.getDimensionPixelSize(R.dimen
.mdtp_day_number_select_circle_radius);
this.mRowHeight = (res.getDimensionPixelOffset(R.dimen
.mdtp_date_picker_view_animator_height) - getMonthHeaderSize()) / 6;
this.mTouchHelper = getMonthViewTouchHelper();
ViewCompat.setAccessibilityDelegate(this, this.mTouchHelper);
ViewCompat.setImportantForAccessibility(this, 1);
this.mLockAccessibilityDelegate = true;
initView();
}