• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps New programmer please help

syang

Lurker
Jul 15, 2013
6
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
 
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 :)
 
  • Like
Reactions: syang
Upvote 0
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;
}
}
 
  • Like
Reactions: syang
Upvote 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)
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones