【发布时间】:2014-02-07 13:30:35
【问题描述】:
我正在使用此代码在加载时显示资产文件夹中的图像,但问题是,图像仅在应用程序启动时的第一次加载时显示,这是因为显示的图像吃掉了背景我的应用程序,因此,它是不可见的。我想在 webview 屏幕上显示它。
public void onPageFinished(WebView view, String url) {
//hide loading image
findViewById(R.id.imageLoading1).setVisibility(View.GONE);
//show webview
findViewById(R.id.webView1).setVisibility(View.VISIBLE);
}
<ImageView android:id="@+id/imageLoading1"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:visibility="visible"
android:src="@drawable/logo"
/>
【问题讨论】:
-
请发布您的 xml - 布局