@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_single_pane);
Toolbar toolbar = (Toolbar) findViewById(R.id.app_toolbar);
setSupportActionBar(toolbar);
if (savedInstanceState == null) {
FragmentManager.enableDebugLogging(true);
getSupportFragmentManager().beginTransaction()
.add(R.id.container, SampleListFragment.newInstance(), SampleListFragment.TAG)
.commit();
}
// http response cache
File httpCacheDir = new File(getCacheDir(), "http");
long httpCacheSize = 100 * 1024 * 1024; // 100 MiB
try {
HttpResponseCache.install(httpCacheDir, httpCacheSize);
} catch (IOException e) {
Log.i(SampleListActivity.class.getSimpleName(), "HTTP response cache installation failed:" + e);
}
}
SampleListActivity.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:StreamAds-Android
作者:
评论列表
文章目录