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

Apps Beginning Android Programming Question

Garrowolf

Lurker
Mar 5, 2016
9
0
I am just starting with android programming and I find that I learn best by trying to do a simple project. I want to create an app that just displays pages offline. Basically it would be a series of pages and a few buttons. Eventually I want to make a larger app with a lot more pages but I want to start with something simple first.
What do I need to be able to do this?
Would each page be done in XML? HTML? How would this work?
 
When you say "pages" do you mean a web page?
If so then you will need to make use of the Android WebView component

http://developer.android.com/guide/webapps/webview.html

Web pages are written in HTML, and are retrieved from a remote web server. There are a number of ways you can implement the server part of this (to generate the HTML). Probably the simplest way is to use a PHP script.
 
  • Like
Reactions: Mikestony
Upvote 0
Skip over what? What is the "answer" you seek?

If you want to create an Android app with a couple of buttons, that's easy.
You need an XML file to create the layout, which specifies where your buttons are on the screen.
You need code to handle the button clicks, and do something.

What exactly do you want your app to do? That is your first problem, determining the function of your app.
 
Upvote 0
Ok, your plan of action would be (not necessarily in this order):-

1. Sketch out your screen layout design
2. If you have multiple screens, how does the user navigate between them?
3. Read a few Android tutorials and books
4. Install the Android development tools
5. Look at some of the sample applications and understand how they work
6. Code up some simple apps (hello world)
7. If you don't know Java, then learn this language (pre-requisite to most of the above)
 
Upvote 0
So you won't help me out beyond go learn it for yourself?

From what you've said so far, your question is so vague/broad. Questions like this are virtually unanswerable. Because you lack so much knowledge, where do I start? With a Java tutorial? With a basic Android 'hello world' tutorial? I could be here all night just putting together links to useful online tutorials, let alone actually typing stuff in for you to read exactly what to do.
So you tell me, beyond the pointers which I've taken the time to give you so far (it's ok you're welcome), what information exactly do want me to spoon feed to you?

In fact you said yourself in the first post that you learn best by trying simple things first. Well that's a great plan. Why don't you try it? You can't get much simpler than putting a couple of buttons on to a page. That's Android 101, and a good place to start.
 
Upvote 0
My question isn't vague at all. You are just not actually reading it. I am asking how the text part of an android app is handled. Do you store each paragraph as an element? I am confused about how you would deal with a lot of text. Could you take several html pages and convert it to another format to show up in the app?
I am trying to learn how to make these but I have a different idea on what kinds of apps to make. A primarily text based app should be simple if I can get someone to answer a question or two - not do it for me. I may just not have the right terminology which is why my searches have come up useless or over my head.
 
Upvote 0
I am asking how the text part of an android app is handled.

So you want to display a block of text? You need to use a TextView
http://developer.android.com/reference/android/widget/TextView.html

Could you take several html pages and convert it to another format to show up in the app?

You could potentially extract information from a HTML page in your app, e.g. the contents of a <p> or <div> element. Once you had the text content, you could then load it into a TextView.

In fact I just found something called JSoup. It seems ideal for what you want, scraping information from a web page. Never used it myself, but here you go:

http://www.androidbegin.com/tutorial/android-basic-jsoup-tutorial/
 
  • Like
Reactions: scary alien
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