How to set text to view from drawer header layout in navigation drawer without inflating view

u get navigation header view by navigationView.getHeaderView(0) just try below code it works!

 

person shubham sharmaaccess_time November 7, 2016launch Read More

How to use putExtra() and getExtra() for string data

Use this to “put” the file…

  Then, to retrieve the value try something like:

 

person shubham sharmaaccess_time November 7, 2016launch Read More

How get the thumbnail from YouTube

For example your youtube video url is as below.

  In this url parameter v=Rxo0Upfz48Q stands for video id. So, in above url videoID isRxo0Upfz48Q You can get videoID using below code.

  Now using videoID you can make url to get first frame of that youtube video like below.

  Now […]

person shubham sharmaaccess_time October 25, 2016launch Read More

Android download and save image through Picasso

1. Make sure you have picasso in your gradle build file’s dependencies tag.

2. To use the Picasso for saving image file, you need to define a Target class. This method creates a target object that you can use with Picasso. Target is an interface defined in Picasso’s library. You can define this method […]

person shubham sharmaaccess_time October 25, 2016launch Read More

Open Intent

WebBrowser

YouTube

 

person shubham sharmaaccess_time October 24, 2016launch Read More

shared preference

============================================= Setting values in Preference:

  Retrieve data from preference:

Android SharedPreferences in Fragment

 

person shubham sharmaaccess_time October 24, 2016launch Read More

Open YouTube Intent

 

person shubham sharmaaccess_time October 18, 2016launch Read More

How do I change the android actionbar title and icon

This is very simple to accomplish If you want to change it in code, call:

  And set the values to whatever you please. Or, in the Android manifest XML file:

  To enable the back button in your app use:

  The code should all be placed in your onCreate so […]

person shubham sharmaaccess_time October 15, 2016launch Read More