Tôi có thể định vị điều hướng danh sách thanh tác vụ ở bên phải như thế nào?
Hình ảnh này thể hiện những gì tôi cần làm. Tôi cần trình đơn thả xuống để luôn ở bên trái bên cạnh biểu tượng menu mục bổ sung
Tôi làm cách nào để thực hiện việc này?
styles.xml My
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Variation on the Holo Light theme that styles the Action Bar -->
<style name="Theme.AndroidDevelopers" parent="Theme.Sherlock.Light">
<item name="android:actionBarItemBackground">@drawable/ad_selectable_background</item>
<item name="actionBarItemBackground">@drawable/ad_selectable_background</item>
<item name="android:popupMenuStyle">@style/MyPopupMenu</item>
<item name="popupMenuStyle">@style/MyPopupMenu</item>
<item name="android:dropDownListViewStyle">@style/MyDropDownListView</item>
<item name="dropDownListViewStyle">@style/MyDropDownListView</item>
<item name="android:actionBarTabStyle">@style/MyActionBarTabStyle</item>
<item name="actionBarTabStyle">@style/MyActionBarTabStyle</item>
<item name="android:actionDropDownStyle">@style/MyDropDownNav</item>
<item name="actionDropDownStyle">@style/MyDropDownNav</item>
<item name="android:listChoiceIndicatorMultiple">@drawable/ad_btn_check_holo_light</item>
<item name="android:listChoiceIndicatorSingle">@drawable/ad_btn_radio_holo_light</item>
<!-- <item name="android:actionOverflowButtonStyle">@style/MyOverflowButton</item> -->
</style>
<!-- style the overflow menu -->
<style name="MyPopupMenu" parent="Widget.Sherlock.Light.PopupMenu">
<item name="android:popupBackground">@drawable/ad_menu_dropdown_panel_holo_light</item>
</style>
<!-- style the items within the overflow menu -->
<style name="MyDropDownListView" parent="Widget.Sherlock.ListView.DropDown">
<item name="android:listSelector">@drawable/ad_selectable_background</item>
</style>
<!-- style for the tabs -->
<style name="MyActionBarTabStyle" parent="Widget.Sherlock.Light.ActionBar.TabBar">
<item name="android:background">@drawable/actionbar_tab_bg</item>
</style>
<!-- style the list navigation -->
<style name="MyDropDownNav" parent="Widget.Sherlock.Light.Spinner.DropDown.ActionBar">
<item name="android:background">@drawable/ad_spinner_background_holo_light</item>
<item name="android:popupBackground">@drawable/ad_menu_dropdown_panel_holo_light</item>
<item name="android:dropDownSelector">@drawable/ad_selectable_background</item>
</style>
<!--
the following can be used to style the overflow menu button
only do this if you have an *extremely* good reason to!!
-->
<!--
<style name="MyOverflowButton" parent="Widget.Sherlock.ActionButton.Overflow">
<item name="android:src">@drawable/ic_menu_view</item>
<item name="android:background">@drawable/action_button_background</item>
</style>
-->
<style name="customRatingBar" parent="@android:style/Widget.RatingBar">
<item name="android:progressDrawable" >@drawable/custom_ratingbar</item>
<item name="android:indeterminateDrawable">@drawable/money_off</item>
<item name="android:minHeight">10dip</item>
<item name="android:maxHeight">15dip</item>
<item name="android:scaleType">centerInside</item>
</style>
</resources>
tôi đã kết thúc sử dụng phương pháp này. Mặc dù nó cũng khá khó chịu vì bạn cũng phải đặt tiêu đề bằng tay ... – Joris
Tôi đã thử mọi cách để biết cách xem bên phải, nhưng vẫn không làm cho nó hoạt động được. Chúng tôi đang nói về bố cục của Chế độ xem hành động, đúng không? https://stackoverflow.com/questions/22991399/align-custom-spinner-to-the-right-actionbar-compat – ThomQ