1

ここに画像の説明を入力

android:theme="@android:style/Theme.Holo.Light.Dialog.NoActionBar"ストレッチされた画像を使用する場合、android:theme="@android:style/Theme.NoTitleBar画像を使用する場合は完璧に表示されます。なぜこの画像がストレッチされるのですか?

<RelativeLayout
    android:id="@+id/journal_log_actionbar"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@color/transparent" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="10dp"
        android:text="@string/journal_entry"
        android:textColor="@android:color/black" />

    <Button
        android:id="@+id/journal_actionbar_menu_add"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginRight="10dp"
        android:layout_toLeftOf="@+id/journal_actionbar_menu_save"
        android:background="@drawable/btn_small_add" />

    <Button
        android:id="@+id/journal_actionbar_menu_save"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@+id/journal_actionbar_menu_delete"
        android:layout_centerVertical="true"
        android:layout_marginRight="10dp"
        android:background="@drawable/btn_small_save" />

    <Button
        android:id="@+id/journal_actionbar_menu_delete"
        android:layout_width="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_height="wrap_content"
        android:layout_marginRight="10dp"
        android:layout_centerVertical="true"
        android:background="@drawable/btn_trash" />
</RelativeLayout>

しかし、使用するandroid:theme="@android:style/Theme.NoTitleBarと、このタイプの画像が表示されます ここに画像の説明を入力

4

1 に答える 1

1

テーマを変更して試す

<RelativeLayout
android:id="@+id/journal_log_actionbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/transparent" >

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerVertical="true"
    android:layout_marginLeft="10dp"
    android:text="@string/journal_entry"
    android:textColor="@android:color/black" />

<ImageView
    android:id="@+id/journal_actionbar_menu_add"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerVertical="true"
    android:layout_marginRight="10dp"
    android:layout_toLeftOf="@+id/journal_actionbar_menu_save"
    android:src="@drawable/btn_small_add" />

<ImageView
    android:id="@+id/journal_actionbar_menu_save"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_toLeftOf="@+id/journal_actionbar_menu_delete"
    android:layout_centerVertical="true"
    android:layout_marginRight="10dp"
    android:src="@drawable/btn_small_save" />

于 2013-01-11T07:27:17.687 に答える