2014년 12월 10일 수요일

Problems with the conditionals

Hi, i'm doing an app for my school and i'm getting problems with the conditionals.

I'm doing a Schedule for the students, well the schedule are made, I only display the images. First I thought that I could make a screen for each course and for each class, but then I got  a message that making more than 10 screens can be a problem, and in my app there was going to be more than 50 screens!
Then I learned how to switch between visible and invisible.

The app looks like this: 
here there are the courses in VerticalArrangement1 then when you click in   "1r ESO", the VerticalArrangement1 disapears and the VerticalArrangement2 becomes visible and there is each class of the course, and the buttons named like "but1" becomes    "1r ESO A".


And the blocks looks like this,
 I am trying the app with only one course, when everything works perfectly I am going to finish it. 
The problem is that, I want that, if the "but1" text is   "1r ESO A",  I want the app to open a screen that I have with a Webviewer an I want this Webviewer to show the schedule of "1r ESO A"
  I'm using a Webviewer because you can't make zoom with Image,
 I use the Webviewer like this         set WebViewer1 . HomeUrl to file:///android_asset/1ESOA.png   



Regarding "you can't make zoom with Image":

Actually you can zoom without a WebViewer, but you can not use pinch and expand...you have to use a slider or something similar:

It depends on what you mean by zoom, for an image:


The WebViewer might be your best solution, however you could use the above technique too.



You do not have to open another screen with the WebViewer.  The WebViewer can be on your main screen.  You can hide it just like you hide the Vertical arrangement.   Did you set the scrollable proberty of Screen1 by checking the scrollable Property box?   Then you can use the entire screen.


In the but1.click event handler just put:
If but1.text = 1r ESO A  then   set WebViewer1 . HomeUrl to file:///android_asset/1ESOA.png       (provided that 1ESOA.png is in your assets)

and in the but2.text ......   perhaps.



Hi Steve thank you for answering.
Regarding from what you said about the webviewer, I agree with you that is more easy to put it in the same screen.
But the problem is that I don't how to put:

If but1.text = 1r ESO A 
 then   set WebViewer1 . HomeUrl to file:///android_asset/1ESOA.png

When I punt    but1.text     in the   If   it reject me the block



Perhaps:
???   



Aaaahh I didn't thoght about that!
Thank you very much Steve for answering so fast


댓글 없음:

댓글 쓰기