SimpleSideDrawer v2!

                 adamrocker!
                 adamrocker@gmail.com!

               Mar 19th, 2013!
What’s this?!

Side Drawer library for Android!

  Easy to use! (Add only 2 lines)!
  High affinity! (Not need to extend)!
  Light weight! (Less than 11KByte)!
  OSS         ! (Apache License, v2.0)!
Demo!
Demo!
Tap!!
Demo!
Demo!
How to use?!

◆ Add only 2 lines!


public	
  void	
  onCreate(	
  Bundle	
  saved	
  )	
  {	
     public	
  void	
  onCreate(	
  Bundle	
  saved	
  )	
  {	
  
	
  	
  	
  	
  super.onCreate(	
  saved	
  );	
               	
  	
  	
  	
  super.onCreate(	
  saved	
  );	
  
	
  	
  	
  	
  setContentView(	
  R.layout.main	
  );	
       	
  	
  	
  	
  setContentView(	
  R.layout.main	
  );	
  
}	
                                                            	
  	
  	
  	
  nav	
  =	
  new	
  SimpleSideDrawer(	
  this	
  );	
  
                                                               	
  	
  	
  	
  nav.setLeCBehindContentView(	
  R.layout.leC_menu	
  );	
  
                                                               }	
  

                                                                   Easy	
  and	
  high	
  affinity	
  
                                                                             to	
  use	
  
Right side menu is also available!

◆ Add 1 more line!


public	
  void	
  onCreate(	
  Bundle	
  saved	
  )	
  {	
      public	
  void	
  onCreate(	
  Bundle	
  saved	
  )	
  {	
  
	
  	
  	
  	
  super.onCreate(	
  saved	
  );	
                	
  	
  	
  	
  super.onCreate(	
  saved	
  );	
  
	
  	
  	
  	
  setContentView(	
  R.layout.main	
  );	
        	
  	
  	
  	
  setContentView(	
  R.layout.main	
  );	
  
}	
                                                             	
  	
  	
  	
  nav	
  =	
  new	
  SimpleSideDrawer(	
  this	
  );	
  
                                                              !!	
  	
  	
  	
  nav.setLeCBehindContentView(	
  R.layout.leC_menu	
  );	
  
                                                         N EW! 	
  	
  	
  	
  nav.setRightBehindContentView(	
  R.layout.right_menu	
  );	
  
                                                                }	
  
Light weight library ever!!!

◆ less than 11KByte!




                         This PNG file size is around 82KByte!! !
How does it work!
◆ Android’s layout system!




                                           Application’s layout view !
                                           set with setContentView() method!


                                  Above!




              Decor: the base of layout!
How does it work!
◆ Remove the above layout view from the decor!




                                                 Above!




              decor = window.getDecorView();!
              above = decor.getChildAt( 0 );!
              decor.removeView( above );!
How does it work!
                                                 SimpleSideDrawer (extends FrameLayout)!
◆ Insert the behind layout view!
                                                         LinearLayout (horizontal)!


                                                   p!    RightBehindBase!
                                          =1 ! wra
                                 ! w eight
                          w ra p




                                                         Above!




      LeftBehindBase!              Spacer!
How does it work!
◆ Open the left-side menu!

                                                       RightBehindBase is GONE!


                                                   !
                                         we ight=1
                                  !
                         w ra p




                                                        Above!




     LeftBehindBase!                  Spacer!
How does it work!
  ◆ Open the right-side menu!



                                                     RightBehindBase!
                                             wrap!
                                       =1!
                                w eight
LeftBehindBase is GONE!




                                                     Above!
How does it work!
◆ Control drag action!




                                         Handling the touch event!




                              Overlay!
Structure of SimpleSideDrawer!




   Original!    Using SimpleSideDrawer library!
Thank you!

What’s SimpleSideDrawer?!
>> Side Drawer library for Android!

Features:!
   Easy to use! (Add only 2 lines)!
   High affinity! (Not need to extend)!
   Light weight! (Less than 11KByte)!
   OSS         ! (Apache License, v2.0)!


              https://github.com/adamrocker/simple-side-drawer!

More Related Content

PDF
ボクスケ 3Dプリントできる3Dデータ作成Android/iOSアプリ
PPTX
Fernando F. Gallego - Efficient Android Resources 101
PPTX
What's New in Android
PDF
Getting Started With Material Design
PDF
Chapt 04 user interaction
PDF
Introducing Honeycomb
PPTX
Lecture 4 display_principles
PDF
Material Design and Backwards Compatibility
ボクスケ 3Dプリントできる3Dデータ作成Android/iOSアプリ
Fernando F. Gallego - Efficient Android Resources 101
What's New in Android
Getting Started With Material Design
Chapt 04 user interaction
Introducing Honeycomb
Lecture 4 display_principles
Material Design and Backwards Compatibility

Similar to Simple side drawer2 (20)

PDF
Android Lollipop - Webinar am 11.12.2014
PDF
Ch4 creating user interfaces
PDF
Android in practice
PPTX
Lecture 4 display_principles
PDF
Android design patterns
PDF
Android 4.0 UI Design Tips
KEY
Whats New in Android
PPTX
Android App Development (Basics)
PDF
2012/02/15 Android 4.0 UI Design Tips@happy designer meetup
PDF
01 10 - graphical user interface - others
PPTX
Applico Android Info Session at Columbia University
PPT
Android ui patterns
PPT
Android ui patterns
PPTX
Android 3
PDF
[PBO] Pertemuan 12 - Pemrograman Android
KEY
Google I/O 2011, Android Honeycomb Highlights
PDF
Android Workshop - Session 2
PPTX
08ui.pptx
PPTX
MAD Unit - 3 User Interface and Data Management (Diploma IT)
Android Lollipop - Webinar am 11.12.2014
Ch4 creating user interfaces
Android in practice
Lecture 4 display_principles
Android design patterns
Android 4.0 UI Design Tips
Whats New in Android
Android App Development (Basics)
2012/02/15 Android 4.0 UI Design Tips@happy designer meetup
01 10 - graphical user interface - others
Applico Android Info Session at Columbia University
Android ui patterns
Android ui patterns
Android 3
[PBO] Pertemuan 12 - Pemrograman Android
Google I/O 2011, Android Honeycomb Highlights
Android Workshop - Session 2
08ui.pptx
MAD Unit - 3 User Interface and Data Management (Diploma IT)
Ad

Recently uploaded (20)

PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
Internet of Everything -Basic concepts details
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PPTX
Configure Apache Mutual Authentication
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions
Internet of Everything -Basic concepts details
Data Virtualization in Action: Scaling APIs and Apps with FME
Advancing precision in air quality forecasting through machine learning integ...
Comparative analysis of machine learning models for fake news detection in so...
MuleSoft-Compete-Deck for midddleware integrations
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Configure Apache Mutual Authentication
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
sustainability-14-14877-v2.pddhzftheheeeee
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Co-training pseudo-labeling for text classification with support vector machi...
Custom Battery Pack Design Considerations for Performance and Safety
Lung cancer patients survival prediction using outlier detection and optimize...
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
NewMind AI Weekly Chronicles – August ’25 Week IV
Ad

Simple side drawer2

  • 1. SimpleSideDrawer v2! adamrocker! [email protected]! Mar 19th, 2013!
  • 2. What’s this?! Side Drawer library for Android! Easy to use! (Add only 2 lines)! High affinity! (Not need to extend)! Light weight! (Less than 11KByte)! OSS ! (Apache License, v2.0)!
  • 7. How to use?! ◆ Add only 2 lines! public  void  onCreate(  Bundle  saved  )  {   public  void  onCreate(  Bundle  saved  )  {          super.onCreate(  saved  );          super.onCreate(  saved  );          setContentView(  R.layout.main  );          setContentView(  R.layout.main  );   }          nav  =  new  SimpleSideDrawer(  this  );          nav.setLeCBehindContentView(  R.layout.leC_menu  );   }   Easy  and  high  affinity   to  use  
  • 8. Right side menu is also available! ◆ Add 1 more line! public  void  onCreate(  Bundle  saved  )  {   public  void  onCreate(  Bundle  saved  )  {          super.onCreate(  saved  );          super.onCreate(  saved  );          setContentView(  R.layout.main  );          setContentView(  R.layout.main  );   }          nav  =  new  SimpleSideDrawer(  this  );   !!        nav.setLeCBehindContentView(  R.layout.leC_menu  );   N EW!        nav.setRightBehindContentView(  R.layout.right_menu  );   }  
  • 9. Light weight library ever!!! ◆ less than 11KByte! This PNG file size is around 82KByte!! !
  • 10. How does it work! ◆ Android’s layout system! Application’s layout view ! set with setContentView() method! Above! Decor: the base of layout!
  • 11. How does it work! ◆ Remove the above layout view from the decor! Above! decor = window.getDecorView();! above = decor.getChildAt( 0 );! decor.removeView( above );!
  • 12. How does it work! SimpleSideDrawer (extends FrameLayout)! ◆ Insert the behind layout view! LinearLayout (horizontal)! p! RightBehindBase! =1 ! wra ! w eight w ra p Above! LeftBehindBase! Spacer!
  • 13. How does it work! ◆ Open the left-side menu! RightBehindBase is GONE! ! we ight=1 ! w ra p Above! LeftBehindBase! Spacer!
  • 14. How does it work! ◆ Open the right-side menu! RightBehindBase! wrap! =1! w eight LeftBehindBase is GONE! Above!
  • 15. How does it work! ◆ Control drag action! Handling the touch event! Overlay!
  • 16. Structure of SimpleSideDrawer! Original! Using SimpleSideDrawer library!
  • 17. Thank you! What’s SimpleSideDrawer?! >> Side Drawer library for Android! Features:! Easy to use! (Add only 2 lines)! High affinity! (Not need to extend)! Light weight! (Less than 11KByte)! OSS ! (Apache License, v2.0)! https://github.com/adamrocker/simple-side-drawer!