• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Simple Android App

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 123
Firefox Browser Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is your target to learn android, or to learn java?
 
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Johnny Cache
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Johnny Cache
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.

Looks like it might be complicated. I will give it a shot, though.
 
Johnny Cache
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Screenshot-from-2013-01-28-11-01-27.png
[Thumbnail for Screenshot-from-2013-01-28-11-01-27.png]
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic