0
I would like to display a div or entire site without the search bar within the app.
I found no answer on any site. This code opens the site, but opens with bars with everything.
My Code is 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_tables.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>
What do you mean with everything? The URL presents? That’s it?
– Andrei Coelho
i would like to display appeals a div or Section.
– Daniel Spitzer