1. Are you ready for the Galaxy S20? Here is everything we know so far!

App Inventor - I need help

Discussion in 'Android Apps & Games' started by Kerbs, Dec 23, 2011.

  1. Kerbs

    Kerbs Lurker
    Thread Starter

    Hello everyone, I'm not savvy with creating apps on any device so this is pretty new to me. I have looked at google app inventor, and I can do some of what I want, but not everything. What I have in my app so far is 5 different buttons(pictures), that when pressed, will produce a unique tone.

    What I need to do is create a volume control on screen in a slider format, that will alter the volume of the tone being played, from 0-100%. I understand there are physical buttons on the device, but for my application I need to do this. Any help, or direction towards some tutorials would be much appreciated. I don't know if the app inventor is capable of doing that, and how complicated this would be to create in a different environment.

    Thanks in advance,
    Andrew :)
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Unfortunately, AI does not natively support sliders, but a slider can be coded fairly easily using buttons (but the slider button cannot be dragged, you must click on the track itself). The size of the spacer button (which is emulating the track that the slider button rides on) determines the volume. Or, you can place an image sprite on a small canvas and allow the user to drag it. The position of the sprite on the canvas determines the volume.

    The formula to change between user slider values and the app's native values are:​
    user value = app value / (app max value - app min value) x (user max value - user min value)​
    app value = user value / (user max value - user min value) x (app max value - app min value)​

    Color Picker: https://groups.google.com/forum/#!topic/app-inventor-shared-utilities-repository/l5o8nDOI1u4

    Android Style Sliders: https://groups.google.com/forum/#!topic/app-inventor-shared-utilities-repository/AFCb5RmTeWs

    Scott Ferguson
    scottfromscott@gmail.com
     
Loading...
Similar Threads - App Inventor need
  1. wmw_hv
    Replies:
    0
    Views:
    129
  2. Harbut
    Replies:
    0
    Views:
    166
  3. No name from the internet
    Replies:
    4
    Views:
    239
  4. SmokieT
    Replies:
    4
    Views:
    298
  5. Advait
    Replies:
    4
    Views:
    372
  6. grunt0300
    Replies:
    4
    Views:
    541
  7. shakushinnen
    Replies:
    14
    Views:
    409
  8. cocotus
    Replies:
    2
    Views:
    662
  9. hstroph
    Replies:
    8
    Views:
    1,020
  10. Krishnobiswas
    Replies:
    5
    Views:
    670

Share This Page

Loading...