1

Good day everyone! I want to know why did my linear layout have margin in left? I want to set the linear layout, in the end of the left screen of the device. enter image description here

<android.support.constraint.ConstraintLayout 
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_alignParentBottom="true">

  <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      android:layout_margin="0dp"
      android:layout_alignParentBottom="true">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:background="#32333D"
        app:layout_collapseMode="pin"
        app:layout_scrollFlags="scroll|enterAlways"
        app:popupTheme="@style/AppTheme">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">
                <TextView
                    android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:text="Hello"/>
            </LinearLayout>

     </android.support.v7.widget.Toolbar>

   </RelativeLayout>

</android.support.constraint.ConstraintLayout>
Mayank Bhatnagar
  • 1,316
  • 2
  • 13
  • 21
No Name
  • 472
  • 1
  • 6
  • 19
  • You're using a Toolbar. There's a label for the app name inside the toolbar which probably causes that space. Try using another container (if you really need one) or please explain why you're using the toolbar widget in that place – Capricorn Jul 14 '18 at 12:46
  • Already solve it by this link. https://stackoverflow.com/questions/34874803/linearlayout-inside-a-toolbar-is-not-matching-parent thanks. – No Name Jul 16 '18 at 03:37

0 Answers0