リストに項目を追加するための黒いプラスの形をしたボタンを備えたシンプルな To Do リスト アプリがあります。Android 2.2 では、黒のプラスは次のようになります。
ただし、Android 4.1 では、黒のプラスは次のようになります。
plus は 2.2 と同じように見えるはずです。適切なフラグメントの xml は次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/widget78"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:focusable="true" android:focusableInTouchMode="true">
<ListView
android:id="@+id/taskslist"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="10" />
<LinearLayout
android:id="@+id/widget83"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp">
<EditText
android:id="@+id/taskname"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/edittextbackground"
android:layout_marginBottom="0dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="2dp"
android:hint=" Add Something :)"
android:textSize="18sp"
android:windowSoftInputMode="adjustNothing"
android:cursorVisible="true"
android:textColor="#000000"
android:textCursorDrawable="@null"
android:layout_weight="9999999"/>
<!-- android:imeOptions="actionGo"
android:inputType="textImeMultiLine"
-->
<FrameLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<Button
android:id="@+id/addtask"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/small_black_plus"
android:layout_marginBottom="0dp"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:layout_marginRight="0dp"
android:text="" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
2 つのバージョンでレイアウトが異なるのはなぜですか? それらを同じように見せるにはどうすればよいですか?