Is there any way to create an app with Material design in Eclipse? Hamburger to arrow animation, full screen height navigation drawer...
-
2Is there a reason you are using Eclipse and not Android Studio? – Brian S Mar 24 '15 at 19:06
-
Google first. StackOverflow second. What have you tried? Where is your code? – Jared Burrows Mar 24 '15 at 19:06
2 Answers
Yes you can create an app with material design using eclipse. Please follow each steps below carefully without any error.
Steps:
- Create a new Android Project with Target SDK version 21. If your project already exists then just change the Target SDK version.
- Add Appcompat v7 lib to your workspace and add this lib to build path of your project. You can find this lib at sdk\extras\android\support\v7.
- Set Project build target to version 21.
- There should be only 2 values folder in res folder.
- values
- values-v21
values/styles.xml should be as below.
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
....
// Your style here
</style>
values-v21/style.xml should be as below.
<style name="AppBaseTheme" parent="@android:style/Theme.Material.Light.DarkActionBar">
....
// Your style here
</style>
You can find different style attributes here https://developer.android.com/training/material/theme.html
After following above steps, your app will be ready with material design theme.
Now your second question regarding navigation drawer you can use following link for simple and step by step implementation.
Part 1 http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html4
Part 2 http://www.android4devs.com/2015/01/recycler-view-handling-onitemtouch-for.html
This implementation uses recycler view. For that you need to add recycler view lib (location - sdk\extras\android\support\v7) to your project and add it to build path.

- 2,417
- 20
- 39
-
Thanks a lot... but, I have an error: "invalid resource directory name: D:\Workspace\test2\res values-21" – Arnes Mar 25 '15 at 13:53
-
What error you are getting with values-v21? And sorry for my typing mistake. I have edited answer. @Arnes – Pooja Mar 25 '15 at 17:23
-
`No resource found that matches the given name Theme.AppCompat.Light.DarkActionBar` is saying in `styles.xml` in `values` folder. @Pooja – Arnes Mar 26 '15 at 09:54
-
-
Check 2nd answer of this question to get step 2 perform well. http://stackoverflow.com/questions/21900853/no-resource-found-theme-appcompat-light-darkactionbar @Arnes – Pooja Mar 26 '15 at 10:16
-
Ok. I did that and all went well but now when I try to create navigation drawer many complications and problems pop up. :( – Arnes Mar 26 '15 at 11:29
-
If you find navigation drawer implementation complex then try to implement according to accepted answer of this question. http://stackoverflow.com/questions/26476837/android-5-0-material-design-style-navigation-drawer-for-kitkat @Arnes – Pooja Mar 26 '15 at 11:47
-
-
-
@Pooja: but when i change the theme it showing error error: "Error retrieving parent for item: No resource found that matches the given name 'android:style/Theme.AppCompat.Light.NoActionBar'." http://stackoverflow.com/questions/30979051/style-showing-error-in-android – DKV Jun 23 '15 at 09:14
-
-
@Pooja: i already did , I am able to get the theme which you use above. my problem is on the particular theme – DKV Jun 23 '15 at 09:37
-
You can develop apps with Material Design
in Eclipse
by using the libraries provided by google. You need to follow the below steps to do that.
Properties
>Android
>Add...
>appcompat_v7
Add...
> Android Design Support Library(You canimport
it fromandroid-sdk\extras\android\support\
)Add...
>RecycleViewLibrary
&CardViewLibrary
libraries for RecycleView and cardView, better material look and feel. (You canimport
it fromandroid-sdk\extras\android\support\v7\
)Add/Edit
values\styles.xml
<style name="MyMaterialTheme.Base" parent="Base.Theme.AppCompat.Light.DarkActionBar"> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style>
Change theme in
AndroidManifest.xml
file.android:theme="@style/MyMaterialTheme"
extend your
Activity
byAppCompatActivity
.
Hope you can develop Material Designed apps in Eclipse throgh these steps.
Important: Support for the Android Developer Tools (ADT) in Eclipse is ending. You should migrate your app development projects to Android Studio as soon as possible.

- 8,211
- 4
- 42
- 56