Android 小屏幕上的ConstraintLayout(简单)

Android 小屏幕上的ConstraintLayout(简单),android,android-constraintlayout,Android,Android Constraintlayout,如您所见,在小屏幕上,最后一个文本视图被裁剪到右侧。 下面是它的外观: 我需要这样: 以下是布局源代码: <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android

如您所见,在小屏幕上,最后一个文本视图被裁剪到右侧。 下面是它的外观:

我需要这样:

以下是布局源代码:

<android.support.constraint.ConstraintLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="8dp"
    android:layout_marginTop="8dp"
    android:text="Lorem Ipsum is simply dummy text:"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="8dp"
    android:text="1234567890.1234567890"
    app:layout_constraintLeft_toRightOf="@+id/textView1"
    app:layout_constraintTop_toTopOf="parent"
    android:layout_marginTop="8dp" />

</android.support.constraint.ConstraintLayout> 

对于此问题,您可能需要创建新的自定义xml文件布局,请单击设计视图中的LayoutVariant选项,如上图所示

然后选择选项-创建其他。。最后 现在将目录名设置为custom,并选择option Available限定符,现在将维度480和800设置为如上所示

现在将texview 2设置在textView下面,如下所示


对于此问题,您可能需要创建新的自定义xml文件布局,请单击设计视图中的LayoutVariant选项,如上图所示

然后选择选项-创建其他。。最后 现在将目录名设置为custom,并选择option Available限定符,现在将维度480和800设置为如上所示

现在将texview 2设置在textView下面,如下所示


我认为用
ConstraintLayout
无法实现这一点。您可以为适合您需要的小屏幕创建另一个xml布局文件。我认为您需要的是流布局。这在本机上不受支持,但您可以找到一些实现it@Pelocho是betterYes,可能更好。有很多库可以做到这一点,而且可能有很多库比我提供的库做得更好。这就是为什么我说“例如”,我认为用
ConstraintLayout
无法实现这一点。您可以为适合您需要的小屏幕创建另一个xml布局文件。我认为您需要的是流布局。这在本机上不受支持,但您可以找到一些实现it@Pelocho是betterYes,可能更好。有很多库可以做到这一点,而且可能有很多库比我提供的库做得更好。这就是为什么我说“比如”