【发布时间】:2017-05-16 20:04:58
【问题描述】:
我有点了解应用程序开发。 我在设计应用程序布局时遇到了麻烦。这看起来不错的样子。就像我希望应用程序那样好。 但是当我尝试运行它时,所有应用程序都搞砸了,都会跳到应用程序的左上方,有人知道为什么吗?
这是布局xml代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="tech.XXX.LoginA">
<EditText
android:id="@+id/tName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Tech name"
android:inputType="textPersonName"
tools:layout_editor_absoluteX="49dp"
tools:layout_editor_absoluteY="49dp" />
<Button
android:id="@+id/bLogin"
android:layout_width="321dp"
android:layout_height="98dp"
android:elevation="0dp"
android:text="Login"
tools:layout_editor_absoluteX="32dp"
tools:layout_editor_absoluteY="151dp" />
</android.support.constraint.ConstraintLayout>
【问题讨论】:
标签: java android xml android-layout android-studio