Santhosh
Santhosh

Reputation: 1962

How to integrate Navigation drawer with out using support library

I am targeting my app to only Android 4.4 version.

  1. How to integrate Navigation Drawer with out using support libray/jar?
  2. If no, is there any reason why Android people not integrated Navigation Drawer control in Android latest verions eg: 4.4 API itself.

Upvotes: 0

Views: 178

Answers (1)

Budimir Grom
Budimir Grom

Reputation: 766

I am looking for a solution myself, mainly because this library is really huge. More than 1.5 MB to my otherwise less then 200 kB app. Unbearable. Hence, I can't agree with accepted answer to the question Piyush pointed out, but it's a good way, as there was one good answer. Here's which and why...

If you only need DrawerLayout, you don't have to use entire support library. In my opinion, you really shouldn't. Don't reinvent the wheel, but also don't use truck wheels for a bicycle.

You may extract DrawerLayout from support library: here. Beware imported classes will make this quite a bit more than one copy/paste sequence (edit: 75 files for API 20, to be precise). So it makes sense only if you're really saving space, making a small app. I saved around 900 kB.

Upvotes: 1

Related Questions