Android Studio在版本3.3中的布局编辑器中禁用了textview周围的阴影

问题描述:

TextView的左侧和右侧在Android Studio 3.3中的LinearLayout中包裹着一个奇怪的阴影.安装后,该阴影不会出现在设备中,而只会出现在编辑器中.这是Android Studio中某些指示的错误还是新功能?如果这是一项功能,是否有办法将其禁用?

There is a weird shadow at the left and right of TextView when it is wrapped with in LinearLayout in android studio 3.3 . This shadow does not appear in device after installation , it only appears in editor . Is this a bug or new feature for some indication in android studio ? If this is a feature , Is there a way to disable it ?

test.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

<LinearLayout android:layout_width="wrap_content"
              android:layout_height="wrap_content">

    <TextView android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Shadow Appear"/>
</LinearLayout>
</RelativeLayout>

阴影在预览时只是突出显示LinearLayout方向,而不是在安装应用程序时突出显示.

The shadow is just to highlight LinearLayout orientation while in preview and not when the app is installed.

LinearLayout具有两个方向选项:horizontal& vertical.默认情况下,如果未声明,则将方向视为horizontal,从而在两个垂直端都显示阴影.同样,当我们将方向声明为vertical时,它在两个水平端都显示阴影.

LinearLayout has two options for orientation: horizontal & vertical. By default, if not declared, the orientation is considered as horizontal, thus showing the shadow at both the vertical ends. Similarly, when we declare orientation as vertical, it shows shadows at both the horizontal ends.

到目前为止,我还没有找到禁用它的方法.可能是AS 3.3没有提供它.我仍然会尝试查找是否可以禁用阴影.

I haven't found a way to disable it till now. Probably AS 3.3 does not provide it. I'll still try to find and see if I can disable shadows .