android.support.design.internal.NavigationMenuView Java Examples
The following examples show how to use
android.support.design.internal.NavigationMenuView.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ShapedNavigationView.java From ShapedNavigationView with MIT License | 6 votes |
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); final int count = getChildCount(); for (int i = 0; i < count; i++) { final View v = getChildAt(i); if (v instanceof NavigationMenuView) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { v.setBackground(settings.getBackgroundDrawable()); } else { v.setBackgroundDrawable(settings.getBackgroundDrawable()); } } } }
Example #2
Source File: NavigationUtils.java From YiZhi with Apache License 2.0 | 5 votes |
public static void disableNavigationViewScrollbars(NavigationView navigationView) { if (navigationView != null) { NavigationMenuView navigationMenuView = (NavigationMenuView) navigationView .getChildAt(0); if (navigationMenuView != null) { navigationMenuView.setVerticalScrollBarEnabled(false); } } }
Example #3
Source File: MainActivity.java From LQRBiliBlili with MIT License | 5 votes |
private void removeNavigationViewScrollbar(NavigationView navigationView) { if (navigationView != null) { NavigationMenuView navigationMenuView = (NavigationMenuView) navigationView.getChildAt(0); if (navigationMenuView != null) { navigationMenuView.setVerticalScrollBarEnabled(false); } } }
Example #4
Source File: ShapedNavigationView.java From ShapedNavigationView with MIT License | 5 votes |
@Override protected void measureChild(View child, int parentWidthMeasureSpec, int parentHeightMeasureSpec) { if (child instanceof NavigationMenuView) { child.measure(View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec( getMeasuredHeight(), View.MeasureSpec.EXACTLY)); } else { super.measureChild(child, parentWidthMeasureSpec, parentHeightMeasureSpec); } }
Example #5
Source File: BaseDrawerLayoutActivity.java From ZfsoftCampusAssit with Apache License 2.0 | 5 votes |
/** * 隐藏 NavigationView 垂直滑动条 */ private void hideVerticalScrollBar() { NavigationMenuView navigationMenuView = (NavigationMenuView) mNavigationView.getChildAt(0); if (navigationMenuView != null) { navigationMenuView.setVerticalScrollBarEnabled(false); } }
Example #6
Source File: NavigationViewHelper.java From candybar-library with Apache License 2.0 | 4 votes |
public static void hideScrollBar(NavigationView navigationView) { NavigationMenuView navigationMenuView = (NavigationMenuView) navigationView.getChildAt(0); if (navigationMenuView != null) navigationMenuView.setVerticalScrollBarEnabled(false); }
Example #7
Source File: DesignDSL.java From anvil with MIT License | 4 votes |
public static BaseDSL.ViewClassResult navigationMenuView() { return BaseDSL.v(NavigationMenuView.class); }
Example #8
Source File: DesignDSL.java From anvil with MIT License | 4 votes |
public static Void navigationMenuView(Anvil.Renderable r) { return BaseDSL.v(NavigationMenuView.class, r); }