Em terça-feira, 28 de julho de 2015 19:17:23 UTC-3, wesley lima da silva escreveu:
Boa noite,
Nesse site vê de dar uma ajuda http://developer.android.com/guide/webapps/webview.html.
Espero q essa útil
Att
Em 28/07/2015 18:57, "Pedro horlando" <xva...@gmail.com> escreveu:--Olá amigos tudo bem!Bom gostaria da ajuda de você para resolver um problema com um webview que estou fazendo onde o site tem vários videos e de play de diferentes site, porem o sempre pede para ativar javascript como mostra na foto abaixo ate a parte do flash já resolve mas esse javascript ta osso.
Meu arquivo MainActivity esta assim:
import android.app.Activity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.graphics.Bitmap;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final ProgressBar pb = new ProgressBar(this);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.CENTER;
pb.setLayoutParams(lp);
final FrameLayout fl = (FrameLayout) findViewById(R.id.frameLayout);
final WebView wv = (WebView) findViewById(R.id.webView);
wv.loadUrl("http://www.meusite.com.br");
wv.setWebViewClient(new WebViewClient(){
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon){
/*ProgressBar pb = (ProgressBar) findViewById(R.id.progress);
pb.setVisibility(View.VISIBLE);*/
fl.addView(pb);
}
@Override
public void onPageFinished(WebView view, String url){
//ProgressBar pb = (ProgressBar) findViewById(R.id.progress);
//pb.setVisibility(View.INVISIBLE);
fl.removeView(pb);
wv.setVisibility(View.VISIBLE);
}
});
}
}
Obrigado a todos
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comentários:
Postar um comentário