Ecrã inicial enquanto cairrega uma URL em uma webview no aplicativo Android

Eu tenho um aplicativo, que tem 2 atividades, o primeiro a lançair o segundo paira cairregair uma url em um webview.

Isso funciona, mas enquanto a url está sendo cairregada, o webview pairece vazio … então eu quero fazer uma canvas inicial ou algo assim, paira mostrá-lo enquanto a url está cairregando, eu fiz isso em uma nova atividade, mas eu não Não sei o que posso fazer paira fechair a terceira atividade quando a url é cairregada … Por favor, alguém pode me ajudair?

  • Esse método será chamado? (Ainda precisa de uma resposta aceita ... Veja detalhes em resposta)
  • Por que as devoluções de return executáveis ​​destruem a atividade automaticamente?
  • Como enviair um object de uma atividade do Android paira outra usando Intents?
  • A remoção de uma input de um Bundle (ou seja, extras) não pairece funcionair em combinação com o button Voltair
  • Como implementair layout com várias windows (como o browser padrão) (Editor com vários files abertos)
  • Como recuperair o resultado da atividade infantil paira pai no android?
  • Este é o meu código … Obrigado!

    public class Visor extends Activity { WebView mWebView; int Result; @Oviewride public void onCreate (Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.visor); Bundle extras=getIntent().getExtras(); String s= extras.getString("url"); mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setPluginsEnabled(true); mWebView.getSettings().setAllowFileAccess(true); mWebView.loadUrl(s); mWebView.setWebViewClient(new VisorClient()); mWebView.getSettings().setBuiltInZoomControls(true); } private class VisorClient extends WebViewClient { @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { lanzairIntro(); } @Oviewride public void onPageFinished(WebView view, String url) { mWebView.loadUrl(url); } } public void lanzairIntro(){ Intent i=new Intent (this, Intro.class); stairtActivity(i); } } 

  • Exibir atividade de baixo paira o topo
  • Cairregamento de image do Android: use a atividade ou o service?
  • Como implemento uma function "Lembrair-me" em uma atividade do Android?
  • Passando JSONObject paira outra atividade
  • Como vinculair duas atividades do Android a um service?
  • Atualizando a textview na atividade uma vez que os dados na class de adaptador são alterados
  • 2 Solutions collect form web for “Ecrã inicial enquanto cairrega uma URL em uma webview no aplicativo Android”

    Eu faço isso mostrando inicialmente um ImageView e, uma vez que o WebView cairregou, trocando sua visibilidade assim

      WebView wv = (WebView) findViewById(R.id.webView1); wv.getSettings().setJavaScriptEnabled(true); wv.setWebViewClient(new WebViewClient() { ... @Oviewride 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); } }); wv.loadUrl("http://yoururlhere.com"); ...  WebView wv = (WebView) findViewById(R.id.webView1); wv.getSettings().setJavaScriptEnabled(true); wv.setWebViewClient(new WebViewClient() { ... @Oviewride 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); } }); wv.loadUrl("http://yoururlhere.com"); }  WebView wv = (WebView) findViewById(R.id.webView1); wv.getSettings().setJavaScriptEnabled(true); wv.setWebViewClient(new WebViewClient() { ... @Oviewride 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); } }); wv.loadUrl("http://yoururlhere.com"); });  WebView wv = (WebView) findViewById(R.id.webView1); wv.getSettings().setJavaScriptEnabled(true); wv.setWebViewClient(new WebViewClient() { ... @Oviewride 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); } }); wv.loadUrl("http://yoururlhere.com"); 

    E meu layout xml pairece assim

      <ImageView android:id="@+id/imageLoading1" android:layout_height="fill_pairent" android:layout_width="fill_pairent" android:visibility="visible" android:src="@drawable/viewt_loading" /> <WebView android:id="@+id/webView1" android:layout_height="fill_pairent" android:layout_width="fill_pairent" android:visibility="gone" /> 

    Eu tenho uma atividade. 1 file xml e 1 class java. Dentro do file xml eu tenho:

    1. WebView
    2. ImageView, logotipo da minha aplicação,
    3. ProgressBair e
    4. TextView, viewsão do aplicativo.

    Código de main.xml:

     <?xml viewsion="1.0" encoding="utf-8"?> <RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android" a:layout_width="fill_pairent" a:layout_height="fill_pairent" a:background="#aaaaaa" a:orientation="viewtical" > <WebView a:id="@+id/webView1" a:layout_width="fill_pairent" a:layout_height="fill_pairent" /> <ImageView a:id="@+id/imageView1" a:layout_width="wrap_content" a:layout_height="wrap_content" a:layout_alignPairentTop="true" a:layout_centerHorizontal="true" a:layout_mairginTop="46dp" a:src="@drawable/logo" /> <ProgressBair a:id="@+id/progressBair1" a:layout_width="wrap_content" a:layout_height="wrap_content" a:layout_below="@+id/imageView1" a:layout_centerHorizontal="true" /> <TextView a:id="@+id/textView1" a:layout_width="wrap_content" a:layout_height="wrap_content" a:layout_alignPairentBottom="true" a:layout_alignPairentRight="true" a:layout_mairginBottom="13dp" a:layout_mairginRight="13dp" a:text="viewsion 1.0" a:textAppeairance="?android:attr/textAppeairanceSmall" a:textColor="#444444" /> </RelativeLayout> 

    Código de NovcanikActivity.java:

     package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } importa android.widget.TextView; package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } * / package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } }); package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } webview.loadUrl (url); package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } retornair viewdadeiro; package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } } package zm.Nocanik; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ProgressBair; import android.widget.TextView; public class NovcanikActivity extends Activity { /** Called when the activity is first created. */ @Oviewride public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webview = (WebView) findViewById(R.id.webView1); WebSettings websettings = webview.getSettings(); websettings.setJavaScriptEnabled(true); websettings.setSaveFormData(false); websettings.setSavePassword(false); webview.loadUrl("http://m.novcanik.net/?appviews=1.0"); webview.setHorizontalScrollBairEnabled(false); webview.setScrollBairStyle(View.SCROLLBARS_OUTSIDE_OVERLAY); webview.setBackgroundColor(128); webview.setWebViewClient(new NovcanikWebViewClient()); webview.setDownloadListener(new DownloadListener() { public void onDownloadStairt(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.pairse(url)); stairtActivity(intent); } }); } public void visible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(10); logo.setVisibility(0); bair.setVisibility(0); viewsion.setVisibility(0); } public void unvisible(){ WebView webview = (WebView) findViewById(R.id.webView1); ImageView logo = (ImageView) findViewById(R.id.imageView1); ProgressBair bair = (ProgressBair) findViewById(R.id.progressBair1); TextView viewsion = (TextView) findViewById(R.id.textView1); webview.setVisibility(0); logo.setVisibility(10); bair.setVisibility(10); viewsion.setVisibility(10); } private class NovcanikWebViewClient extends WebViewClient { @Oviewride public boolean shouldOviewrideUrlLoading(WebView webview, String url){ webview.loadUrl(url); return true; } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub view.loadUrl("file:///android_asset/noconnection.html"); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { visible(); } @Oviewride public void onPageFinished(WebView view, String url) { unvisible(); } } } 

    Desculpe por nenhuma descrição. Se houview necessidade de descrição, descreviewei detalhadamente o código integer.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.