android活动中的文本加载延迟

android活动中的文本加载延迟,android,Android,下面是我用来在android应用程序屏幕上显示一些信息的(onCreate)代码。此活动正在另一个活动中触发的事件上加载。问题是当加载此屏幕时。它首先加载空白屏幕,然后以延迟的形式呈现相关文本。最终用户可以注意到这种延迟,这让他们感觉屏幕加载了两次。有什么解决办法吗 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInsta

下面是我用来在android应用程序屏幕上显示一些信息的(onCreate)代码。此活动正在另一个活动中触发的事件上加载。问题是当加载此屏幕时。它首先加载空白屏幕,然后以延迟的形式呈现相关文本。最终用户可以注意到这种延迟,这让他们感觉屏幕加载了两次。有什么解决办法吗

@Override
            protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_end);
                CommonUtils.changeActionBarColor(getSupportActionBar());

                //get the respective child object which has to be displayed in the GUI
                String childObjectKey = getIntent().getStringExtra(CHILD_OBJECT_KEY);
                // Single method pop(), for both pushWeak() and pushStrong()
                endObject = (IPEnd) ASFObjectStore.getDefault().pop(childObjectKey);

                this.setTitle(endObject.getPathwayName());

                //endWebView
                WebView endWebView=(WebView)findViewById(R.id.endWebView);
                String tempEndString = HTMLConverter.changeFontSize(endObject.getEndText(), UtilConstants.GLOBAL_FONT_SIZE);
                tempEndString = HTMLConverter.changeFontFamily(tempEndString,UtilConstants.GLOBAL_FONT_FAMILY);
                endWebView.loadData(tempEndString,"text/html;charset=utf-8","UTF-8");

                //overall image button
                ImageButton overviewButton = (ImageButton) findViewById(R.id.endOverviewImageButton);
                overviewButton.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {

                        //showOverviewImage("Bleeding (First Trimester).jpg");
                        LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                        View view = layoutInflater.inflate(R.layout.image_popup, (ViewGroup) findViewById(R.id.popup_element));
                        Button btnClosePopup = (Button) view.findViewById(R.id.cancel_button);
                        String imageFileName = endObject.getPathwayName()+ UtilConstants.IMAGE_FILE_EXTENSION;

                        CommonUtils utils = new CommonUtils();
                        utils.showOverviewImage(imageFileName, getWindowManager(), getApplicationContext(), layoutInflater, view,End.this);
                    }
                });

            }


此延迟似乎是由活动中包含的Web视图造成的。此屏幕中使用了多个Web视图。他们正在花时间加载文本。此延迟似乎是由活动中包含的Web视图造成的。此屏幕中使用了多个Web视图。他们正在花时间加载文本。