我正在使用minSdkVersion ="14"和targetSdkVersion ="17"开始一个新的应用程序.它包含一个6页的viewpager.有3个网页浏览量和3个其他视图.
当我通过单击后退或主页按钮将我的应用程序推送到后台时,它在"缓存后台进程"中使用大约40MB,我不明白为什么.
这是我的一个webview的示例:
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.RelativeLayout;
public class Presentation extends Fragment {
boolean isOption = false;
RelativeLayout main = null;
WebView web_main = null;
public Presentation () {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
main = (RelativeLayout) inflater.inflate(R.layout.webview, container, false);
return main;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onActivityCreated(savedInstanceState);
web_main = …Run Code Online (Sandbox Code Playgroud)