Results 1 to 12 of 12
  1. #1
    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0

    Smile Onlick Button Sound Effect (Android Programming)

    How to input sound on clicked button? I use eclipse to create my project. Please give me the the sourcecode and mention on which file that sourcecode put , i need your help

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,899
    Rep Power
    25

    Default Re: Onlick Button Sound Effect (Android Programming)

    What have you found on the internet? Post the code here that you are having problems with.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0

    Default Re: Onlick Button Sound Effect (Android Programming)

    i found tutorials on internet but i need fast response answer for my question, i think i can get it here. i need someone who give tutorial and we can discuss it.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,899
    Rep Power
    25

    Default Re: Onlick Button Sound Effect (Android Programming)

    i need fast response answer for my question,
    If you have some specific questions about java programming, post them.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0

    Default Re: Onlick Button Sound Effect (Android Programming)

    i thought that was specific sire, i just wanna know how to put button with sound effect on clicking using eclipse

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,899
    Rep Power
    25

    Default Re: Onlick Button Sound Effect (Android Programming)

    Can you post the code you are having problems with?
    It needs to define a button with a on click listener.
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0

    Default Re: Onlick Button Sound Effect (Android Programming)

    Which file that sourcecode should be put ? i'll paste mainactivity.java

  8. #8
    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0

    Default Re: Onlick Button Sound Effect (Android Programming)

    excuse me sire, what these exclamation marks mean ?
    Onlick Button Sound Effect (Android Programming)-button.jpg

  9. #9
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,899
    Rep Power
    25

    Default Re: Onlick Button Sound Effect (Android Programming)

    I've never seen that. What did you do to get it?
    If you don't understand my response, don't ignore it, ask a question.

  10. #10
    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0

    Default Re: Onlick Button Sound Effect (Android Programming)

    i don't know why, i just copied paste the button, then those marks appeared. Eclipse said it " [l18N] Harcoded String "3", should use @string resource , and so others button. By the way before i ask about clicked button sound effect, how to input function into button i click ?

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,899
    Rep Power
    25

    Default Re: Onlick Button Sound Effect (Android Programming)

    Use the on click method. It can be set in the XML or in the program by getting a reference to the button and calling its add on click listener method.
    If you don't understand my response, don't ignore it, ask a question.

  12. #12
    Join Date
    Jan 2014
    Posts
    10
    Rep Power
    0

    Default Re: Onlick Button Sound Effect (Android Programming)

    Sire ,could you please give me the example sourcecode in XML ? i had pressed 'Ctrl+space' then i found "android:onClick" was that what you meant ?

    here's my sourcecode
    <Button
    android:onClick="process"
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/radioGroup1"
    android:layout_alignParentBottom="true"
    android:layout_marginBottom="41dp"
    android:text="Proses"/>
    I have a problem while compiling, i had followed a tutorial and it's consist onclick listener method like you said. There's no error found in my sourcecode but the appearing display was my previous work ,not my recent work.
    How can it be happened ?
    how to fix it ?
    Is there wrong config on my eclipse ?

    this is my previous work
    Onlick Button Sound Effect (Android Programming)-previous-work.jpg

    and this is what i expect from the tutorial
    Onlick Button Sound Effect (Android Programming)-expected-work.jpg

Similar Threads

  1. Android Programming Book
    By jim829 in forum Android
    Replies: 3
    Last Post: 04-30-2014, 02:36 PM
  2. Programming an echo to a sound
    By od11kd in forum New To Java
    Replies: 2
    Last Post: 11-11-2012, 11:09 PM
  3. android programming vs game programming using java
    By vgoel38 in forum Forum Lobby
    Replies: 2
    Last Post: 09-08-2012, 01:11 AM
  4. Draw button with glass effect
    By AlirezaM in forum CLDC and MIDP
    Replies: 0
    Last Post: 05-18-2011, 09:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •