I would like to display a div or whole site without the search bar inside the app

0

I would like to display a div or whole site without the search bar inside the app.

I could not find an answer on any site. This code opens the site, but opens with the slashes.

My code looks like this,

ViewTabelas.java

import android.os.Bundle; import android.app.Activity; import android.webkit.WebView;

public class ViewTabelas extends Activity {

private WebView webView;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_view_tabelas);

    webView = (WebView) findViewById(R.id.webView1);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.loadUrl("http://www.google.com");
}

}

 Tabelas.java

 import android.content.Context;
 import android.content.Intent;
 import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
 import android.view.View;
 import android.widget.Button;

 public class Tabelas extends AppCompatActivity {
private Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_tabelas);
    final Context context = this;
    button = (Button) findViewById(R.id.buttonUrl);

    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            Intent intent = new Intent(context, ViewTabelas.class);
            startActivity(intent);
        }

    });

}

}

activity_view_table.xml

  <?xml version="1.0" encoding="utf-8"?>
 <WebView  xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>

activity_tables.xml

  <Button
    android:id="@+id/buttonUrl"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Click para abrir o site" />

    </LinearLayout>
    
asked by anonymous 07.09.2018 / 22:56

0 answers