www.androidchunk.com

Hi Developer, Please visit www.androidchunk.com for Latest Updates. Thank you!

Android Navigation Drawer [Sliding Menu] Example using Fragments

Category: Android Codez | Last Updates: 17/04/2017

Hello friends, In this section, We will learn about Android's navigation drawer, Navigation drawer or Sliding Menu is like a panel that is useful for giving options to the users. We used the fragments for handling the clicks on the navigation menu in this example.
  
src/MainActivity.java
src/HomeFragment.java

src/GalleryFragment.java

src/MoviesFragment.java
src/ToolsFragment.java

Android Resources Layout
res/layout/activity_main.xml
res/layout/app_bar_main.xml
res/layout/nav_header_main.xml

res/layout/content_main.xml

res/layout/fragment_home.xml

res/layout/fragment_gallery.xml

res/layout/fragment_movies.xml

res/layout/fragment_tools.xml

Android Resources Menu
res/menu/activity_main_drawer.xml

res/menu/main.xml
Android Resources Values
res/values/strings.xml

Output:

Android HorizontalScrollView and ViewPager together

Category: Android Codez | Last Updates: 02/03/2017



In this section we are going to see how to use HorizontalScrollView and ViewPager together.  

res/layout/activity_main.xml
src/DataModel.java
src/MyPagerAdapter.java
src/MainActivity.java

Output:

Android Horizontalscrollview with Center Lock

Category: Android Codez | Last Updates: 01/03/2017



Hi Android Developer, In this example we are going to see how to set Horizontalscrollview center locked. First we will add a Horizontalscrollview in our layout file. We took a text view which will be used to display centered item data of the HorizontalscrollviewSee below given layout file.

res/layout/activity_main.xml
Now we are going to change our java file. Please see below given java file.

src/CenterLockHorizontalScrollviewActivity.java
Output:

 

Android layout rounded corners programmatically

Category: Android Codez | Last Updates: 01/03/2017



In this tutorial we are going to learn how to implement layout's rounded corners programmatically.

res/layout/activity_main.xml

res/RoundCornerLayout.java
res/MainActivity.java
Output:


Important Shortcuts for Android Studio

Category: Android Codez | Last Updates: 24/05/2017



Hi Android Developer, In this section We are going to learn amazing stuff related to android studio. 


  • Add quickly "new blank Activity"

You can assign a shortcut for quickly adding "new blank Activity". In this tutorial we are assigned cntrl + Alt + shift + n  as hotkey for "new blank Activity". You can assign  a shortcut as per your needs. Let's start...

Open File>Settings
File>Settings

Open Keymap> and search for "Activity". Now right click on Empty Activity and click on add keyboard shortcut. (New window will appear) Set your favorite shortcut for  "new blank Activity". Click OK. Click Apply and OK. 

Done!


Set hotkey for "new blank Activity"

Some quick shortcuts(Windows):

  • Refactor/Rename: SHIFT+F6
  • Quick Fix: ALT+ENTER
  • Run: SHIFT+F10
  • Debug: SHIFT+F9
  • Go to class : CTRL + N. 
  • Go to file : CTRL + SHIFT + N.
  • Navigate to last edit location : CTRL + SHIFT + BACKSPACE
  • Format code: CTRL + ALT + L
  • Show logcat: ALT + 6
  • Duplicate Line: CTRL + D
  • Delete Line: CTRL + Y

  • Check null/not null

New stuff coming soon. Stay in touch by subscribing to our new updates...
Enjoy Fast Coding...