[英]My application style changes when i run it on emulator
i'm kind of knew in application developting. 我在应用程序开发方面有点了解。 I'm having trouble When i'm styling the application layout. 当我在设计应用程序布局时,我遇到了麻烦。 it looks good. 看起来不错。 good as the way i want the appliaction to be. 好像我想要的应用方式。 but when i'm trying to run it the all application messedup all jumps to the left top of the app, anyone knows why? 但是当我试图运行它时,所有应用程序messedup都会跳转到应用程序的左上角,任何人都知道为什么?
This is the layout xml code: 这是布局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>
You should check out RelativeLayout. 你应该看看RelativeLayout。 I recommend using RelativeLayout in your case. 我推荐在你的情况下使用RelativeLayout。 https://developer.android.com/guide/topics/ui/layout/relative.html You can find other tutorials as well. https://developer.android.com/guide/topics/ui/layout/relative.html您也可以找到其他教程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.