How to load fragment data only when its tab is clicked in PagerSlidingTabStrip

You could override setUserVisibleHint event of the fragment to know if its visible to the user and then load your data. something like following: boolean _areLecturesLoaded = false; @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); if (isVisibleToUser && !_areLecturesLoaded ) { loadLectures(); _areLecturesLoaded = true; } }

Importing Facebook library in Android Studio: Could not find property ‘ANDROID_BUILD_SDK_VERSION’

First of all, you can add this dependency to your project, without compiling the lib locally. dependencies { compile ‘com.astuetz:pagerslidingtabstrip:1.0.1’ } Otherwise if you would like to compile this lib locally, you have to define these keys in gradle.properties in the root. ANDROID_BUILD_TARGET_SDK_VERSION=19 ANDROID_BUILD_TOOLS_VERSION=19 ANDROID_BUILD_SDK_VERSION=19

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)