First ANDROID app with quite a few features and questions
Posted: Thu May 05, 2011 4:06 am
I've attached my first app.
My first research was to prove RunRev LiveCode works on all platforms.
I've confirmed the 3 Apple OSX platforms and WinXP and Android and web.
Then I wanted to see what controls are available and which would work for Android.
So I just plastered my Mainstack with all the controls in the livecode native tool bar.
With so many controls it takes a bit too long to test on the Android imulator
and takes about 10 seconds of black screen to start.
I noticed there was a display width and height cliped limit on both Android imulator and on my actual phone.
That's why I created my first app to show the mouseMove x,y positions.
on windows i just have to more the mouse around.
But on Android imulator I have to Left mouse click and hold and move around to get the mouseMove even to fire.
and my actual phone I have to finger press and hold and move around to get the mouseMove even to fire.
Even though my app shows MouseOver: x,y
- it means that pointer in now over the following points of x, y
- it does NOT mean the even MouseOver
I got the code from RunRev Revolution forums and just copied it in.
I was very dissapointed that LC 4.6.1 didn't have a treeview control.
And that I'll have to pay for one if needed.
I then had a look around to see if I could find an app to miminc for a study target.
Not being satisfied that there is a standard I decided on one myself.
I found a scratched metal graphic that I wanted to use as a background.
But couldn't figure out how to assign it to the stack background.
More on this later. You'll see why.
I couldn't find any graphics that were inlcuded in the OmegaBundle for gel buttons
So I contacted Scott from tm | tools to see if he could help me find a way to build gel buttons.
If you've seen his work you'll know exactly why I contacted him.
( I actually swore out lound when I first viewed his works. )
I sent Scott the get button tutorial from Xara in hopes of assisting.
Scott not only sent me instruction but a sample.
As well as follow up emails. Very happy with the tools and with the support.
His follow up email lead into researching UNGrouping the three images
to pull them apart so I could see how it was layered.
Then grouping them back again.
Regretably TM | Tools doesn't reflect the graphic that has the focus.
I played around with tm | tools enough
to get the jist and made slight changes
that I thought were an improvement
and learned how to changed the color.
Another followup email with Scott discussed how to
NOT rely on the LC graphics engine to render the three layers of the button.
But to create a single graphic from the group of the three button images.
By seleecting the the button group then open the Message Box and paste the following command line:
import snapshot from the selectedObject
after pressing enter - an image control is create with a pic/snap of the grouped button images.
Very freakin cool!
Now I can use that image as the staring point of another button that has a Label on top to show text.
Then group that image with a label with the text: "Exit" or "Open" or "Cancel"
And import that snapshot as an image as well.
Then change the label to some other text and snapshot again.
In a few minutes I have all kinds of buttons.
----
As I mentioned before too many controls takes android too long to start my app.
(If I have three images per gel button that would add up to a lot of controls especially for Android)
So be sure to remove any extranous controls not needed.
Here it would be the three grouped images.
-----
Now back to the scratched image background.
I was just playing around with livecode inspector for the card.
Just to see what trouble I could find.
I got to the colors and Pattens and the properties listed the Foreground and Background selection.
I click on the Patterns button and found that I could assign a pattern as an image to the card background from the image library.
Further experimenting shows that I could change its library from Standard Icons to "This Stack"
And I realized I could see the red from my button and selected it to see what would happen.
And the background of the card turned into tiled images of my button image.
So being the tinkering genious I am I created a new image control and select my scratched metal background graphic as its content.
Then selected it and took a snapshot like the button image.
Then set the cards background patter of my scrarched metal in the "This Stack" Image Library.
Freakin heck! It worked!
-----
Also, I mentioned on this forum that I couldn't get my licensed Android app to test in the emulator.
After a full reboot its all working now.
When exiting the Android SDK and AVD Manager,
make sure the Virtual devices is selected then exit.
Otherwise if the Install packages is selected on exit
the next time you execut the AVD manager it will run thru the installed packages again.
Wasting your time. - NOPE - this does NOT work after all.
----
Running my app on windows, you'll notice my app is quite small.
But running on Android Inulator and my physical phone the background covers the whole screen.
Surprising but acceptable since thats really what I wanted anyway.
----
Questions:
While editing a card - I close it using the top right windows X close button
How do I open this card again?
That card will appear again if I close out of LiveCode with the save x button
just before the save message appears. And I just cancel the exit/save and I'm back to my project.
Is there a more logical menu item to open this card again instead having to exit?
My app on Android imulator and physical phone shows variations of max width, height as 479, 761.
Would that be 480 x 760?
Is that standard for all Androids?
Otherwise, How do I retrieve the width and heigth of whatever android phone my app is running on?
In my code copied here you'll see the double ampersand &&:
put "MouseOver: " && x && "," && y into FIELD Field1
What's the difference between the & and the &&?
Is there a way to have the text displayed as Etched text to match the scratched metal background?
I'm still wasting a lot of time with the Apply button.
Then I realize I haven't clicked the Apply button and have to start the process again.
Anyone know of a way to force the Apply?
Also, when I am editing code with the Edit (pointer) tool selected.
The mouseMove events are still firing when I drag the pointer over the card background.
Is there anyway to turn this off while in edit tool mode?
In my MouseMove even you'll see:
Pass MouseMove
What does this do?
back later
My first research was to prove RunRev LiveCode works on all platforms.
I've confirmed the 3 Apple OSX platforms and WinXP and Android and web.
Then I wanted to see what controls are available and which would work for Android.
So I just plastered my Mainstack with all the controls in the livecode native tool bar.
With so many controls it takes a bit too long to test on the Android imulator
and takes about 10 seconds of black screen to start.
I noticed there was a display width and height cliped limit on both Android imulator and on my actual phone.
That's why I created my first app to show the mouseMove x,y positions.
on windows i just have to more the mouse around.
But on Android imulator I have to Left mouse click and hold and move around to get the mouseMove even to fire.
and my actual phone I have to finger press and hold and move around to get the mouseMove even to fire.
Even though my app shows MouseOver: x,y
- it means that pointer in now over the following points of x, y
- it does NOT mean the even MouseOver
I got the code from RunRev Revolution forums and just copied it in.
I was very dissapointed that LC 4.6.1 didn't have a treeview control.
And that I'll have to pay for one if needed.
I then had a look around to see if I could find an app to miminc for a study target.
Not being satisfied that there is a standard I decided on one myself.
I found a scratched metal graphic that I wanted to use as a background.
But couldn't figure out how to assign it to the stack background.
More on this later. You'll see why.
I couldn't find any graphics that were inlcuded in the OmegaBundle for gel buttons
So I contacted Scott from tm | tools to see if he could help me find a way to build gel buttons.
If you've seen his work you'll know exactly why I contacted him.
( I actually swore out lound when I first viewed his works. )
I sent Scott the get button tutorial from Xara in hopes of assisting.
Scott not only sent me instruction but a sample.
As well as follow up emails. Very happy with the tools and with the support.
His follow up email lead into researching UNGrouping the three images
to pull them apart so I could see how it was layered.
Then grouping them back again.
Regretably TM | Tools doesn't reflect the graphic that has the focus.
I played around with tm | tools enough
to get the jist and made slight changes
that I thought were an improvement
and learned how to changed the color.
Another followup email with Scott discussed how to
NOT rely on the LC graphics engine to render the three layers of the button.
But to create a single graphic from the group of the three button images.
By seleecting the the button group then open the Message Box and paste the following command line:
import snapshot from the selectedObject
after pressing enter - an image control is create with a pic/snap of the grouped button images.
Very freakin cool!
Now I can use that image as the staring point of another button that has a Label on top to show text.
Then group that image with a label with the text: "Exit" or "Open" or "Cancel"
And import that snapshot as an image as well.
Then change the label to some other text and snapshot again.
In a few minutes I have all kinds of buttons.
----
As I mentioned before too many controls takes android too long to start my app.
(If I have three images per gel button that would add up to a lot of controls especially for Android)
So be sure to remove any extranous controls not needed.
Here it would be the three grouped images.
-----
Now back to the scratched image background.
I was just playing around with livecode inspector for the card.
Just to see what trouble I could find.
I got to the colors and Pattens and the properties listed the Foreground and Background selection.
I click on the Patterns button and found that I could assign a pattern as an image to the card background from the image library.
Further experimenting shows that I could change its library from Standard Icons to "This Stack"
And I realized I could see the red from my button and selected it to see what would happen.
And the background of the card turned into tiled images of my button image.
So being the tinkering genious I am I created a new image control and select my scratched metal background graphic as its content.
Then selected it and took a snapshot like the button image.
Then set the cards background patter of my scrarched metal in the "This Stack" Image Library.
Freakin heck! It worked!
-----
Also, I mentioned on this forum that I couldn't get my licensed Android app to test in the emulator.
After a full reboot its all working now.
When exiting the Android SDK and AVD Manager,
make sure the Virtual devices is selected then exit.
Otherwise if the Install packages is selected on exit
the next time you execut the AVD manager it will run thru the installed packages again.
Wasting your time. - NOPE - this does NOT work after all.
----
Running my app on windows, you'll notice my app is quite small.
But running on Android Inulator and my physical phone the background covers the whole screen.
Surprising but acceptable since thats really what I wanted anyway.
----
Questions:
While editing a card - I close it using the top right windows X close button
How do I open this card again?
That card will appear again if I close out of LiveCode with the save x button
just before the save message appears. And I just cancel the exit/save and I'm back to my project.
Is there a more logical menu item to open this card again instead having to exit?
My app on Android imulator and physical phone shows variations of max width, height as 479, 761.
Would that be 480 x 760?
Is that standard for all Androids?
Otherwise, How do I retrieve the width and heigth of whatever android phone my app is running on?
In my code copied here you'll see the double ampersand &&:
put "MouseOver: " && x && "," && y into FIELD Field1
What's the difference between the & and the &&?
Is there a way to have the text displayed as Etched text to match the scratched metal background?
I'm still wasting a lot of time with the Apply button.
Then I realize I haven't clicked the Apply button and have to start the process again.
Anyone know of a way to force the Apply?
Also, when I am editing code with the Edit (pointer) tool selected.
The mouseMove events are still firing when I drag the pointer over the card background.
Is there anyway to turn this off while in edit tool mode?
In my MouseMove even you'll see:
Pass MouseMove
What does this do?
back later