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

Apps Notepad Tutorial Version 2 Problems

Arigead

Lurker
I've been working through the Notepad Tutorials shipped with Android and struggling as I can't get the second version to work:

Android Developers

I've run this application on both a phone (HTC Hero) and in Eclipse in the emulator and there is no context menu for each added note to Delete the note or Edit it. I've tried changing the minimum version of the project and have been using the solution version of the project instead of the one I completed and still no joy.

Has anybody gotten this project working. I'd really like to see the Context Menu working as I'd like to use it in other apps.

Thanks in advance for any help.
 
Yeah, I see this is a popular topic--almost a year with no follow-ups. I've been having problems with the same bit of the Notepad tutorial. For me, the program runs and does *nothing*.

I had a hell of a time compiling the damn thing as command-shift-O initially inserted the line:

import android.R;

which overrides my own R.java files.

But I'm at a loss as to why the program fails to respond to any user input at all. Time to bear down and work at this bug!
-smb
 
I never ran through the notepad tutorials before but I just grabbed the V2 solution and built it to the emulator against Android 2.2. If I long press (well, long click) on a note I've added, I get the "Delete Note" option in the context menu. A regular click brings the note up for editing (and pressing back crashes it, haha).

What happens when you guys tap a note? What about long press?
 
Yeah, a long press on the actual note brings up a delete note menu, a short press (tap) bring up the editor and pressing the Menu Button brings up the Add Note option. The Tutorial instructions do not make this very clear.

I also had a hell of a time with the auto generation of the R.java file. I had to modify the provided note_edit.xml file. Any place that had "match_parent" I had to change to "wrap_content".

i.e android:layout_width="match_parent" -> android:layout_width="wrap_content"

Without this change Eclipse complained:
[2010-09-09 15:00:15 - note_edit.xml] Unable to resolve dimension value "match_parent" in attribute "layout_width"
blah blah blah.

After the change and removing all the import android.R that cmd-shift-O brought in I was able to rebuild and get the app running.
 
"match_parent" is the same as "fill_parent." If Eclipse does not recognize it, you need to verify that you are building against 2.2
 
I had a hell of a time compiling the damn thing as command-shift-O initially inserted the line:

import android.R;

which overrides my own R.java files.

Now *this* is a valuable piece of information. Thanks!

Wish google's tutorials would stop stating the obvious and clear up the mysteries!
 
Back
Top Bottom