First of all, Thanks for taking the time to read this post.
I am trying to view a website through my app but the pages need to be zoomed in 150-200% to read it.
You can click the button and it load the page, but you have to manually zoom to read the text. Is there any way that I can automatically zoom in 200%?
Below is the whole code, it’s just a bunch of examples pieced together so if you have any advice an syntax I would appreciate that too.
line 31 : (the web view, but as is the text is far too small and you can not read it without zooming)
local function handleButtonEvent( event )
if ( “ended” == event.phase ) then
print( “Button was pressed and released” )
native.showWebPopup( 0,-45, display.contentWidth, display.contentHeight - 40,("http://www.google.com"))
--//////THIS IS THE PART I AM TRYING TO VIEW, IT NEEDS TO BE ZOOMED IN 200%////////
end
end
----------------------------------------------------------------------------------------- -- -- view1.lua -- ----------------------------------------------------------------------------------------- local composer = require( "composer" ) local scene = composer.newScene() function scene:create( event ) local sceneGroup = self.view -- Called when the scene's view does not exist. -- -- INSERT code here to initialize the scene -- e.g. add display objects to 'sceneGroup', add touch listeners, etc. -- create a white background to fill screen --local background = display.newRect( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) --background:setFillColor( .5 ) -- white local background = display.newImageRect( "background1.png", 320, 570 ) background.x = display.contentCenterX background.y = display.contentCenterY --add text local widget = require( "widget" ) -- Function to handle button events local function handleButtonEvent( event ) if ( "ended" == event.phase ) then print( "Button was pressed and released" ) native.showWebPopup( 0,-45, display.contentWidth, display.contentHeight - 40,("http://www.theaustinexplorer.com/?m=1")) --//////THIS IS THE PART I AM TRYING TO VIEW, IT NEEDS TO BE ZOOMED IN 200%//////// end end local button1 = widget.newButton( { width = 173, height = 47, labelColor = { default={ 1, 1, 1 }, over={ 1, 1, 1, 1 } }, defaultFile = "button9.png", overFile = "button8.png", label = "button", onEvent = handleButtonEvent } ) -- Center the button button1.x = display.contentCenterX button1.y = display.contentCenterY -- Change the button's label text button1:setLabel( " JUMP! " ) -- all objects must be added to group (e.g. self.view) --sceneGroup:insert( background ) --sceneGroup:insert( title ) --sceneGroup:insert( summary ) end function scene:show( event ) local sceneGroup = self.view local phase = event.phase if phase == "will" then -- Called when the scene is still off screen and is about to move on screen elseif phase == "did" then -- Called when the scene is now on screen -- -- INSERT code here to make the scene come alive -- e.g. start timers, begin animation, play audio, etc. end end function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if event.phase == "will" then -- Called when the scene is on screen and is about to move off screen -- -- INSERT code here to pause the scene -- e.g. stop timers, stop animation, unload sounds, etc.) elseif phase == "did" then -- Called when the scene is now off screen end end function scene:destroy( event ) local sceneGroup = self.view -- Called prior to the removal of scene's "view" (sceneGroup) -- -- INSERT code here to cleanup the scene -- e.g. remove display objects, remove touch listeners, save state, etc. end --------------------------------------------------------------------------------- -- Listener setup scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) ----------------------------------------------------------------------------------------- return scene
Any advice you have would be helpful! Thank you for reading!