wood burning stoves 2.0*
The moose likes Android and the fly likes Simple Android App Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Simple Android App" Watch "Simple Android App" New topic
Author

Simple Android App

Johnny Cache
Greenhorn

Joined: Jan 05, 2013
Posts: 5
Hi all,

I've followed an instructional video for making an app in Android, and I've made a basic app that displays a picture on the phone and shows two buttons. But now I need to assign commands to the buttons: one to take you to another screen with an animated gif with a button to exit, and two a "cancel" button. But I don't know anything about java.

Please help me, I was hoping to start learning java by doing, and I've hit a roadblock early.

Thanks!
Kathleen Angeles
Ranch Hand

Joined: Aug 06, 2012
Posts: 122

Is your target to learn android, or to learn java?
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

Hello and welcome to the Ranch!

Please ChooseOneForumCarefully. There is a separate forum dedicated to questions related to Android. Though your original post is not clear on whether you're asking about Android or Java development, I think the topic is more suitable for that forum.

As for your problem, I don't think it's a good idea to try to learn Java by starting with Android development; actually, I don't think it's even possible. You should at least be familiar with Core Java in order to be able to develop something for Android, so I would suggest you start with that first.


The quieter you are, the more you are able to hear.
Johnny Cache
Greenhorn

Joined: Jan 05, 2013
Posts: 5
My main goal is to write the app.

Maybe you're right, and this is the wrong subforum.

But all I need is to assign something to my button that takes me to another page that shows a gif and has another button.

The actual Android app exists already, it just doesn't do anything lol.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4167
    
  21

In Android, you have 'Activities' that you start, not pages that you show. You start an Activity by creating an Intent which the targeted Activity will respond to. There are different ways to do this depending on how the Activity is coded. For a quick tutorial on moving from Activity to Activity see this page on the Android developer's network.


Steve
Johnny Cache
Greenhorn

Joined: Jan 05, 2013
Posts: 5
Thanks.

Looks like it might be complicated. I will give it a shot, though.
Johnny Cache
Greenhorn

Joined: Jan 05, 2013
Posts: 5
I was a bit intimidated by the instructions linked to above, but finally got around to it today. Only thing is, now the whole app seems to be messed up, with 13 errors. (See attached.)

Can anyone please tell me how to go about fixing this?

Thanks


[Thumbnail for Screenshot from 2013-01-28 11:01:27.png]

Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4167
    
  21

Without seeing code it is hard to be sure, but the errors with the missing resource IDs and the fact that the generate R class is not building suggests that you have a problem in one of your XML files. Probably not the Manifest, but either a layout or a value resource.
Johnny Cache
Greenhorn

Joined: Jan 05, 2013
Posts: 5
Here's a link for the entire project.

Everything used to work fine before I followed the steps in the link; the app used to start up on my phone, the buttons just didn't do anything.
 
 
subject: Simple Android App
 
Similar Threads
How to control CheckBox status in preferences window?
Button Sizes
newbie help with swing forms
Communicating between Two GWT Apps on the same HTML Page
KeyListener