user2521365
user2521365

Reputation: 141

android zoom in button only with webview

I have a simple android webview app and I want to add zoom in button only,

I added the zoom in button in the graphical layout:

enter image description here

but how can I make it work in the java file ?

Upvotes: 0

Views: 383

Answers (1)

tim.paetz
tim.paetz

Reputation: 2771

In your activity, add an on click listener to your button that zooms in the webview:

findViewById(R.id.zoom_in_btn).setOnClickListener(
            new View.OnClickListener() {

                @Override
                public void onClick(View v)
                {
                    webviewer.zoomIn();

                }
            });

Upvotes: 1

Related Questions