0
Как изменить высоту растрового изображения для пользовательского вида в панели действий?! Мой код:Android ActionBar view background height
actionbar_background
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/menu_bg"
android:tileMode="repeat"
android:antialias="true"
android:dither="false"
android:filter="false"
android:gravity="left" />
custom_actionbar.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"><RelativeLayout
android:id="@+id/background"
android:background="@drawable/actionbar_background"
android:layout_width="fill_parent"
android:layout_height="50dp">
<TextView
android:id="@+id/title_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:src="@drawable/list" />
<ImageButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="8dp"
android:background="@null"
android:src="@android:drawable/ic_menu_rotate" /></RelativeLayout></LinearLayout>
Результат
и Как должно быть
Изменение андроида: layout_height = "50dp"> в вашем custom_actionbar.xml ничего не изменит? – Machado
@Tardo Нет, это ничего не меняет – NilakArgento
Попробуйте установить пользовательский размер dp вместо android: layout_height = "wrap_content", в начале вашего custom_actionbar.xml – Machado