I am trying to implement Navigation Drawer in the style of Material Design, but for some reason it is shifting down a bit. What could be the problem?

enter image description here

<RelativeLayout 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" tools:context=".MainActivity" android:id="@+id/relative_activity" android:background="@color/material_drawer_background"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="4dp" android:minHeight="?attr/actionBarSize" android:paddingTop="@dimen/tool_bar_top_padding" android:transitionName="actionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark" android:background="@color/material_drawer_primary"/> </RelativeLayout> 

////

 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Инициализируем Toolbar Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); .... } 

Closed due to the fact that off-topic participants pavlofff , user26699, PashaPash , null , DeKaNszn 24 May '15 at 8:45 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - pavlofff, Community Spirit, PashaPash, null, DeKaNszn
If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    Remove android:paddingTop="@dimen/tool_bar_top_padding" from Toolbar android:paddingTop="@dimen/tool_bar_top_padding"

    • Exactly, thanks! - compl