Help With Alarm Clock

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Help With Alarm Clock

Postby sunny342 » Tue May 18, 2010 1:32 am

Hello anddev members,
Well I am currently in a computer science class in high school, and as a end of the year project I plan to make a alarm clock app. from scratch. I have a good knowledge of java but im new to android development. So i need some help or at least some resources that help. I have managed to setup a linear layout with a list of checkboxs. THese check boxes will represent different alarms that can be checked on and off. On the menu i have setup a button that says add alarm that i want to create a new check box on the screen. How do i do that? Secondly i want when i press the "add alarm" button on the menu, the app. should go to another page/view that will set up the alarm. Is this setup page a separate activity, or just view. Thirdly where do i save the data like the alarm info?

Hope someone can help! any suggestions/reasources would be apprieciated.
Thanks in advance!

P.S. I sorry if some of these questions have been asked elsewhere, its just that this website is blocked at my school so i dont get much time to search.
sunny342
Freshman
Freshman
 
Posts: 4
Joined: Tue May 18, 2010 1:19 am

Top

Re: Help With Alarm Clock

Postby ethan.close » Wed May 19, 2010 5:30 pm

Hi there,

I've been working on alarms for the last week, but am not doing something as complex as you. However, I have a couple suggestions:

To add the new checkbox, I think you need to do that in the code, not in a layout. Check out this link: http://markmail.org/message/bbrk7cao36ypl6uu

When you want to go to another page, I *think* you need to either redraw the page using "setContentView()" or call an activity that sets the content view (or even re-call the whole application - which I'm pretty sure is wrong, unless you're not sure the application is running ;) Someone could correct me here and I would be helped as well.)

Lastly, from what I've read, you should store the alarm settings in the preferences, but definitely don't have to. Here's the official page on the developer site. It should clear things up: http://developer.android.com/guide/topi ... orage.html

Ethan
ethan.close
Freshman
Freshman
 
Posts: 5
Joined: Fri Mar 19, 2010 12:53 am
Location: San Francisco

Re: Help With Alarm Clock

Postby sunny342 » Thu May 20, 2010 6:36 am

Thanks Ethan that was somewhat helpful. I think my original app idea is a bit *cough* greatly ambitious. So i was wondering what exactly are you making ur alarm clock like. If you have any good code share it if you can :D . I read up about preferences. thanks
sunny342
Freshman
Freshman
 
Posts: 4
Joined: Tue May 18, 2010 1:19 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 10 guests