Errors implementing splash screen for webview

oyjul47

New Member
I'm trying to implement a splash screen for my webview android app, so that it will display until the page is fully loaded. I was using the code from the accepted answer here but am running into some errors that I'm not sure how to solve. I assume that I'm missing a library of some sort, but I have no idea what.The errors I'm getting are:\[quote\] View cannot be resolved to a variable error: Error: No resource found that matches the given name (at 'src' with value @drawable/vert_loading')\[/quote\]The code where I'm getting the view errors is:\[code\]webview = (WebView) findViewById(R.id.webview); webview.getSettings().setJavaScriptEnabled(true); webview.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { findViewById(R.id.imageLoading1).setVisibility(View.GONE); findViewById(R.id.webview).setVisibility(View.VISIBLE); } });\[/code\]While my layout xml file is:\[code\]<ImageView android:id="@+id/imageLoading1" android:layout_height="fill_parent" android:layout_width="fill_parent" android:visibility="visible" android:src="http://stackoverflow.com/questions/10804157/@drawable/vert_loading"/>\[/code\]My assumption is that I might be missing an import of some sort, but I wouldn't know which one. The ones I have are:\[code\]import android.app.Activity;import android.os.Bundle;import android.view.KeyEvent;import android.webkit.WebView;import android.webkit.WebViewClient;\[/code\]Any help would be greatly appreciated.
 
Back
Top