该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

layout是这样写的:

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"

tools:context="com.example.lenovo.helloworld.MainActivity">

android:id="@+id/textView"

android:layout_width="0dp"

android:layout_height="wrap_content"

android:gravity="left"

tools:text="@string/text1"

android:padding="8dp"

tools:layout_constraintTop_creator="1"

tools:layout_constraintRight_creator="1"

tools:layout_constraintLeft_creator="1"

app:layout_constraintTop_toTopOf="parent"

app:layout_constraintRight_toLeftOf="@+id/button3"

app:layout_constraintLeft_toLeftOf="parent" />

android:layout_height="wrap_content"

android:layout_width="0dp"

android:inputType="text"

android:textSize="12sp"

android:id="@+id/editText"

tools:layout_constraintTop_creator="1"

tools:layout_constraintRight_creator="1"

app:layout_constraintRight_toRightOf="parent"

app:layout_constraintTop_toBottomOf="@+id/textView"

tools:layout_constraintLeft_creator="1"

app:layout_constraintLeft_toLeftOf="parent" />

android:id="@+id/button"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/butter1"

tools:layout_constraintTop_creator="1"

app:layout_constraintTop_toBottomOf="@+id/editText"

tools:layout_constraintLeft_creator="1"

app:layout_constraintLeft_toLeftOf="@+id/editText" />

android:id="@+id/button3"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/butter2"

tools:layout_constraintTop_creator="1"

android:layout_marginStart="26dp"

app:layout_constraintTop_toBottomOf="@+id/editText"

tools:layout_constraintLeft_creator="1"

app:layout_constraintLeft_toRightOf="@+id/button"

android:layout_marginLeft="26dp" />

android:id="@+id/button4"

android:src="@drawable/edocn_2010052523351201"

android:background="#000"

android:layout_height="40dp"

android:layout_width="wrap_content"

tools:layout_constraintTop_creator="1"

tools:layout_constraintRight_creator="1"

android:layout_marginEnd="14dp"

app:layout_constraintRight_toRightOf="parent"

app:layout_constraintTop_toBottomOf="@+id/button"

android:layout_marginRight="14dp" />

android:id="@+id/button5"

android:layout_height="wrap_content"

android:layout_width="wrap_content"

android:textOff="结束"

android:textOn="开始"

android:gravity="center"

tools:layout_constraintTop_creator="1"

tools:layout_constraintRight_creator="1"

app:layout_constraintRight_toRightOf="@+id/button"

android:layout_marginTop="40dp"

app:layout_constraintTop_toBottomOf="@+id/button"

tools:layout_constraintLeft_creator="1"

app:layout_constraintLeft_toLeftOf="@+id/button" />

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐