融雲集成5--聊天界面標題欄被頂上去 解決方法

1.AndroidManifest中設置的Activity的屬性

<activity android:name=".activity.chat.ConversationActivity"
                  android:screenOrientation="portrait"
                  android:windowSoftInputMode="stateHidden|adjustResize"
            >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />

                <data
                    android:host="com.onetoo.www.onetoo"
                    android:pathPrefix="/conversation/"
                    android:scheme="rong" />
            </intent-filter>
        </activity>

2.解決方案:在會話頁面佈局xml中,把標題欄的高度寫死:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".activity.chat.ConversationActivity"
    android:orientation="vertical"
    >

    <include
        android:id="@+id/nav_bar"
        layout="@layout/nav_bar"
        android:layout_width="match_parent"
        android:layout_height="55dp"(這裏把標題欄的高度寫死)
        />

    <fragment
        android:id="@+id/conversation"
        android:name="io.rong.imkit.fragment.ConversationFragment"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        />

</LinearLayout>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章