Ich verwende eine BottomNavigationBar und LinearLayout als erste Layout-Registerkarte, aber dieser unerwartete Rand an der Spitze zeigt, dass ich meine Dimensionen bereits auf 0dp geändert hat, aber nichts ändert.LinearLayout unerwarteten Rand an der Spitze
Das ist mein Haupt Fragment
<LinearLayout 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/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:id="@+id/controlView"
android:layout_width="match_parent"
android:layout_height="16dp" />
<FrameLayout
android:id="@+id/content_frag"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/colorPrimaryDark"
app:menu="@menu/navigation" />
</LinearLayout>
Eigentlich gibt es zwei Layouts die gleiche Marge Problem haben und dies ist einer von ihnen
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/grey_300">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@drawable/gcover"
android:id="@+id/relativeLayout">
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/profPhoto"
android:clickable="true"
android:layout_width="120dp"
android:layout_height="120dp"
android:padding="20dp"
android:src="@drawable/default_prof"
android:scaleType="centerCrop"
app:civ_border_color="@color/trans"
app:civ_border_width="2dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical">
<android.support.v7.widget.AppCompatButton
android:id="@+id/prof_invite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="150dp"
android:layout_marginTop="2dp"
android:background="@color/green_300"
android:drawableLeft="@drawable/icon1"
android:padding="12dp"
android:text="invite friends" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/prof_conf"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="150dp"
android:layout_marginTop="2dp"
android:background="@color/ball_D"
android:drawableLeft="@drawable/icon2"
android:padding="12dp"
android:text="settings" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/prof_out"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="150dp"
android:layout_marginTop="2dp"
android:background="@color/colorPrimaryDark"
android:drawableLeft="@drawable/icon"
android:padding="12dp"
android:text="log out" />
</LinearLayout>
Post Screenshot für die gleiche –
Screenshot hinzugefügt – GGWP