如何禁用DrawerLayout阴影 [英] How to disable DrawerLayout Shadow

查看:805
本文介绍了如何禁用DrawerLayout阴影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图禁用DrawerLayout影子,我没有找到相关的答案。任何人都可以请协助

在此先感谢

我也试过setDrawerLayout(NULL,Gravity.Left),但它仍然无法正常工作


解决方案

  mDrawerLayout.setScrimColor(Color.TRANSPARENT);

我假设你的意思。在抽屉的影子(纸盒和背景内容之间),默认情况下禁用,可与集

  setDrawerShadow(可绘制shadowDrawable,诠释重力)
setDrawerShadow(INT渣油,诠释重力)

功能。

I am trying to disable the DrawerLayout shadow and i am not finding the relevant answer. can anyone please assist

thanks in advance

i have also tried setDrawerLayout(null,Gravity.Left) but it still does not work

解决方案

mDrawerLayout.setScrimColor(Color.TRANSPARENT);

I'm Assuming that's what you mean. The shadow on the drawers (in between the drawer and the background content) is disabled by default and can be set with the

setDrawerShadow(Drawable shadowDrawable, int gravity)
setDrawerShadow(int resId, int gravity)

functions.

这篇关于如何禁用DrawerLayout阴影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆