0

I am using eclipse and I have added support design navigation view like this

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:yourApp="http://schemas.android.com/apk/res/com.example.materialdesignexample.MainActivity"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            android:theme="@style/ThemeOverlay.AppCompat.Dark" />
    </RelativeLayout>

    <android.support.design.widget.NavigationView
        android:id="@+id/navigation_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:headerLayout="@layout/drawer_header"
        app:menu="@menu/drawer" />

</android.support.v4.widget.DrawerLayout>

    </android.support.v4.widget.DrawerLayout>

but i am getting error like this

error: No resource identifier found for attribute headerLayout in package com.example.materialdesignexample

please help me.....

javed
  • 11
  • 3

2 Answers2

0

You have to import support-v7-appcompat library from android-sdks\extras\android\support\v7\appcompat.

Create an android library project in eclipse for design support library and put the contents of directory android-sdks\extras\android\support\design in the design support library project Link appcompat-v7 library to design support library project Link support library project from your project. You can not use directly the jar android-support-design.jar because you need some resources too (this is the reason of aar format).

Jithin Sunny
  • 3,352
  • 4
  • 26
  • 42
0

editor code screenshot

add compile 'com.android.support:design:25.2.0'

Jon Saw
  • 7,599
  • 6
  • 48
  • 57
Daniel
  • 1
  • 1