2017-05-16 7 views
1

私はアプリケーションの開発に精通しています。 私は問題を抱えています。私はアプリケーションのレイアウトをスタイリングしています。それはよさそうだ。私は服従が欲しいと思うように良い。 しかし、私はそれを実行しようとしているすべてのアプリケーションmessedupは、すべてのアプリの左上にジャンプ、誰もがなぜ知っている? IMG 1エミュレータで実行するとアプリケーションのスタイルが変わります

IMG 2

これは、レイアウト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> 

答えて

0

あなたはRelativeLayoutをチェックアウトする必要があります。あなたのケースではRelativeLayoutの使用をお勧めします。 https://developer.android.com/guide/topics/ui/layout/relative.html他のチュートリアルもあります。

+1

ありがとう:D。 –

+0

助けがあれば正解と記入してください。 –

関連する問題