I added the viewport with properties allowing zooming/scaling. And I added these to the native code:
WebSettings settings = super.appView.getSettings();
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(true);
settings.setSupportZoom(true);
I am able to zoom, but along with my view, ion-header-bar
and ion-nav-bar
gets zoomed. I tried giving the header css, to keep it fixed:
position: fixed;
top: 0px;
left: 0px;
but still, it’d get zoomed.
I also tried ion-scroll
, setting the zooming property to true, but didn’t work.
My index.html has an ion-header-bar
, which contains an image.
The templates go into
<ion-nav-view class="has-header"></ion-nav-view>
The template in which I require zooming in a particular div is having a 'ion-view` and it looks like:
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-buttons side="right">
icon1
</ion-nav-buttons>
<ion-nav-buttons side="left">
icon2
</ion-nav-buttons>
</ion-nav-bar>
<div>
Multiple divs in here, which are containers for html and css data we receive via AJAX requests. And this is here I need zooming in.
</div>
</ion-view>
PS: Would it matter if I add a full HTML code(with meta viewport, no header, but body and divs) inside the ion-view
?