そのため、シリアル経由で arduino と通信するための Android アプリを作成しています。順調に進んでいますが、レイアウトに問題があります。TextView
上も下も重なっているのですが、原因がわかりません!
https://www.dropbox.com/s/jaz8vbx63kd25ix/Screenshot_2012-09-27-18-53-24.png
ここに私のmain.xmlがあります:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="20dp" >
<TextView
android:id="@+id/demoTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<ScrollView
android:id="@+id/demoScroller"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/demoText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:typeface="monospace" />
</ScrollView>
<RelativeLayout
android:id="@+id/send"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
>
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/sendButton"
android:ems="10"
android:hint="@string/send_text"
android:inputType="text"
android:singleLine="true" >
</EditText>
<Button
android:id="@+id/sendButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="Button" />
</RelativeLayout>
</FrameLayout>
前もって感謝します。