Error On Symbol R in Android(Common Error)

Clean and rebuild your project. Select Build > Clean Project from the Android Studio toolbar, wait a few moments, and then build your project by selecting Build > Rebuild Project.


Select File > Invalidate Caches / Restart > Invalidate and Restart from Android Studio toolbar.

Multiple Fragment Attachment (Nullpointer Exception onchange Fragment multiple Click on tab change)

In this type of problem is common in Fragment replacement in Android.

	Context context;								 
        public void onAttach(Context context) {

Design not set according Devices height and width in Android

Using Display Metrics you can set android design(Layoutparams) according devices.

DisplayMetrics metrics;
int deviceHeight, deviceWidth;
metrics = new DisplayMetrics();
WindowManager wm = (WindowManager) getActivity().getSystemService(Context.WINDOW_SERVICE);
deviceHeight = metrics.heightPixels;
deviceWidth = metrics.widthPixels;

Image Loading & rotate Problem in Android.

Some time image view show black screen and image rotate. Glide library easy to load image in android.

compile 'com.github.bumptech.glide:glide:3.7.0'

try {
		.load(new File(path))

            } catch (Exception e) {

Android Developement

  • Android

  • Android Studio

  • Android development