Стили Android: разница между 'style = “@ android: style / XYZ”' и 'style = “? Android: attr / XYZ”'?

Я пытаюсь стилизовать кнопки, чтобы они выглядели так, как я спрашиваю вСтиль Android ICS для полной ширины Минималистские нижние кнопкиПросмотры.

Я успешно выполнил следующий xml для всех, кто заинтересовался:

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="bottom"
        android:divider="@android:drawable/divider_horizontal_dark"
        android:gravity="bottom"
        android:orientation="vertical"
        android:paddingTop="16dip"
        android:showDividers="beginning|end" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:measureWithLargestChild="true"
            android:orientation="horizontal"
            android:divider="@android:drawable/divider_horizontal_dark"
            android:showDividers="middle" >                             


            <Button
                android:id="@+id/cancel_button"
                style="?android:attr/buttonBarButtonStyle"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_gravity="left"
                android:layout_weight="1"
                android:maxLines="2"
                android:text="@string/cancel_button" />

            <Button
                android:id="@+id/login_button"
                style="?android:attr/buttonBarButtonStyle"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:layout_weight="1"
                android:filterTouchesWhenObscured="true"
                android:maxLines="2"
                android:text="@string/login_button" />

        </LinearLayout>
    </LinearLayout>

Хотя один вопрос. Помощник по содержанию затмения понятия не имеет, что происходит со следующим разрешением ресурса:

style="?android:attr/buttonBarButtonStyle"

Я знаком с типичным разрешением (о котором знает помощник по контенту затмения)

style=@android/style/...

... но мне не ясно различие между ними. Кажется, что некоторые атрибуты стиля появляются в одном, а не в другом. Например, следующее ни к чему не приводит:

style=@android:attr/buttonBarStyle

и не делает этого:

style="@android:style/buttonBarStyle

Итак, я думаю, два вопроса здесь:

Why the difference in resource referencing syntax? Why the confusing miscategorization of styles in under an attr category. What is the attr category even used for again?

Спасибо!

Ответы на вопрос(2)

Ваш ответ на вопрос