Как получить "?android:attr/actionBarSize" с помощью библиотеки совместимости

Я пытаюсь использовать Fragments и ActionBar в проекте Android 2.2. Возникает ошибка при использовании "?android:attr/actionBarSize", как правильно получить и установить это значение?

Пример:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/frags">

    <fragment class="com.example.android.hcgallery.TitlesFragment"
            android:id="@+id/frag_title"
            android:visibility="gone"
            android:layout_marginTop="?android:attr/actionBarSize"
            android:layout_width="@dimen/titles_size"
            android:layout_height="match_parent" />

    <fragment class="com.example.android.hcgallery.ContentFragment"
            android:id="@+id/frag_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

</LinearLayout>

Ошибка: Не найден ресурс, соответствующий заданному имени (в 'layout_marginTop' со значением '?android:attr/actionBarSize').

8
задан PH7 14 October 2011 в 04:25
поделиться