当它在android studio 3.3中的LinearLayout中包装时,TextView的左侧和右侧有一个奇怪的阴影.此阴影在安装后不会出现在设备中,它只出现在编辑器中.这是android studio中某些指示的错误或新功能吗?如果这是一个功能,有没有办法禁用它?
的test.xml
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:text="Shadow Appear"/>
解决方法:
阴影只是在预览时突出显示LinearLayout方向,而不是在安装应用程序时突出显示.
LinearLayout有两个方向选项:horizontal&垂直.默认情况下,如果未声明,则方向被视为水平方向,从而在垂直两端显示阴影.类似地,当我们将方向声明为垂直时,它会在两个水平端显示阴影.
到目前为止我还没有办法禁用它.可能AS 3.3没有提供它.我仍然会尝试查找并查看是否可以禁用阴影.
标签:android,android-studio,android-layout
来源: https://codeday.me/bug/20190731/1585993.html