0
因此,當我將我的應用程序放到我的平板電腦上時,佈局很不方便,並且左上角我不確定爲什麼,但在預覽中它的完美位置是我的代碼,請幫助。對不起,沒有問題。我有點新應用程序佈局錯誤
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context="com.app.thestickermafia.tsm.TSMCatagory"
android:background="@drawable/bg">
<ImageButton
android:id="@+id/A_F"
android:layout_width="240dp"
android:layout_height="240dp"
app:srcCompat="@drawable/green"
tools:layout_editor_absoluteX="50dp"
tools:layout_editor_absoluteY="88dp" />
<ImageButton
android:id="@+id/G_M"
android:layout_width="240dp"
android:layout_height="240dp"
app:srcCompat="@drawable/green"
tools:layout_editor_absoluteX="330dp"
tools:layout_editor_absoluteY="88dp" />
<ImageButton
android:id="@+id/N_S"
android:layout_width="240dp"
android:layout_height="240dp"
app:srcCompat="@drawable/green"
tools:layout_editor_absoluteX="50dp"
tools:layout_editor_absoluteY="351dp" />
<ImageButton
android:id="@+id/T_Z"
android:layout_width="240dp"
android:layout_height="240dp"
app:srcCompat="@drawable/green"
tools:layout_editor_absoluteX="330dp"
tools:layout_editor_absoluteY="350dp" />
<ImageButton
android:id="@+id/Font"
android:layout_width="521dp"
android:layout_height="200dp"
app:srcCompat="@drawable/orange"
tools:layout_editor_absoluteX="50dp"
tools:layout_editor_absoluteY="610dp" />
<SearchView
android:id="@+id/search_viewr"
android:layout_width="520dp"
android:layout_height="49dp"
android:iconifiedByDefault="false"
android:queryHint="Search Ghrapics"
tools:layout_editor_absoluteX="50dp"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="25dp" />
</android.support.constraint.ConstraintLayout>
你試過另一種佈局了嗎?甚至嘗試改變佈局寬度? – Sarah
向你的帖子添加屏幕截圖可以幫助我們解決你的問題。 –