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. 03-28-2015, 02:54 AM
    RTE's Avatar
    RTE
    Keep it real!
    RTE's Avatar
    RTE
    Keep it real!
    3,315
    Posts
    63,963
    Reputation
    Feb 2013
    NextGenUpdate
    Nice tutorial! Tiphat
  4. 03-28-2015, 02:55 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 ResistTheEarth View Post
    Nice tutorial! Tiphat


    Thanks Happy
  5. 03-29-2015, 12:00 AM
    TehMerkMods's Avatar
    TehMerkMods
    I’m too L33T
    TehMerkMods's Avatar
    TehMerkMods
    I’m too L33T
    1,363
    Posts
    14,362
    Reputation
    Jun 2014
    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.


    Interesting I may have to learn it Smile
    Seems fairly simple of course the more detail the harder it gets :P
  6. 03-29-2015, 04:10 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
    Originally Posted by TehMerkMods View Post
    Interesting I may have to learn it Smile
    Seems fairly simple of course the more detail the harder it gets :P


    Yeah but it's definitely worth learning c:
  7. 03-29-2015, 04:10 PM
    Reyz's Avatar
    Reyz
    Banned
    Reyz's Avatar
    Reyz
    Banned
    2,962
    Posts
    21,807
    Reputation
    May 2014
    NextGenUpdate
    Great Tutorial M8, I Might Give It A Go Happy
  8. 03-29-2015, 04:36 PM
    TehMerkMods's Avatar
    TehMerkMods
    I’m too L33T
    TehMerkMods's Avatar
    TehMerkMods
    I’m too L33T
    1,363
    Posts
    14,362
    Reputation
    Jun 2014
    NextGenUpdate
    Originally Posted by Mr View Post
    Yeah but it's definitely worth learning c:


    I Can code C++ and C# and ASP.NET but that is pretty much the same as c# so Winky Winky
  9. 03-29-2015, 05:34 PM
    Rath's Avatar
    Rath
    Today Will Be Different
    Rath's Avatar
    Rath
    Today Will Be Different
    4,802
    Posts
    61,574
    Reputation
    Nov 2009
    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.


    Personally, I'd rather use Eclipse than Android Studio. Granted you could make the point that Android Studio was made specifically for Android development, it has a better interface and so on. I guess it just comes down the preference, plus I'm accustom to Eclipse. However it is showing it's age.
  10. 03-29-2015, 05:41 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
    Originally Posted by Rath View Post
    Personally, I'd rather use Eclipse than Android Studio. Granted you could make the point that Android Studio was made specifically for Android development, it has a better interface and so on. I guess it just comes down the preference, plus I'm accustom to Eclipse. However it is showing it's age.


    Yeah i still use eclipse at times for creating libraries but there are some support libraries that google gives you but are unable to show in the eclipse preview which is not great when it comes to designing the app.
  11. 05-14-2015, 09:37 PM
    dandii's Avatar
    dandii
    Gobble
    dandii's Avatar
    dandii
    Gobble
    2
    Posts
    10
    Reputation
    May 2015
    NextGenUpdate
    Ive got ya app mr smithy it works on mi phone bt dont connect to game can ya help anyone plz