I'm working on building an ecosystem of inexpensive lab measurement devices based on little-wire for high school science labs. Pasco/Vernier make similar products, but for 10 times the cost of a simple USB implementation. This makes them inaccessible to most high schools. A photogate for $10 or less can open a lot of options for a physics teacher. Being able to interact with their sensors directly through a simple scripting language would open up even more educational opportunities.
Android editor. :
Code completion
copy code in help forms (or i missed something)
Best highlighting code
Liste of function (in this code)
You will be glad to hear we are working on a GIT backed repository and ranking system (with a friendly front end).
Regards,
Sankarshan Dudhate
Link http://sandudhate.tumblr.com/post/93668951307/introduction-to-android-script
This thread should be about wanted features for Android Script. So if you want to talk about your blog, then start a new thread and we can discuss it there.
Regards
David
What I am looking for is something identical to the "rename" option but leaving the original app intact.
As a matter of interest, I have blogged a very restricted workaround I'm currently using at http://androidscriptkiddy.blogspot.co.uk/2014/08/make-copy-of-project.html
I envisage something that works like the yes/no dialogue but with a TextEdit added. The buttons would be OK and Cancel.
The OnTouch event would pass a result containing either null (if cancelled) or the text entered.
Awesome work.
//Called when application is started.function OnStart(){ toSize = calcFontSize(); //Create a layout with objects vertically centered. lay = app.CreateLayout( "linear", "VCenter,FillXY" ); lay.SetBackColor("red");
//Create a text label and add it to layout. txt10 = app.CreateText( "10% of the screen" ); txt10.SetTextSize( 0.1*toSize ); txt10.SetBackColor("green"); lay.AddChild( txt10 ); txt20 = app.CreateText( "20% of the screen" ); txt20.SetTextSize( 0.2*toSize ); txt20.SetBackColor("blue"); lay.AddChild( txt20 ); txt30 = app.CreateText( "30% of the screen" ); txt30.SetTextSize( 0.3*toSize ); txt30.SetBackColor("white"); lay.AddChild( txt30 ); txt40 = app.CreateText( "40% of the screen" ); txt40.SetTextSize( 0.4*toSize ); txt40.SetBackColor("yellow"); lay.AddChild( txt40 ); //Add layout to app. // lay.SetVisibility( "hide" ); app.AddLayout( lay ); //show the sum of the heights app.ShowPopup( "Total height: " + (1*txt10.GetHeight() + 1*txt20.GetHeight() + 1*txt30.GetHeight() + 1*txt40.GetHeight()) );}
function calcFontSize() { //create a local variable for a new layout var lay = app.CreateLayout( "linear", "VCenter,FillXY" ); //create a test text var txt = app.CreateText("Test Text"); //use a big font to make the calculation more exact txt.SetTextSize ( 200 ); lay.AddChild( txt ); //we don't want to be seen in the UI lay.SetVisibility( "hide" ); app.AddLayout( lay ); //Calculate the proportion between the text size used //and the height of the generated text //the result is the text size necessary to get a full size //(ie. 1) text var fullSize = 200 / txt.GetHeight(); app.DestroyLayout ( lay ); return fullSize}
I'm currently using checkboxes that unset the others.
The user-interface is not very intuitive.
When making a list you can only touch the text of the list to trigger the SetOnTouch callback, I should work in the complete wide of the list, much more usable!
Will there be any way to embed a new font on a program without using a webview? Is that possible in Android? I would love to change fonts!
.SetOnFocus( callback )
.SetOnLostFocus( callback )
.SetFocus() //to make the cursor go to that specific text edit
If a user does some validation in the LostFocus handler, and it fails validity so the TextEdit sets focus back to itself, can we prevent the OnFocus callback for the other TextEdit firing?
Why would you like to prevent the OnFocus callback on the second TextEdit not to fire? You as a programmer should be on charge to make the verifications for that kind of situation (for example checking on the LostFocus function that if nothing was done to go back to the previous state).
so t2_LostFocus fires, and t1_Focus?
blank is an invalid value for T2
//Called when application is started.function OnStart(){
//Create a layout with objects vertically centered. lay = app.CreateLayout( "linear", "VCenter,FillXY" );
//Create a text label and add it to layout.
txt = app.CreateText( "Hello, this is a very long text to test this thing",1,-1, "Multiline" ); //this works!