1. Check out our companion app, Forums for Android! Download from Google Play

help please

Discussion in 'Application Development' started by sarasaad, Nov 3, 2012.

  1. sarasaad

    sarasaad New Member
    Thread Starter
    5

    Nov 3, 2012
    3
    0
    5
    Hey guys,
    I totally new for android programming I just wanna know what the whole functions means cause I saw many codes and I understand most of the code but the functions I don't get it just like : setGravity, contentEquals, Intent, putExtra etc.
    so can anyone help me please :)
    thanks in advance
     

    Advertisement

  2. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male
  3. StevenHu

    StevenHu Well-Known Member
    15

    Feb 8, 2011
    91
    0
    15
    Male
    Webmaster
    Orange County
    Think of a function as a mini-program that works when it is triggered to start. For instance, you can have a function that tells the app to return to the previous page. But it doesn't actually take place until the user touches a Back button.

    This is a function called goBack(), which tells the app to go back to the previous page:

    function goBack()
    {
    window.history.back();
    }

    On a page, this Back button is all set to call, or execute, the goBack() function:

    <input type='button' value='Back' onclick='goBack()'>

    Hope this little example helps you understand functions.
     

Share This Page

Loading...