New programmer please help

Discussion in 'Application Development' started by syang, Jul 15, 2013.

  1. syang

    syang Member
    5

    Jul 15, 2013
    6
    0
    5
    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
    4,238

    Jun 23, 2010
    32,448
    30,765
    4,238
    Male
    Douglas, MA
    I moved this here to get some better eyes on it.:)
     
    syang likes this.
  3. ErinGoBragh

    ErinGoBragh Well-Known Member
    63

    Jul 15, 2013
    116
    26
    63
    Female
    Grad Student
    Massachusetts, USA
    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
    5

    Jul 15, 2013
    6
    0
    5
    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
    63

    Jul 15, 2013
    116
    26
    63
    Female
    Grad Student
    Massachusetts, USA
    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
    5

    Jul 15, 2013
    6
    0
    5
    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
    63

    Jul 15, 2013
    116
    26
    63
    Female
    Grad Student
    Massachusetts, USA
    Is this app going to get words from a database, user input or a fixed list you will program?
     
  8. syang

    syang Member
    5

    Jul 15, 2013
    6
    0
    5
    fixedlist
     
  9. out of ideas

    out of ideas Well-Known Member
    93

    May 19, 2012
    641
    145
    93
    You could just use strings. how many words you gonna have?
     
  10. syang

    syang Member
    5

    Jul 15, 2013
    6
    0
    5
    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...