New programmer please help


Last Updated:

  1. syang

    syang Member This Topic's Starter

    Joined:
    Jul 15, 2013
    Messages:
    6
    Likes Received:
    0
    So I just started programming in android (I already know Java)
    I am planning to do a simple SAT Vocab app just with some flashcards. Does anyone know how i can start? Should each card be it's own fragment? Please give me some directional guidance so i can research some specific topics. THANK YOU SO MUCH
     

    Advertisement
  2. Unforgiven

    Unforgiven -.. --- - / -.. .- ... .... Moderator

    Joined:
    Jun 23, 2010
    Messages:
    31,571
    Likes Received:
    28,360
    I moved this here to get some better eyes on it.:)
     
    syang likes this.
  3. ErinGoBragh

    ErinGoBragh Well-Known Member Contributor

    Joined:
    Jul 15, 2013
    Messages:
    116
    Likes Received:
    26
    You shouldn't need a fragment for each word. Try basing your GUI on the android developer basic GUI tutorial. Work through the whole tutorial, and then change variables around to see what that does to the app.
    Then try making a vocab class to hold your words and definitions and instantiate it in your MainActivity. Then write functions to access the data in that class. Access the strings in your GUI using findViewById, instead of hard coding them in the GUI.

    Hope that gets you started :)
     
    syang likes this.
  4. syang

    syang Member This Topic's Starter

    Joined:
    Jul 15, 2013
    Messages:
    6
    Likes Received:
    0
    Hi Thank you! I've done a bit research so I'm getting started. So should I just store my data of the words/definitions in a new class? I was researching if there was some data structure that could hold that type of information.
     
  5. ErinGoBragh

    ErinGoBragh Well-Known Member Contributor

    Joined:
    Jul 15, 2013
    Messages:
    116
    Likes Received:
    26
    Could you tell us a bit more about what you're trying to do?

    There are many different ways to store data in an app. I like to use a shared data class personally when data will be accessed by different fragments, but this is more complex than needed if there is only one activity.

    Pseudo-code:
    public class MyData {
    private String myString = "Hello"; \\default, or initial value
    public String getMyString() {
    return myString;
    }
    public void setMyString(String newString) {
    myString = newString;
    }
    }
     
    syang likes this.
  6. syang

    syang Member This Topic's Starter

    Joined:
    Jul 15, 2013
    Messages:
    6
    Likes Received:
    0
    I was just wondering where I could store the words/definitions. I could simply use an array of a new class called VocabWords which could store a word/definition but I was wondering if there was a better way to store them to access it later? (And sorry about hte fragment comments, I'm actually not using any in my app)
     
  7. ErinGoBragh

    ErinGoBragh Well-Known Member Contributor

    Joined:
    Jul 15, 2013
    Messages:
    116
    Likes Received:
    26
    Is this app going to get words from a database, user input or a fixed list you will program?
     
  8. syang

    syang Member This Topic's Starter

    Joined:
    Jul 15, 2013
    Messages:
    6
    Likes Received:
    0
    fixedlist
     
  9. out of ideas

    out of ideas Well-Known Member

    Joined:
    May 19, 2012
    Messages:
    641
    Likes Received:
    145
    You could just use strings. how many words you gonna have?
     
  10. syang

    syang Member This Topic's Starter

    Joined:
    Jul 15, 2013
    Messages:
    6
    Likes Received:
    0
    okay. I was thinking of using like a sqlite database? But I guess you're right, I don't reallly have that much data I can just probably store it in one of my classes.
     

Share This Page

Loading...