這是文件 的xml
佈局在這裏,當我做出的佈局toolbar
是重疊的我textView
的內容,爲什麼發生這種情況。 已經嘗試了其他的東西,但沒有運氣.. !!!爲什麼我的工具欄與我的textView重疊?
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.alpit.formula2.MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="alpit isfdfsdfwefwes great jhfjhvjhhbnmbjk"
android:textSize="20dp" />
</RelativeLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
app:menu="@menu/navigation_menu"
>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
這是我現在的情況。
FYI:刪除'機器人:weightSum = 「1」'和設置'機器人:TEXTSIZE = 「20SP」'代替'機器人:TEXTSIZE = 「20dp」' –
使用fitSystemwindow = true –
完成,但仍然沒有改進。 –