@Override public void onResume() { L.i(TAG, "onResume"); super.onResume(); if (mRecyclerView != null) { LogUtils.i(TAG, "recyclerView != null"); View view = mRecyclerView.findViewById(R.id.viewPager); if (view != null) { LogUtils.i(TAG, "MyViewPager startAutoScroll"); ((MyViewPager) view).startAutoScroll(); } } }
private static File getExternalCacheDir(Context context) { File dataDir = new File(new File(Environment.getExternalStorageDirectory(), "Android"), "data"); File appCacheDir = new File(new File(dataDir, context.getPackageName()), "cache"); if (!appCacheDir.exists()) { if (!appCacheDir.mkdirs()) { L.w("Unable to create external cache directory"); return null; } try { new File(appCacheDir, ".nomedia").createNewFile(); } catch (IOException e) { L.i("Can't create \".nomedia\" file in application external cache directory"); } } return appCacheDir; }
private void log(String message, Object... args) { if (loggingEnabled) L.i(message, args); }