TomMyDevX / openintents

Automatically exported from code.google.com/p/openintents
0 stars 0 forks source link

No actionbar in edit view of notepad on ICS #467

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use an Ice Cream Sandwich device, I used the Galaxy Nexus
2. Create a new document
3. You will see, there is no actionbar or options menu

What is the expected output? What do you see instead?
I expected an actionbar with the dots for the options menu. I see just a 
titlebar instead.

Original issue reported on code.google.com by mennovog...@gmail.com on 4 Jan 2012 at 9:54

GoogleCodeExporter commented 8 years ago
I have fixed this issue, the patch is included in this comment. I did the patch 
on the OI/notepad/NotePad folder.

What I did:
- On the NotesList view, I added the plus icon in the actionbar (when enough 
space). This is only on Android 3.0+.
- On the NoteEditor view, I added the recylcle bin icon in the actionbar (when 
enough space). This is only on Android 3.0+.
- On the NoteEditor view, I fixed the actionbar. It is now shown and the menu 
options are now available for ICS devices. (I did not test this on Honeycomb, 
but it might have been an issue there too)
- On the NoteEditor view and PreferenceActivity view, you can now go back to 
the NotesList by touching the notepad-icon in the actionbar (on all Android 
3.0+ devices)
- I also came across the issue, that on my Galaxy Nexus with ICS I noticed the 
NotesList view never stopped the loading animation, so I fixed that too.

Unfortunately I could not get Android version 1.5 and 1.6 working with my 
patch. Android didn't understand some of the new functions I used, even though 
I only executed there functions inside of an if-statement.

I hope that this is not a huge problem or if somebody else can fix this 
problem, but I really tried.

Best regards,

Menno Vogel

Original comment by mennovog...@gmail.com on 4 Jan 2012 at 11:49

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for your patch!

To make it run on Android 1.5 and 1.6, the simplest would be to create a 
"wrapper class":
Put all functionality that is not available to 1.x into a separate class. In 
your activity, first test whether the class is available, and use the class 
only if it is.

A recent example is CameraFlash in OI Flashlight:
http://code.google.com/p/openintents/source/browse/trunk/flashlight/Flashlight/s
rc/org/openintents/flashlight/CameraFlash.java
which is used here:
http://code.google.com/p/openintents/source/browse/trunk/flashlight/Flashlight/s
rc/org/openintents/flashlight/Flashlight.java#104

See also:
http://developer.android.com/resources/articles/backward-compatibility.html

Original comment by peli0...@googlemail.com on 4 Jan 2012 at 2:03

GoogleCodeExporter commented 8 years ago

Original comment by peli0...@googlemail.com on 4 Jan 2012 at 2:03

GoogleCodeExporter commented 8 years ago
Thanks for the links, they where very usefull. It still took me some time 
before I had it all just right, but I managed to fix it :D.
Now it also works great again on version 1.5 and 1.6.

Here is the new patch, cheers.

Original comment by mennovog...@gmail.com on 4 Jan 2012 at 10:26

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r3990.

Original comment by peli0...@googlemail.com on 6 Jan 2012 at 8:38