代码之家  ›  专栏  ›  技术社区  ›  Cheticamp

Android Studio布局编辑器中的9补丁可绘制显示错误

  •  0
  • Cheticamp  · 技术社区  · 4 年前

    这个问题在“Android Studio Bumblebee 2121.1.1 |补丁2”中仍然存在这是fidelity Android Studio与Android设备/模拟器的问题吗?


    enter image description here

    以下是布局的XML:

    <androidx.constraintlayout.widget.ConstraintLayout 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:backgroundTint="@android:color/darker_gray">
    
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/bubble"
            android:text="X"
            android:textSize="24sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"/>
    
    </androidx.constraintlayout.widget.ConstraintLayout>
    

    下面是它在运行API 29的模拟器上的外观:

    enter image description here

    这就是我所期望的。但布局编辑器中的外观如下:

    enter image description here

    0 回复  |  直到 3 年前
    推荐文章