Material Design 2


 

  1. RecyclerView
  2. CardView
  3. ToolBar
  4. ToolBar Customizing
  5. ToolBar Hiding on Scroll
  6. CollapsingToolBarLayout
  7. SwipeRefreshLayout
  8. FloatingActionButton
  9. NavigationDrawer
  10. Floating Labels
  11. SnackBar
  12. Material Tabs
  13. Bottom Sheets
  14. Vector Drawable
  15. DayNight Theme

 

1. RecyclerView

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> layout -> Create new xml, listitem_row.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open src -> package -> Create new class MyAdapter.java and add following code :

Step 6 : Open src -> package -> Create new class RecyclerItemClickListener.java and add following code :

Step 7 : Open src -> package -> Create new class .java and add following code :

Step 8 : Open AndroidManifest.xml and add following code :

Step 9 : Open build.gradle (Module: app) file and add following code :

ScreenShot:

recycler_view recycler_view2

Download SourceCode

 

 

2. CardView

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> layout -> Create new xml, listitem_row.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open src -> package -> Create new class MyAdapter.java and add following code :

Step 6 : Open src -> package -> Create new class NumberHelper.java and add following code :

Step 7 : Open AndroidManifest.xml and add following code :

Step 8 : Open build.gradle (Module: app) file and add following code :

ScreenShot:

 cardview cardview2

Download SourceCode

 

 

3. ToolBar

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> layout -> my_tool_bar.xml and add following code :

Step 4 : Open res -> values -> Create new xml, color.xml and add following code :

Step 5 : Open res -> values -> styles.xml and add following code :

Step 6 : Open src -> package -> MainActivity.java and add following code :

Step 7 : Open AndroidManifest.xml and add following code :

Step 8 : Open build.gradle (Module: app) file and add following code :

ScreenShot:

toolbar toolbar2

Download SourceCode

 

 

4. ToolBar Customizing

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> layout -> Create new xml, my_tool_bar.xml and add following code :

Step 4 : Open res -> layout -> Create new xml, search_view.xml and add following code :

Step 5 : Open res -> values -> Create new xml, color.xml and add following code :

Step 6 : Open res -> values -> styles.xml and add following code :

Step 7 : Open src -> package -> MainActivity.java and add following code :

Step 8 : Open AndroidManifest.xml and add following code :

Step 9 : Open build.gradle (Module: app) file and add following code :

ScreenShot:

toolbar_custom toolbar_custom2 toolbar_custom3 toolbar_custom4

Download SourceCode

 

 

5. ToolBar Hiding on Scroll

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> layout -> Create new xml, listitem_row.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open src -> package -> Create new class, MyAdapter.java and add following code :

Step 6 : Open src -> package -> Create new class, MyScrollListener.java and add following code :

Step 7 : Open src -> package -> Create new class, NumberHelper.java and add following code :

Step 8 : Open res -> values -> styles.xml and add following code :

Step 9 : Open AndroidManifest.xml and add following code :

Step 10 : Open build.gradle(Module: app) and add following code :

ScreenShot:

Download SourceCode

 

 

6. CollapsingToolBarLayout

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open res -> layout -> Create new xml, listitem_row.xml and add following code :

Step 4 : Open src -> package -> MainActivity.java and add following code :

Step 5 : Open src -> package -> Create new class, MyAdapter.java and add following code :

Step 6 : Open src -> package -> Create new class, NumberHelper.java and add following code :

Step 7 : Open res -> values -> styles.xml and add following code :

Step 8 : Open AndroidManifest.xml and add following code :

Step 9 : Open build.gradle(Module: app) and add following code :

ScreenShot:

Download SourceCode

 

 

7. SwipeRefreshLayout

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 : Open AndroidManifest.xml and add following code :

Step 5 : Open build.gradle (Module: app) file and add following code :

ScreenShot:

 swiperefreshlayout swiperefreshlayout2

Download SourceCode

 

 

8. FloatingActionButton

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :