public class ViewPort extends Object
| Constructor and Description |
|---|
ViewPort() |
| Modifier and Type | Method and Description |
|---|---|
String |
getContent()
get the content for the viewport meta tag
|
String |
numberToString(double number) |
ViewPort |
setHeight(int value)
Set the height of the viewport
|
ViewPort |
setHeightToDeviceHeight()
Set the height to device height
|
ViewPort |
setInitialScale(double initialScale)
set the initial scale of the viewport
|
ViewPort |
setMaximumScale(double maximumScale)
Set the maximum scale of the viewport
|
ViewPort |
setMinimumScale(double minimumScale)
set the minimum scaling of the viewport
|
ViewPort |
setTargetDensity(Density d)
android only
set the target density
|
ViewPort |
setTargetDensity(int value)
android only
set the target density in dpi
|
ViewPort |
setUserScaleAble(boolean userScaleAble)
Should the viewport be scalable by the user
|
ViewPort |
setWidth(int value)
Set the width of the viewport
|
ViewPort |
setWidthToDeviceWidth()
Set width to device width
Most common for most apps
|
public ViewPort setWidth(int value)
value - the width in pxpublic ViewPort setHeight(int value)
value - the height in pxpublic ViewPort setWidthToDeviceWidth()
public ViewPort setHeightToDeviceHeight()
public ViewPort setTargetDensity(int value)
android only
set the target density in dpivalue - the target density in dpipublic ViewPort setTargetDensity(Density d)
android only
set the target densityd - the density to usepublic ViewPort setUserScaleAble(boolean userScaleAble)
userScaleAble - ture to allow scalingpublic ViewPort setMinimumScale(double minimumScale)
minimumScale - the scale to usepublic ViewPort setMaximumScale(double maximumScale)
maximumScale - the scale to usepublic ViewPort setInitialScale(double initialScale)
initialScale - the scale to usepublic String getContent()
public String numberToString(double number)
Copyright © 2011–2015 SWM. All rights reserved.