0
我只是新的Android應用程序開發應用程序,與Xamarin。不同位置的視圖Android設備相比,設計師屏幕與Xamarin
我的問題是,當我的設備與設計器屏幕相比時,我的視圖有不同的位置(最小和最大)。其他意見是在正確的地方。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/relativeLayout1">
<EditText
android:id="@+id/inputMin"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:background="#FFFFFF"
android:hint="Min"
android:textColor="#EF5350"
android:textColorHint="#EF5350"
android:padding="15dp"
android:layout_marginLeft="69dp"
android:layout_marginTop="140dp"
android:inputType="number"
android:gravity="center"
android:maxLength="5" />
<EditText
android:id="@+id/inputMax"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@+id/inputMin"
android:layout_below="@+id/title"
android:background="#FFFFFF"
android:hint="Max"
android:textColor="#EF5350"
android:textColorHint="#EF5350"
android:padding="15dp"
android:layout_alignBaseline="@+id/inputMin"
android:inputType="number"
android:gravity="center"
android:maxLength="5" />
我該如何解決這個問題?
非常感謝。
問候,山姆。
通常,當我們使用'layout_below'或'layout_toRightOf'等特定佈局參數時,我們不會爲現有的id添加'+'。例如:'機器人:layout_below = 「@ ID /標題」'。如果問題沒有被解決,你可以發佈整個XML代碼嗎? –
它沒有工作。我只是發佈了整個XML代碼。我不知道什麼是錯的。 –