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>