I put together a website and am now trying to make an android app (and later one for iphones) that mimics its behavior without 'cheating' and having the app just connect to the website. But I only somewhat know what I'm doing so I have a few questions about design and actual coding.
One page, after gathering the requested information from the database, displays a mnemonic vertically like this:
Sleep changes Interest loss Guilt Energy loss Concentration loss Appetite changes Psychomotor agitation/******ation Suicidality
But also, on some of these lines, I have what are essentially footnotes that are lists of like 2-10 words. On the website, this is easily done by putting a superscripted number after the word and using, for example, <a href="#guilt"> to scroll down the page to the <a id="guilt"> tag. I have 3 ideas of how to do this on the app:
1) Since I need to make the first letter of the mnemonic bold and maybe larger, and I want the user to be able to easily get down the page to the footnotes, just use a WebView and build this using html, which makes it easy to adjust the font on a single letter and create the anchor tags. However, will that actually work and scroll down to the id tag?
2) Make it so that if the user clicks on something following the word (some sort of button?), they get a pop-up that contains the footnoted information. Then I would just have to learn how to adjust the font of just the first letter in a TextView (I've already googled around and this seems possible, at least).
3) Add a little plus sign after the word that when clicked will expand to show the extra information, similar to how this forum will show the first post of a thread if you click the plus sign in front of the thread's name. How would this be accomplished, though?
If I'm being too vague somewhere, please let me know. Thanks.
All three of your ideas seem like they will work for you. It's going to come down to personal preference. Are you looking for the easiest implementation?
#2 seems easiest, just have the button pop up a DialogFragment. Not sure how to uses different size text in a textview, but I am sure it's possible or you could just use two textviews.
You might also be able to style a ToggleButton in a way that gets you the desired behavior.
If you're just trying to learn Android, this might be a good spot to create your own custom control. Just extend LinearLayout and add the elements you need.