Ted*_*ddy 13 android android-layout android-resources android-styles
我试图将按钮样式设置为我在Android Full Width ICS样式Minimalist Bottom ButtonsViews中询问的那些.
我成功了,对于任何感兴趣的人都有以下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>
Run Code Online (Sandbox Code Playgroud)
但有一个问题.eclipse内容辅助不知道以下资源解析发生了什么:
style="?android:attr/buttonBarButtonStyle"
我熟悉典型的分辨率(eclipse的内容辅助知道)
style=@android/style/...
......但我不清楚两者之间的区别.似乎某些样式属性出现在一个而不是另一个.例如,以下内容无法解决任何问题:
style=@android:attr/buttonBarStyle
这两个都没有:
style="@android:style/buttonBarStyle
所以我想这里有两个问题:
谢谢!
归档时间: |
|
查看次数: |
11082 次 |
最近记录: |