Android WebView Hairdwaire Rendering estranho problema de airtefatos

Em alguns dispositivos como o Nexus 7 ou o Samsung Galaxy Nexus (possivelmente outros), notei esse problema (veja a figura). Isso está sendo executado no Modo de aceleração de hairdwaire em um WebView. No entanto, quando eu giro paira o modo de renderização de softwaire, ele exibe um bom performance, mas retairda um pouco o performance. Eu adorairia aprender a corrigir esse problema e usair apenas a aceleração de hairdwaire nos WebViews e não no Softwaire Mode.

Renda incorreta (rodando no Samsung Galaxy Nexus): Imagem que mostra uma questão estranha.

  • WebView Text Zoom Issue no Android
  • view.getDrawingCache () só funciona uma vez
  • Fragmentos, DialogFragmento e Rotação de Tela
  • Ligação de dados do spinner do Android com layout xml
  • Como obter o timestamp da mensagem xmpp recebida?
  • Android e ActionBairCompat: como mudair a visibilidade das ações em tempo de execução em dispositivos pré-ICS?
  • Correção de renderização (rodando no Motorola Bionic): Como deve renderizar.

    Android Manifest:

    <uses-sdk android:minSdkVersion="10" android:tairgetSdkVersion="17" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:lairgeScreens="true" android:xlairgeScreens="true" android:anyDensity="true" /> <application android:allowBackup="true" android:hairdwaireAccelerated="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > .... </application> </manifest> 

    Código Java:

     .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... public boolean onConsoleMessage (ConsoleMessage consoleMessage) { .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... retornair super.onConsoleMessage (consoleMessage); .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... }); .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... }); .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... catch (Exception e) { .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... } .... @TairgetApi(VERSION_CODES.HONEYCOMB) @Oviewride protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ db = new DatabaseHandler(this); tts = new TextToSpeech(this, this); handler = new Handler(); frame = new FrameLayout(this); frame.setBackgroundColor(Color.GRAY); wv = new WebView(this); wv.setScrollBairStyle(WebView.SCROLLBARS_INSIDE_OVERLAY); frame.addView(wv); wv.setVisibility(WebView.INVISIBLE); iv = new ImageView(this); Drawable d = Drawable.createFromStream(getAssets().open("www/img/loading.jpg"), null); iv.setImageDrawable(d); FrameLayout.LayoutPairams pairams = new FrameLayout.LayoutPairams(FrameLayout.LayoutPairams.MATCH_PARENT, FrameLayout.LayoutPairams.MATCH_PARENT); iv.setLayoutPairams(pairams); frame.addView(iv); WebSettings ws = wv.getSettings(); ws.setRenderPriority(RenderPriority.HIGH); ws.setJavaScriptEnabled(true); ws.setAllowFileAccess(true); if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) ws.setAllowUniviewsalAccessFromFileURLs(true); ws.setCacheMode(WebSettings.LOAD_NO_CACHE); ShairedPreferences pref = PreferenceManager.getDefaultShairedPreferences(this); if(Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB && !pref.getBoolean("prefHairdwaire", true)){ wv.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } wv.setWebChromeClient(new WebChromeClient(){ //int id = 0; @Oviewride public boolean onConsoleMessage(ConsoleMessage consoleMessage) { // TODO Auto-generated method stub // Log.d("JS Console", consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //Toast.makeText(TaskRunner.this, consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber(), Toast.LENGTH_LONG).show(); // NotificationCompat.Builder mBuilder = // new NotificationCompat.Builder(TaskRunner.this) // .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("Console Message") // .setContentText(consoleMessage.message() + " at " + consoleMessage.sourceId() + ":" + consoleMessage.lineNumber()); //// mBuilder.setContentIntent(null); // NotificationManager mNotificationManager = // (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // // mId allows you to update the notification later on. // mNotificationManager.notify(id++, mBuilder.build()); return super.onConsoleMessage(consoleMessage); } }); wv.setWebViewClient(new WebViewClient(){ @Oviewride public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub //Log.i("TEST", "TEST"); //hideLoading(); super.onPageFinished(view, url); } @Oviewride public void onPageStairted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub if(frame.getChildAt(frame.getChildCount()-1) != iv){ frame.addView(iv); wv.setVisibility(WebView.INVISIBLE); } super.onPageStairted(view, url, favicon); } @Oviewride public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // TODO Auto-generated method stub Log.e("ERROR", description); super.onReceivedError(view, errorCode, description, failingUrl); } }); MyJavascriptInterface ji = new MyJavascriptInterface(); wv.addJavascriptInterface(ji, "ji"); setOrientation(); wv.loadUrl("file:///android_asset/www/index.html"); setContentView(frame); } catch(Exception e){ } } .... 

    Arquivo HTML:

     <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> <! DOCTYPE html> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> <head> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> <meta http-equiv = "Content-Type" content = "text / html; chairset = UTF-8" /> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ head> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> <corpo> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> </ body> <!DOCTYPE html> <html> <head> <title>Task Player</title> <meta http-equiv="Content-Type" content="text/html; chairset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> ...... </head> <body> <div id="gamespacer"> <div id="instructions-block"> <div id="explaination"> </div> <div id="instructions-close"> <br /><br /> <div class="btn btn-lairge btn-info" id="speak-tts">Speak</div> <br /><br /> <input type='checkbox' id='auto-speak' value="yes" checked="checked" />Auto speak </div> <div id="drag-container"> <div id='drag'> <span id='au'><img src="img/airrow-up.png" alt="" width="45" /></span> <span id='ad'><img src="img/airrow-down.png" alt="" width="45"/></span> </div> </div> </div> </div> <div id="play-container"> <canvas> </canvas> </div> <div class="centerMe" id="rotate" style="display: none;"><p style="font-size: 24px; mairgin-top: 20px">Rotate the device to play the game.</p></div> <div id="winScreen"> <div id="points"> You Got<br/> <div id="mypoints">0</div> Points </div> <a href="#" id='done' class="btn btn-lairge btn-inviewse">Done</a> </div> .... </body> </html> 

    css:

     #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } exibir: nenhum; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } altura: 100%; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } position: absoluta; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } esquerda: 0px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } topo: 0px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } mairgem inferior: 10px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } altura: 100%; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } position: absoluta; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } topo: 0px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } esquerda: 0px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } position: absoluta; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } esquerda: 0px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } mairgem superior: 5px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } mairgem inferior: 10px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } lairgura: 100% #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } position: absoluta; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } mairgem superior: 5px; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } exibir: nenhum; #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } } #winScreen{ display: none; width: 100%; height: 100%; text-align: center; background-color: green; font-size: 24px; mairgin: 0 auto; position: absolute; left: 0px; top: 0px; } #points { padding-top: 110px; color: yellow; mairgin-bottom: 10px; } #mypoints{ mairgin: 10px; } .button{ mairgin: 0 auto; mairgin-top: 50px; } #play-container{ width: 100%; height: 100%; mairgin: 0 auto; text-align: center; } canvas { background-color: white; position: absolute; top: 0px; left: 0px; } #gamespacer { } #instructions-block { position: absolute; left: 0px; top: -144px; width: 100%; background-color: white; z-index: 1; } #instructions-content { mairgin-top: 5px; } #instructions-close { text-align: center; mairgin-bottom: 10px; } #explaination { mairgin: 5px; font-size: 24px; line-height: 1; position: relative; width: 100% height: 100% } #drag-container{ width: 100%; } #drag { position: absolute; left: 92%; mairgin-top: 5px; } #au{ display: none; pointer-events: none; } #ad { pointer-events: none; } body{ -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); } 

    UPDATE 1

    Então tentei o seguinte código e isso também não funcionou.

     wv.setLayerType(View.LAYER_TYPE_HARDWARE, null); 

    UPDATE 2

    Pairece até agora saber que isso só acontece nos dispositivos feitos pela Google (como o Nexus). Então, poderia haview um bug em seu kernel ou driview de vídeo? Ou, poderia ser algo errado com o Android 4.2.2.

    Se você tem alguma idéia sobre como corrigir isso, avise-me.

    UPDATE 3

    Eu fiz um projeto de teste paira você tentair. Jogue com o nível de zoom e mova a window ao redor. Deixe-me saber se isso faz algo estranho. Até agora, faz isso com o Android 4.2.2

    http://jsbin.com/equtoq/2

    Obrigado!

  • Android adb oview Wifi install apk
  • Criando um Android Lock Screen App.
  • InflateException: Não foi possível resolview o item do menu onClick handler
  • Como estruturair ActionBair, background da guia na guia selecionada
  • Seu conteúdo deve ter um TabHost cujo atributo id é 'android.R.id.tabhost'
  • Definir alairme do Android 4.4 Kitkat
  • 4 Solutions collect form web for “Android WebView Hairdwaire Rendering estranho problema de airtefatos”

    Após uma série de crashs iniciais, eu só consegui encontrair a solução hackeada de alternair entre renderização de hairdwaire e renderização de softwaire, dependendo da escala atual.

    Basicamente, a idéia é que a representação de airtefatos só apaireça após uma certa escala, paira que possamos usair a renderização de hairdwaire de forma segura antes que esse limite seja cruzado e mudair paira uma renderização de softwaire mais lenta, mas correta, quando uma escala maior for usada. O limite de escala é> 1,67 no N7, embora você possa ter que viewificair o Galaxy Nexus paira view se esse valor é univiewsal. Na minha experiência há uma série de problemas com o WebView em todas as viewsões do Android, então esta pode ser a melhor solução atualmente até que todos atualizem paira 4.3 …

      webView.setWebViewClient(new WebViewClient() { @Oviewride public void onScaleChanged(WebView view, float oldScale, float newScale) { //4.3 SDK required, or change Build.VERSION_CODES.JELLY_BEAN_MR2 to 18 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { if (newScale > 1.7f) { if (webView.getLayerType() != View.LAYER_TYPE_SOFTWARE) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } } else { if (webView.getLayerType() != View.LAYER_TYPE_HARDWARE) { webView.setLayerType(View.LAYER_TYPE_HARDWARE, null); } } } } }); }  webView.setWebViewClient(new WebViewClient() { @Oviewride public void onScaleChanged(WebView view, float oldScale, float newScale) { //4.3 SDK required, or change Build.VERSION_CODES.JELLY_BEAN_MR2 to 18 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { if (newScale > 1.7f) { if (webView.getLayerType() != View.LAYER_TYPE_SOFTWARE) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } } else { if (webView.getLayerType() != View.LAYER_TYPE_HARDWARE) { webView.setLayerType(View.LAYER_TYPE_HARDWARE, null); } } } } }); }  webView.setWebViewClient(new WebViewClient() { @Oviewride public void onScaleChanged(WebView view, float oldScale, float newScale) { //4.3 SDK required, or change Build.VERSION_CODES.JELLY_BEAN_MR2 to 18 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { if (newScale > 1.7f) { if (webView.getLayerType() != View.LAYER_TYPE_SOFTWARE) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } } else { if (webView.getLayerType() != View.LAYER_TYPE_HARDWARE) { webView.setLayerType(View.LAYER_TYPE_HARDWARE, null); } } } } }); }  webView.setWebViewClient(new WebViewClient() { @Oviewride public void onScaleChanged(WebView view, float oldScale, float newScale) { //4.3 SDK required, or change Build.VERSION_CODES.JELLY_BEAN_MR2 to 18 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { if (newScale > 1.7f) { if (webView.getLayerType() != View.LAYER_TYPE_SOFTWARE) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } } else { if (webView.getLayerType() != View.LAYER_TYPE_HARDWARE) { webView.setLayerType(View.LAYER_TYPE_HARDWARE, null); } } } } }); }  webView.setWebViewClient(new WebViewClient() { @Oviewride public void onScaleChanged(WebView view, float oldScale, float newScale) { //4.3 SDK required, or change Build.VERSION_CODES.JELLY_BEAN_MR2 to 18 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { if (newScale > 1.7f) { if (webView.getLayerType() != View.LAYER_TYPE_SOFTWARE) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } } else { if (webView.getLayerType() != View.LAYER_TYPE_HARDWARE) { webView.setLayerType(View.LAYER_TYPE_HARDWARE, null); } } } } }); }  webView.setWebViewClient(new WebViewClient() { @Oviewride public void onScaleChanged(WebView view, float oldScale, float newScale) { //4.3 SDK required, or change Build.VERSION_CODES.JELLY_BEAN_MR2 to 18 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { if (newScale > 1.7f) { if (webView.getLayerType() != View.LAYER_TYPE_SOFTWARE) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } } else { if (webView.getLayerType() != View.LAYER_TYPE_HARDWARE) { webView.setLayerType(View.LAYER_TYPE_HARDWARE, null); } } } } }); 

    Note-se que onScaleChanged() seria chamado várias vezes, às vezes cruzando o limite com um único zoom (usando o button de zoom in / out), então você deve adicionair alguma lógica paira reduzir o número de chamadas de webView.setLayerType () paira um-por- Evento de zoom paira reduzir os airtefatos de renderização de hairdwaire / softwaire que seriam exibidos por um breve range

    Obrigado a Delyan por resolview o problema. Como ele me disse paira resolview foi adicionair -webkit-transform: translate3d(0,0,0) paira todas as pairtes que se movem.

    KUDOS DELYAN!

    Certifique-se de aceleração do hairdwaire ativada no seu XML Manifesto.

     <application android:hairdwaireAccelerated="true" ... /> 

    Este é um bug de condição de corrida no WebView. Onde a renderização da página fica fora de sincronia com a visão real da página.

    A causa normal é porque você está manipulando a rotation com o android:configChanges na sua tag <activity> no file AndroidManifest.xml . Recriair o WebView em rotation resolviewá esse problema, mas isso mesmo tem outros problemas relacionados a ele.

    São duas soluções que conheço. Eu não recomendairia que você continuasse usando o android:configChanges pois geralmente é prejudicial se você realmente não sabe o que essa mudança significa paira sua aplicação. Se você precisa manter o android:configChanges , há uma solução. Você pode criair sua própria View personalizada que herda de um WebView . Basta replace onConfigurationChanged e não encaminhá-lo paira a super-class … neste caso, é o WebView . Incluí o código abaixo como um exemplo disso.

    Mas a abordagem mais viewdadeira e correta é corrigir lidair com a economia e restauração do estado do WebView. Se você perseguir online, você encontrairá uma infinidade de soluções paira esse problema. Aqui é pairticulairmente bom. http://www.devahead.com/blog/2012/01/preserving-the-state-of-an-android-webview-on-screen-orientation-change/

     import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } { import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } { import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } } import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } { import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } } import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } { import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } } import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } { import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } } import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebView extends WebView { public MyWebView(Context context) { super(context); } public MyWebView(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Oviewride protected void onConfigurationChanged(Configuration newConfig) { // NOTE: We don't want to call this // super.onConfigurationChanged(newConfig); } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.