THREAD: Getting Started With Android Programming
  1. 03-28-2015, 02:52 AM
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    464
    Posts
    12,583
    Reputation
    Nov 2013
    NextGenUpdate
    Hey NextGen, I've recently decided to help the community get started with the android sdk.Tustin
    I've been getting request on how to make android apps so i'll start you out with the basics and add more gradually.
    In order for you to get started you need You must login or register to view this content. and some background in java is required otherwise you will just copy what i do and try and play with it.

    Java Help (Credits to primetime43):
    You must login or register to view this content.
    You must login or register to view this content.

    Getting Started
    Spoiler:

    On the android studio home you will need to create a new project
    Spoiler:
    You must login or register to view this content.


    Name your project:
    Spoiler:
    You must login or register to view this content.


    Usually i'd have my api level up to 4.4 kitkat but you can go ever low you want. lowest i would go wout be api 14 on 4.0.
    Spoiler:
    You must login or register to view this content.


    Select blank activity and hit next
    Spoiler:
    You must login or register to view this content.


    Hit next on this screen
    Spoiler:
    You must login or register to view this content.


    If you are having trouble viewing the preview, select an api that suits you. In this case, api 21 fits my preview well
    Spoiler:
    You must login or register to view this content.


    On the left you have all your project files, middle is usually where you write your code.
    In layouts, you will have a design tab and a text tab at the bottom, you cans switch between each other
    Spoiler:
    You must login or register to view this content.



    On our design tab you, you will have a visual studio/netbeans like gui designer where you can drag views onto the screen
    Spoiler:
    You must login or register to view this content.


    What i want you to do is drag a button onto the screen and move the text to the center so you will have a better feel of how it operates. It takes a while to get use to.
    Spoiler:
    You must login or register to view this content.


    Click on the click button and you will see properties on the bottom right. Give the button a custom text.
    Spoiler:
    You must login or register to view this content.


    Scroll up and give the button an id, you will use that id in the code, also click on the TextView and give that an id called "textview"
    Spoiler:
    You must login or register to view this content.


    Here we have the onCreate Method where we initialize our views and populate the activity activity
    Spoiler:
    You must login or register to view this content.


    In this image we initialize out views, having out view global so it can be accessed anywhere within the class
    Spoiler:
    You must login or register to view this content.


    Now here we implement an interface, hitting alt enter will solve your problems. When adding the interface, it implements the methods to override so you can use that for your view. In this case we will use OnClickListener for the button. Notice how we use "this", the reason we did that is because this class implements the method we will be overriding. Typically you would use the OnClick method this way but for speed you can test.
    Spoiler:
    You must login or register to view this content.


    Run the app/emulator and see what you come up with, here we have our default untouched activity
    Spoiler:
    You must login or register to view this content.


    Once clicked it will bring up a toast saying hello world as well as changing the text of the textview
    Spoiler:
    You must login or register to view this content.



    Beginner/Intermediate Tutorials
    ***Newest:
    Spoiler:
    You must login or register to view this content.

    Model View Controller:
    Outcome:


    Project Download:
    You must login or register to view this content.



    Sources:
    PDF Reader
    You must login or register to view this content.
    Spoiler:

    You must login or register to view this content.

    Spoiler:

    You must login or register to view this content.


    Credits:
    Mr Smithy
    Google
    The guy who made android but idk his name.Tustin

    Sorry for the sloppyness, it was a bit rushed, make a request if you want a tutorial done on something.
    Last edited by Mr Smithy x ; 10-11-2015 at 03:50 PM.

  2. The Following 7 Users Say Thank You to Mr Smithy x For This Useful Post:

    , , , , , ,

  3. 05-15-2015, 02:02 AM
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    464
    Posts
    12,583
    Reputation
    Nov 2013
    NextGenUpdate
    Originally Posted by dandii View Post
    Ive got ya app mr smithy it works on mi phone bt dont connect to game can ya help anyone plz


    Are you jailbroken?
  4. 05-15-2015, 06:42 AM
    dandii's Avatar
    dandii
    Gobble
    dandii's Avatar
    dandii
    Gobble
    2
    Posts
    10
    Reputation
    May 2015
    NextGenUpdate
    No mate i did ot coz ad seen u do it n mates did it
  5. 05-18-2015, 11:36 PM
    Im_YouViolateMe's Avatar
    Im_YouViolateMe
    NextGenUpdate Elite
    Im_YouViolateMe's Avatar
    Im_YouViolateMe
    NextGenUpdate Elite
    569
    Posts
    11,687
    Reputation
    Mar 2015
    NextGenUpdate
    Originally Posted by Mr View Post
    Hey NextGen, I've recently decided to help the community get started with the android sdk.Tustin
    I've been getting request on how to make android apps so i'll start you out with the basics and add more gradually.
    In order for you to get started you need You must login or register to view this content. and some background in java is required otherwise you will just copy what i do and try and play with it.

    Java Help (Credits to primetime43):
    You must login or register to view this content.
    You must login or register to view this content.

    Getting Started
    Spoiler:

    On the android studio home you will need to create a new project
    Spoiler:
    You must login or register to view this content.


    Name your project:
    Spoiler:
    You must login or register to view this content.


    Usually i'd have my api level up to 4.4 kitkat but you can go ever low you want. lowest i would go wout be api 14 on 4.0.
    Spoiler:
    You must login or register to view this content.


    Select blank activity and hit next
    Spoiler:
    You must login or register to view this content.


    Hit next on this screen
    Spoiler:
    You must login or register to view this content.


    If you are having trouble viewing the preview, select an api that suits you. In this case, api 21 fits my preview well
    Spoiler:
    You must login or register to view this content.


    On the left you have all your project files, middle is usually where you write your code.
    In layouts, you will have a design tab and a text tab at the bottom, you cans switch between each other
    Spoiler:
    You must login or register to view this content.



    On our design tab you, you will have a visual studio/netbeans like gui designer where you can drag views onto the screen
    Spoiler:
    You must login or register to view this content.


    What i want you to do is drag a button onto the screen and move the text to the center so you will have a better feel of how it operates. It takes a while to get use to.
    Spoiler:
    You must login or register to view this content.


    Click on the click button and you will see properties on the bottom right. Give the button a custom text.
    Spoiler:
    You must login or register to view this content.


    Scroll up and give the button an id, you will use that id in the code, also click on the TextView and give that an id called "textview"
    Spoiler:
    You must login or register to view this content.


    Here we have the onCreate Method where we initialize our views and populate the activity activity
    Spoiler:
    You must login or register to view this content.


    In this image we initialize out views, having out view global so it can be accessed anywhere within the class
    Spoiler:
    You must login or register to view this content.


    Now here we implement an interface, hitting alt enter will solve your problems. When adding the interface, it implements the methods to override so you can use that for your view. In this case we will use OnClickListener for the button. Notice how we use "this", the reason we did that is because this class implements the method we will be overriding. Typically you would use the OnClick method this way but for speed you can test.
    Spoiler:
    You must login or register to view this content.


    Run the app/emulator and see what you come up with, here we have our default untouched activity
    Spoiler:
    You must login or register to view this content.


    Once clicked it will bring up a toast saying hello world as well as changing the text of the textview
    Spoiler:
    You must login or register to view this content.



    Beginner/Intermediate Tutorials
    Spoiler:

    Sources:


    Credits:
    Mr Smithy
    Google
    The guy who made android but idk his name.Tustin

    Sorry for the sloppyness, it was a bit rushed, make a request if you want a tutorial done on something.


    Thank you for this. I'll start working on my first project soon :p
  6. 06-17-2015, 01:32 PM
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    464
    Posts
    12,583
    Reputation
    Nov 2013
    NextGenUpdate
    Will start accepting tutorial request with detailed explanation.
  7. 06-17-2015, 07:14 PM
    Chris's Avatar
    Chris
    Former Staff
    Chris's Avatar
    Chris
    Former Staff
    5,467
    Posts
    42,862
    Reputation
    Dec 2011
    NextGenUpdate
    Nice to see that you're widening your variety.
  8. 06-18-2015, 01:22 AM
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    464
    Posts
    12,583
    Reputation
    Nov 2013
    NextGenUpdate
    Originally Posted by Natsu View Post
    Nice to see that you're widening your variety.


    I think people should try out android developing, its fun to work with Happy

    Added new sauce btw
  9. 06-20-2015, 08:04 AM
    CyberNomadic's Avatar
    CyberNomadic
    Web Developer
    CyberNomadic's Avatar
    CyberNomadic
    Web Developer
    2,443
    Posts
    22,295
    Reputation
    Aug 2010
    NextGenUpdate
    Thanks for the contribution sir Smile
  10. 07-06-2015, 09:03 PM
    43
    Posts
    90
    Reputation
    Apr 2015
    NextGenUpdate
    Nice tutorial thanks for sharing this
  11. 10-11-2015, 03:51 PM
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    Mr Smithy x's Avatar
    Mr Smithy x
    Former Staff
    464
    Posts
    12,583
    Reputation
    Nov 2013
    NextGenUpdate
    Added a new project

    Model View Controller with RecyclerView (Common MVC Design)
    Preview: You must login or register to view this content.