第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何設(shè)置導(dǎo)航抽屜從右到左打開

如何設(shè)置導(dǎo)航抽屜從右到左打開

胡子哥哥 2019-07-26 15:29:51
如何設(shè)置導(dǎo)航抽屜從右到左打開首先我知道這個(gè)問題出現(xiàn)在這里之前,但在嘗試了很多之后我仍然沒有成功。我從Android Developers網(wǎng)站開始研究這個(gè)例子 。我正在嘗試將菜單設(shè)置為從右到左打開,而不是在示例中如何實(shí)現(xiàn)(從左到右)。此外,我想將打開菜單按鈕移動(dòng)到操作欄的右側(cè)。我也在這里提出了一些答案,例如在這個(gè)答案中。我嘗試改變視圖和布局的重力,但我得到錯(cuò)誤:沒有抽屜視圖發(fā)現(xiàn)絕對(duì)重力LEFT你可以幫我弄清楚我的代碼中有什么問題,為了設(shè)置菜單從右邊打開,我應(yīng)該改變什么,并將操作欄按鈕移動(dòng)到右側(cè)?xml代碼在這里:<android.support.v4.widget.DrawerLayout      xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/drawer_layout"     android:layout_gravity="right"     android:layout_width="match_parent"     android:layout_height="match_parent" >     <FrameLayout         android:id="@+id/content_frame"         android:layoutDirection="rtl"         android:layout_width="match_parent"         android:layout_height="match_parent"         />     <ListView android:id="@+id/left_drawer"         android:layout_width="200dp"         android:layout_height="match_parent"         android:layout_gravity="right"         android:choiceMode="singleChoice"         android:divider="@android:color/transparent"         android:dividerHeight="10dp"         android:background="#111"/></android.support.v4.widget.DrawerLayout>
查看完整描述

3 回答

?
翻閱古今

TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超5個(gè)贊

將此代碼添加到清單:

<application android:supportsRtl="true">

然后在Oncreate上編寫此代碼:

getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);

這個(gè)對(duì)我有用。;)


查看完整回答
反對(duì) 回復(fù) 2019-07-26
  • 3 回答
  • 0 關(guān)注
  • 570 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)