OI Notepad

220 views
Skip to first unread message

Shalin Shah

unread,
Feb 12, 2013, 4:24:34 PM2/12/13
to openi...@googlegroups.com
Hello,


                 I would like to add a feature for the notepad application and make some design changes :-

- Make a sticky note kind of widget fir the notes in which I can save extremely important things to remember.
-Add an action bar search feature for notes if the device is having version of android >3.0 
-Also add a add notes button in action bar for easy access to add notes and if android version is < 3.0 then add a row in the list view at the beginning of the list.and also avoid add icon in the options menu for these lower versions.

Should I start working on it ?

Yours Sincerely,
Shalin Shah
 

Shalin Shah

unread,
Feb 12, 2013, 4:26:31 PM2/12/13
to openi...@googlegroups.com
Also a favorites icon on the right side of notes list activity to select the note as favorite.
--
Yours Sincerely,
Shalin Shah

George Venios

unread,
Feb 12, 2013, 4:31:49 PM2/12/13
to openi...@googlegroups.com

Hello Shalin,

Why wouldn't you add Search as a normal action and let Android put it in the Actionbar or popup menu depending on the API level? Or is there something I missed?

George.

--
You received this message because you are subscribed to the Google Groups "OpenIntents" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openintents...@googlegroups.com.
To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openintents?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

aap

unread,
Feb 12, 2013, 7:36:23 PM2/12/13
to openi...@googlegroups.com
Hi Shalin,


-Also add a add notes button in action bar for easy access to add notes and if android version is < 3.0 then add a row in the list view at the beginning of the list.and also avoid add icon in the options menu for these lower versions.

I don't understand this suggestion... isn't there already an "add note" button in the action bar? And I have no idea what you mean about adding a row in the list view.

I'm running JellyBean. There is already a search command in the menu, though not on the action bar... but if I pick the button from the menu, or if I pick my phone's physical "search" button, a search field appears in the action bar.

How would the widget interact with the rest of OI Notepad? Which note would it show? Would it be editable directly in the widget?

-- Aaron

Shalin Shah

unread,
Feb 13, 2013, 2:49:51 AM2/13/13
to openi...@googlegroups.com
Search adding in action bar is because action bar it is the most interactive and easily accessible tool tool for newer versions of android  with api >=11.As stated on developers.android add the items in action bar which are used most frequently (like adding a note and searching a note).I am using android 2.2 and it is not having action bar so users with api <11 will not have action bar, such users could have something like this as show in screen shot which is more appealing to them.When he clicks on (-) icon a list dialog should appear showing drop down list with all names.The name of the note he clicks should be deleted.

About the widget I was thinking that when user clicks for having widget on home screen a configure activity should ask him which notes does he want to add in the home screen as a sticky note.Also we could give an option of adding new note and when he adds a new sticky note we could add that note in the database.And if he clicks on the note we could directly redirect him to that notes activity where he could do the rest of necessary changes.So it will basically act as a reminder kind of note.
Untitled.png

George Venios

unread,
Feb 13, 2013, 2:59:44 AM2/13/13
to openi...@googlegroups.com

Hi Shalin,

Let me rephrase the question: Are users of <11 not going to have search? If they are, where is the button to be located?
By the way, I don't see a screenshot in your email, you might have forgotten to attach it.

George.

--

Shalin Shah

unread,
Feb 13, 2013, 3:03:29 AM2/13/13
to openi...@googlegroups.com
I mean those users will have to rely on normal search way by opening options menu and searching.I have attached the image.
Untitled.png

George Venios

unread,
Feb 13, 2013, 3:08:03 AM2/13/13
to openi...@googlegroups.com

Ok, that's what I was proposing but I needed to make sure.
As for the image, I'm not sure how it is related to search in <11 but I'm sure Aaron/Friedger have a better understanding on the Notepad's usage and they're better suited to reply to the rest of your suggestions.

Best regards,
George.

--

Shalin Shah

unread,
Feb 13, 2013, 3:13:09 AM2/13/13
to openi...@googlegroups.com
The image is for adding and deleting notes for <11 users for visual appeal. 

aap

unread,
Feb 13, 2013, 9:15:46 AM2/13/13
to openi...@googlegroups.com
Hi Shalin,

Are you saying Search doesn't already appear in the menu on 2.2?

Putting the add command in the action bar even for pre-Honeycomb devices could add value. However the icon you propose doesn't really seem to fit with the rest of the UI. The existing icon from the ICS action bar could be used on pre-Honeycomb devices too. 

The approach for getting it there could be a matter of debate. I am not sure it makes sense to maintain separate code for an action bar replacement for older devices. I think using ActionBarSherlock might be a better approach-- easy to implement and not much additional maintenance burden. However some others in this forum might disagree.

I don't think Delete is a common enough action to warrant action bar placement. The selection mechanism you propose seems awkward to me. The current supported workflows of long-pressing a note and choosing Delete from the menu, or first opening the note, then choosing delete from the menu seem more natural to me. There is room for improvment might if the user wants to delete a bunch of notes at once. I'm not sure it is a common enough case to be worth spending time on... but the right approach is probably to switch to the ICS multi-select / contextual action bar pattern.

Regarding the widget, it is not quite clear to me whether you intend for it to show a list of notes or the text of a note itself. Perhaps both kinds of widgets could be useful. The note list widget possibly could be configured to filter by tags. We would probably want to support multiple instances of that widget with different filter settings.

-- Aaron

Shalin Shah

unread,
Feb 13, 2013, 9:23:07 AM2/13/13
to openi...@googlegroups.com
Ok so probably I would work on this and show it to you and then you tell me the necessary changes on that.ok?

aap

unread,
Feb 13, 2013, 9:32:42 AM2/13/13
to openi...@googlegroups.com
Sounds good. Which part will you try first? Perhaps the widget? Just keep in mind that it's useful to keep separate features in separate commits, perhaps even separate branches. 

Good luck,
-- Aaron

Shalin Shah

unread,
Feb 13, 2013, 9:42:37 AM2/13/13
to openi...@googlegroups.com
Ok sir ya widget would be the first part I should try with and then I ll also try with implementing the action bar for all devices even with api <11.

Friedger Müffke

unread,
Feb 13, 2013, 12:04:28 PM2/13/13
to OpenIntents .
The common recommendation is not to introduce new UI elements like action bar in older APIs. Why should the user of Android 2.2 phone learn two different UI patterns? OpenIntents to be as native as possible.

Friedger


2013/2/13 Shalin Shah <shalins...@gmail.com>
--

aap

unread,
Feb 13, 2013, 10:43:31 PM2/13/13
to openi...@googlegroups.com
I understand that recommendation, but lots of apps don't follow it. So users wind up needing to learn different UI patterns anyway, but meanwhile the apps that follow the rules look dated.

This tutorial page seems to suggest that using action bars on older versions might be OK:

Give some thought as to how the same functionality can be delivered using familiar elements. In many cases this is less of a concern—if newer UI components are prominent in the application ecosystem (such as the action bar), or where the interaction model is extremely simple and intuitive (such as swipe views using a ViewPager).

-- Aaron

Shalin Shah

unread,
Feb 15, 2013, 9:52:03 AM2/15/13
to openi...@googlegroups.com

After some hard work done with basic sticky notes features in OI notepad please have a look at it,it have attached the apk file.Please give me further guidance
NotesList.apk

Shalin Shah

unread,
Feb 15, 2013, 1:49:01 PM2/15/13
to openi...@googlegroups.com
Now I am able to figure out how I could open the corresponding note on clicking the sticky note but then when the user sorts the notelist then the uri of the note change hence there would be a change in the the note opened.So could you guide me on what should I do you could have a look at the apk file with sticky notes opening the correct note when sorted alphabetically.
NotesList2.apk

aap

unread,
Feb 15, 2013, 2:18:18 PM2/15/13
to openi...@googlegroups.com
Hard to provide guidance without seeing your code. Posting APKs is OK but they should always be accompanied by github links. I don't see why the uri of a note should depend on sort order though.

-- Aaron

Shalin Shah

unread,
Feb 15, 2013, 2:23:43 PM2/15/13
to openi...@googlegroups.com
Here is the link please have a look at the WidgetConfig class. https://github.com/shalinshah1993/notepad.

--
You received this message because you are subscribed to the Google Groups "OpenIntents" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openintents...@googlegroups.com.
To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openintents?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Shalin Shah

unread,
Feb 15, 2013, 2:56:49 PM2/15/13
to openi...@googlegroups.com
Sir only have a look at onListItemClicked() method

aap

unread,
Feb 15, 2013, 3:40:55 PM2/15/13
to openi...@googlegroups.com
I think you are losing your note ids in converting from the Cursor to an array. Better to include _ID in the query and use a CursorAdapter instead of an ArrayAdapter. Then you might find that onListItemClick might get passed the real note ids.

-- Aaron

Shalin Shah

unread,
Feb 16, 2013, 2:19:07 PM2/16/13
to openi...@googlegroups.com
Sir,

           You are simple awesome you pointed out the correct mistake of mine finally I am done with creating the sticky notes widget for OI Notepad.But there is much more to add to this.Please give me suggestions .I have attached the apk. Or should I commit this and send a pull request.
notepad+stickynotes.apk

Friedger

unread,
Feb 16, 2013, 3:42:38 PM2/16/13
to Shalin Shah, openi...@googlegroups.com
Please send apk and link to commit or pull request at the same time.

Shalin Shah <shalins...@gmail.com> wrote:

Shalin Shah

unread,
Feb 16, 2013, 4:56:57 PM2/16/13
to openi...@googlegroups.com, Shalin Shah
Sir still the code cleaning is remaining after proper reviewing by you all I will clean it and then send a final pull request

aap

unread,
Feb 17, 2013, 10:36:03 AM2/17/13
to openi...@googlegroups.com, Shalin Shah
Hi Shalin,

Best to do what code cleaning you can before asking for review, just to avoid taking more of reviewers' time than necessary, not to mention hearing comments about required changes you already know about. Actually it's even better to do it before pushing the commits.

Can you explain why a service is required? OI Shopping List has a widget but it doesn't seem to need a service.

-- Aaron

aap

unread,
Feb 17, 2013, 1:29:12 PM2/17/13
to openi...@googlegroups.com, Shalin Shah
Shalin,

I still don't think a service should be needed. Who is going to change the note besides the notepad app itself? So it seems it should be sufficient to update widgets if any exist in the app's onPause() method.

-- Aaron
 
Shalin wrote:
what I was thinking was that when I edit the note in the application then it should change the sticky note also and for that I wanted the service to be called from onUpdate() method of widget class. 
Message has been deleted

Shalin Shah

unread,
Feb 17, 2013, 2:47:21 PM2/17/13
to openi...@googlegroups.com
Or sir I could send a broadcast to widget when I return from action_edit grabbing the text for note,sending it in intent and then if it matches the id of note in widget then I change it ?

Shalin Shah

unread,
Feb 19, 2013, 2:19:50 PM2/19/13
to openi...@googlegroups.com
So now I am almost done with creating the widget , I have attached the .apk file for you all to see however I still have;nt committed since I had some doubts which I need to solve before doing that.

I am able to update the widget when onResume() of noteslist is called but then thing is its called only if I press back button it is not called if I touch on the back button available in the action bar and also I open the note edit activity when I click on the widget so then if the user edits it then inorder to bring the change in remote view text of widget he needs to open the notepad activity atleast once so that the oResume() method is called and update is made.

Can I get please guidance for these two issues. For the later one I think if pressing the back button in edit notes activity should always open notes list and only then should go back to home.What should I do?
NotesList,StickyNotes.apk

Friedger Müffke

unread,
Feb 19, 2013, 4:25:18 PM2/19/13
to OpenIntents .
You could call the update in the content provider, if a note has been updated call the update method.


2013/2/19 Shalin Shah <shalins...@gmail.com>

--

Shalin Shah

unread,
Feb 20, 2013, 3:24:44 AM2/20/13
to openi...@googlegroups.com
Sir ,

                 I am able to update the widget by pressing the phone's manual back button but I get foll error :-
 Failed to get type for: content://org.openintents.notepad/notes/-9223372036854775808 (Unknown URI content://org.openintents.notepad/notes/-9223372036854775808)

obtained in yellow in log when I press the back button of the action bar which means the uri is wrong however there is no such error in when I press the back button of cell phone and the widget gets updated.I searched for this error but ever where there were some mistakes in uri however I am able to get uri correctly by :-
Uri uri1 = getIntent().getData();
Log.d("uril", uri1+"");

in a line just preceding the getContentResolver().query() call line.

aap

unread,
Feb 20, 2013, 9:22:15 AM2/20/13
to openi...@googlegroups.com
Not a very believable note id... where did it come from? What ID do you get for the same note in the case that works?

-- Aaron

Shalin Shah

unread,
Feb 20, 2013, 9:26:57 AM2/20/13
to openi...@googlegroups.com
Ya thats what I am telling when I press back key of phone it gives proper id of say 5 or 2 or 1 whatever is it ID but not when back button of action bar is pressed .

aap

unread,
Feb 20, 2013, 9:30:48 AM2/20/13
to openi...@googlegroups.com
So then you get to jump into the debugger and trace where the wrong id is coming from.

Shalin Shah

unread,
Feb 20, 2013, 9:35:19 AM2/20/13
to openi...@googlegroups.com
Also one more thing the widget is updated when onResume() is called but then if I click on the note it directly opens the edit note activity in which the noteslist is not opened ie resumed.Now in that case what should I do ?

Shalin Shah

unread,
Feb 21, 2013, 3:05:30 AM2/21/13
to openi...@googlegroups.com
Sir ,

         Finally I figured out everything about changing the sticky note directly.Now I have notepad with widget which can be edited directly by a single click on it which opens the edit note activity and changes made there are directly reflected in the note ie it works perfectly.

Now please suggest me what should I do when a note having a sticky widget is deleted.Say I deleted note a then sticky note showing note a should remain or should I delete it ?
Also could someone please suggest me when a note text has larger text then widget size what should I do I have already added the resize widget feature but its available for versions > 3.0.

George Venios

unread,
Feb 21, 2013, 3:11:57 AM2/21/13
to openi...@googlegroups.com

Re: Widget
Can't you make the widget scrollable in addition to resizable? Check how the widgets of Tasks and Google Calendar work, they're good examples of properly implemented widgets.

--

Shalin Shah

unread,
Feb 21, 2013, 3:17:01 AM2/21/13
to openi...@googlegroups.com
Ok thats a good idea I will have a look at them.

Shalin Shah

unread,
Feb 21, 2013, 5:47:10 AM2/21/13
to openi...@googlegroups.com
About scrollbars i have tried vertical scroll bar attribute but the problem in that is whenever I try to scroll the note it opens the edit note activity since remote view has on touch listener.So its not possible to scroll.

George Venios

unread,
Feb 21, 2013, 6:02:22 AM2/21/13
to openi...@googlegroups.com

The view (RemoteView if I recall correctly) subclass used in the widget needs to implement scrolling. The attribute you're referring to only governs scrollbar visibility, if the view supports it.

--

Shalin Shah

unread,
Feb 22, 2013, 4:44:01 PM2/22/13
to openi...@googlegroups.com
Sir,

       So now after finally adding widget for OI Notepad I have send a pull request , attached the .apk file and the code link is here.Please have a look at it. https://github.com/shalinshah1993/notepad.
George about scroll view for widget its still a pending feature request to implement a scrollable textview in widget.More about it can be found here :-http://code.google.com/p/android/issues/detail?id=9580.

Could you please merge my pull request Freidger Sir/Aaron Sir.Now should I working for implementing actionBar ?

Shalin Shah

unread,
Feb 22, 2013, 4:47:04 PM2/22/13
to openi...@googlegroups.com
Sorry forgot to upload .apk here it is.

Yours Sincerely,
Shalin Shah
OI Notepad.apk

Shalin Shah

unread,
Mar 3, 2013, 1:14:40 PM3/3/13
to openi...@googlegroups.com
Sir ,


              I have sent pull request again could you please accept it this time I have modified and cleaned the code as per the requirement

Shalin Shah

unread,
Mar 4, 2013, 2:52:14 PM3/4/13
to openi...@googlegroups.com
Sir
 
                   I came across this feature request to sync the google docs with notepad. I am interested in doing it.

Should I start working on it ?

Yours Sincerely,
Shalin Shah
 

aap

unread,
Mar 7, 2013, 9:50:35 AM3/7/13
to openi...@googlegroups.com
Shalin,

That doesn't sound like the sort of thing one could just go off and implement. Best to start with a detailed proposal which describes what you will sync and how. Keep in mind that OI Notepad doesn't have internet access permission, and we like it that way. Have a look at the Cloudsync repo, and think about what it would take to use it with Google Docs. How will you decide what Docs should become notes and vice versa? You could post a description of your approach here for review and discussion.

-- Aaron

Shalin Shah

unread,
Mar 10, 2013, 5:40:29 AM3/10/13
to openi...@googlegroups.com
Sir ,

                       About the sync part I think we could sync the OI notepad with the .txt files and doc files.Other files need not to be synced.And I am not able to understand what Cloud Sync actually does could you help me.About the direct sync of OI notepad using internet its fine you don't want to have internet access but I think that google's API for google docs it would have been very easy to do that directly,this is what I presume of course I need to have a look at it in depth.

 
Yours Sincerely,
Shalin Shah
 

Shalin Shah

unread,
Mar 24, 2013, 12:50:36 PM3/24/13
to openi...@googlegroups.com
Sir,


             I was going back again through the widget part and I thought maybe this would be a better widget a stack widget as shown in the picture or the original sticky notes would be a better option please give some suggestion.I think this is a better option as the user would be able to see all his notes in short directly by swapping.Or should both of them be kept as widgets I mean different widgets ? 

Yours Sincerely,
Shalin Shah
 
snapshot1.png

Friedger Müffke

unread,
Mar 24, 2013, 3:51:59 PM3/24/13
to OpenIntents .
I think both have valid points. Yes, give it a try!


2013/3/24 Shalin Shah <shalins...@gmail.com>

Yours Sincerely,
Shalin Shah
 

--

Shalin Shah

unread,
Mar 24, 2013, 3:53:57 PM3/24/13
to openi...@googlegroups.com
Thank-you sir and I should keep both of them? 

Friedger Müffke

unread,
Mar 24, 2013, 4:11:02 PM3/24/13
to OpenIntents .
yes, it doesn't harm :-)


2013/3/24 Shalin Shah <shalins...@gmail.com>

--

Shalin Shah

unread,
Mar 26, 2013, 3:25:55 PM3/26/13
to openi...@googlegroups.com
Sir,

               I have managed to create the widget for which I showed you the picture bu the problem is what should I do to keep both the widgets ?

Yours Sincerely,
Shalin Shah

Shalin Shah

unread,
Mar 27, 2013, 12:46:18 PM3/27/13
to openi...@googlegroups.com
                Finally done with both the widgets a small error made by me but now its resolved.I have attached the .apk file with this mail please have a look at it and give me your reviews.

--
You received this message because you are subscribed to a topic in the Google Groups "OpenIntents" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openintents/Dxh9c2e1jz8/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to openintents...@googlegroups.com.

To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openintents?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
OI Notepad.apk

Shalin Shah

unread,
Apr 3, 2013, 2:18:39 PM4/3/13
to openi...@googlegroups.com
Hello,

A pull request for the same has been sent by me with all the previous changes suggested by Aaron sir and Friedger Sir as well as necessary code cleaning as well as clean commit history .Please have a look at it.
Reply all
Reply to author
Forward
0 new messages