is there a layers component?

1,266 views
Skip to first unread message

innoovative thiinking

unread,
Dec 31, 2013, 6:15:11 PM12/31/13
to app-inventor-o...@googlegroups.com
just wondering how to be able to set images as backgrounds with other components a-top these images.. some form of layering would probably be an awesome addition to building 'sexy' looking GUI's for use with mobile devices.

cheers

Message has been deleted

scottfromscott

unread,
Jan 6, 2014, 6:52:18 PM1/6/14
to app-inventor-o...@googlegroups.com
This example uses a fixed Canvas BackgroundImage and three ImageSprites at different Z levels to give the illusion of depth of field.
---
Scot

Innovative

unread,
Jan 6, 2014, 7:17:27 PM1/6/14
to app-inventor-o...@googlegroups.com

hi Scott , yes that method works fine with image sprites.. however for the likes of normal components , Labels , text boxes , buttons etc it does not provide any options.

it would be ideal to be able to insert background images into horizontal/vertical arrangements and overlay these elements in that fashion.

perhaps for a future revission.

scottfromscott

unread,
Jan 8, 2014, 12:53:41 PM1/8/14
to app-inventor-o...@googlegroups.com
I see what you mean. The only option that I know of for now is to set the Screen BackgroundImage and overlay it with those components.
I can envision creating layouts over a BackgroundImage that has different images in different parts of the screen, but that would be somewhat tedious to do in positioning the components over the images and making sure they display properly on different screens.
---
Scott

Innovative

unread,
Jan 8, 2014, 5:41:11 PM1/8/14
to app-inventor-o...@googlegroups.com

using checks for screen resolution (x,y) this could be controlled some-what ... by using fixed sizes for arrangments if x>(screen x) or y>(screen y).. else stretch image which maybe the intended result ;)

--
You received this message because you are subscribed to a topic in the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/app-inventor-open-source-dev/WJUCb9_I6n4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to app-inventor-open-so...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.
Visit this group at http://groups.google.com/group/app-inventor-open-source-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Innovative

unread,
Jan 8, 2014, 7:46:04 PM1/8/14
to app-inventor-o...@googlegroups.com

also.. being able z-index images outside of the canvas (component) would have advantages as well.. combinded with fixed / relative positioning .. developers could set for example a partial gradient background layer with z-index-1000 ; a top which they could have a horizontal / vertical arragement .. with background images of type .png / gif ... these could be absolute possitioned or relative with some function to be able to fill parent or fixed size.. and positioned anywhere within the arrangement.. this could be a little tricky agreed .. therefore being able to use either fixed size.. 50:50px or stretched x/y (or both) would be sweet.. as for components these perhaps could also contain a grow/shrink factor .. pending on resolution of drvice app being viewed on..

scottfromscott

unread,
Jan 9, 2014, 1:37:52 PM1/9/14
to app-inventor-o...@googlegroups.com
A KeepAspectRatio checkbox property would be nice for any component containing Width and Height values. Whenever either the height or width would change the other dimension would adjust properly as well.
---
Scott
To unsubscribe from this group and all its topics, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.

Gareth Haylings

unread,
Jan 9, 2014, 2:27:18 PM1/9/14
to app-inventor-o...@googlegroups.com
Hi Scott

I've already added KeepAspectRatio  to my custom version of App Inventor in the ImageSprite components. To see the function working download the demo project from the following link http://sourceforge.net/projects/themadrobot/files/App-inventor-resource/Mad-Robots-AI/DEMO_Animation.aia/download then go to mad-robot-dev.appspot.com then import the demo project (Note this project will only work on my custom version of AI due to the internal changes I have made). It wouldn't be to difficult to add the KeepAspectRatio to all components which I will do at some point.

scottfromscott

unread,
Jan 10, 2014, 4:50:28 AM1/10/14
to app-inventor-o...@googlegroups.com
Hi Gareth-
I have already played with the demo and it is very nice (especially the gravity function - sorely needed)  -- probably where I got the idea :)
---
Scott

Gareth Haylings

unread,
Jan 10, 2014, 7:27:12 AM1/10/14
to app-inventor-o...@googlegroups.com
Hi Scott

Glad you like the mods I have added. I still need to alter the way I am doing stuff in the background of the imagesprite as the way originally wrote the code causes animation not to work as smooth as it could and sometimes causes it to stop while anther task happens. Over the last few weeks I have learnt loads more about eclipse, Java and handling task in android properly and with this knowledge should help me improve the code 10 folder.

One of my most recent mods I have add it Multitouch on the canvas which took quite a bit of research how to get it working the way I wanted, but I its almost complete now and added to my version of AI Locally. While doing my research I found 2 properties which I never new were possible on Android, Touch Size and Touch Pressure. I've added both these so they can be used in an AI project. My intention is to extend the multi touch beyond the Canvas and add it so more than one components can be touched or dragged at time. 

Another thing I have been experimenting with is colour effects such as shading, blur, gradient etc. One thing I found when experiment was it's pretty easy to make sort 3d effect which looks really cool.  I am hoping to be able to either add these as extra to the colour blocks or creating a new component that you'll be able to drag and drop to the colour properties of any other component.

I was hoping to have a new version of my Mad Robots AI up on my appspot by now by there been a bit of delay due to all the mods I have been make. I am hoping to have the next version ready by end February as long as all goes to plan and it will include the following new stuff:
  • ImageSprite component - Improvements and bug fixes
  • Ball Component  - Improvements
  • Canvas component - MultiTouch enabled
  • Filemanager component  - read/write files/directories to SD card
  • SoundMeter component - detect sound level from mic
  • VoiceChange component - Live sound changed from mic to speaker with effects such as reverb & pitch/speed control
  • Button component - Improvement with button touchdown timepressed property

scottfromscott

unread,
Jan 15, 2014, 10:05:45 AM1/15/14
to app-inventor-o...@googlegroups.com
Multitouch is sorely needed for pinch and zoom to work properly.
heard on the radio a guy that made a new kind of piano with soft keys that can bend notes sharp or flat.
I though about that when you mentioned Touch pressure and Touch Size. Might be able to do something with that especially if we could map pressure/size to pitch change smoothly.
Keep it real :)
---
Scott

Gareth Haylings

unread,
Jan 15, 2014, 11:13:47 AM1/15/14
to app-inventor-o...@googlegroups.com
Multitouch is sorely needed for pinch and zoom to work properly.
I totally agree, something that I've personally wanted since I started using AI

I have created a few really cool apps using the new multitouch function to demonstrate the need for it and how it can be applied to projects in AI. The Apps I have created so far are:
  • Multitouch painting app
  • Ventriloquist dummy app
  • Piano keyboard with effects app
I'll be uploading these to googleplay in the next few days. I will also create a few more apps to demonstate gesture control such as making a picture zoom and rotate.

In order to get multitouch working I've found I need to rewrite most of Canvas component, which wasn't something I really wanted to do.

Something I will be looking at next is enabling multitouch on a complete project not just the canvas components which if I manage to do it will be really cool.




 One thing I found I had to to was recode most of the canvas component to get it working so it may be awkward to get it into MIT App Inventor. The multi touch will be availbale in m
Reply all
Reply to author
Forward
0 new messages