My app needs to show large (1000 pixels x 1500 pixels) jpg files on a smartphone. The user should be able to scroll the image up, down, left and right and the user should be able to shrink and expand the file. Just like you would do with a photo in a photo gallery. I've tried a few different methods and the webviewer interface component seems to work the best. But its not very smooth and seems to have trouble when the phone rotates, profile to landscape and back. I've tried different sizes of different interface components and layout components. I've gotten different pieces to work somewhat but there always seems to be something it not doing right. My latest attempt was with intents using "VIEW". and pointing to a file on my phone but I get a "601" error. Not found or something. I was hoping I could pass the file off and let the intent do the work of scrolling and sizing. Is that possible? I've scanned most of the recourse on line, but have not found anything that discusses the best way to do this. Does anybody know of such a article or what the best way to program AI to display large files?
--
How about forcing app to one particular orientation & using webviewer?
--
Fixing the screen orientation solves the problems with moving from portrait to landscape and back, but that was a feature I wanted to provide. When I look at picture in "gallery" the photo viewing app that came with my phone, I see the whole picture at first and then I can zoom in and move the photo around to get a closer look at something in the photo. All this moving/zooming is very smooth and easy. When I use the webviewer component, the first image I see is a portion of the page (I've tried different heights and width combos) and the zooming and moving is very clunky (very technical term), not smooth like gallery. Maybe it's just the way AI works, maybe its too much overhead. I'm just wondering what others have tried and and how well its worked. Maybe I'm being too picky.
--
You could have a canvas that is larger than the screen and try scrolling using the canvas events.
--
Thanks for the suggestion. If I understand you correctly, you are suggesting I use the canvas component with the events as input and move the image file around programmatically. I tried using a canvas early on and using sprites as navigational buttons. But I found that controlling the graphics was becoming a nightmare, so I abandoned it. Upon your suggestion I took another look at the canvas component and I found that the canvas input events, like swiping etc where covered, however moving the image around and sizing it dynamically looked very hard, if not impossible via AI2. A lot of trial and error, especially using different devices.
Perhaps this post really should have been a discussion, not a question. After doing some more research it looks like I have two options. One, go with the webview component and live with the clunky movement and sizing. Or, two, trying to find a "VIEW" intent and activity starter, which I know very little about and see if that can handle my dilemma. Can anyone point me in that direction? I've read the AI documentation and it's a start. Well, maybe I'll learn something.
--
Just to add to the discussion, Taifun has two image extensions that may be helpful to you:
• crop.aia
Looks like I found an intent, or rather found out how to use them, that does the job for me. Seems I was leaving out the "Datatype" parameter. Thanks for the paravidaapps web sites. Although it wasn't exactly what I was looking for , it got me started looking in the right direction. What finally answered my original question was the "AppInvActivityStarter" app at Google play. Its a handy tool to test common intents. After some trial and error, I discovered what was needed.
One, well two, minor concerns still exist. The intent I'm using does everything I want it to do and more. Namely if you swipe the screen, the user will get the next image file in the folder, like in gallery. I don't want that to happen. I'm wondering if there is another parm I can use to prohibit that from happening. I'm going to play around in the app I found, but it looks like my options are limited. The other concern is my inabitlty to resolve tech type questions using the google android developer site. I couldn't really find the documentation, about how the parms were used in intents, like I could using trial and error and the app I used. Maybe, I'm just not tuned in yet. Anyway, I can start developing my app. If anyone has an answer about limiting the swiping action of the VIEW intent., let me know, Thanks
--
댓글 없음:
댓글 쓰기