2015-04-07 85 views
0

我正在操作欄中開發slide menu如何更改操作欄中箭頭的位置

我從GitHub下載了幻燈片菜單源代碼,但我無法更改操作欄圖標的位置。

操作欄位於屏幕的left,我想將它放在right.

你會如何建議我去改變*action bar icon(ex.arrow icom)*

回答

0

你需要你的幻燈片菜單從右側打開

那麼你應該做的somtthing像這樣在你的代碼:

<android.support.v4.widget.DrawerLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/drawer_layout" 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 
<!-- The main content view --> 
<FrameLayout 
    android:id="@+id/content_frame" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" /> 
<!-- The navigation drawer, setting gravity to "end" means "right" but preferabbly use "end"--> 
<ListView android:id="@+id/right_drawer" 
    android:layout_width="240dp" 
    android:layout_height="match_parent" 
    android:layout_gravity="end"  
    android:choiceMode="singleChoice" 
    android:divider="@android:color/transparent" 
    android:dividerHeight="0dp" 
    android:background="#111"/> 

當你改變你的XML這樣的,我認爲你的滑動菜單將從右側打開/關閉

謝謝

+0

謝謝。然而,我想要什麼。我不是位置列表視圖,而是改變到箭頭圖標的正確位置。你知道如何移動到箭頭圖標的正確位置嗎? – aiden