Merge lp://staging/~vbkaisetsu/tomdroid/sort-button-beta into lp://staging/tomdroid/beta

Proposed by Koichi Akabe
Status: Merged
Merged at revision: 459
Proposed branch: lp://staging/~vbkaisetsu/tomdroid/sort-button-beta
Merge into: lp://staging/tomdroid/beta
Diff against target: 350 lines (+126/-12)
8 files modified
res/menu-sw600dp-land/main.xml (+9/-3)
res/menu/main.xml (+6/-0)
res/values/strings.xml (+5/-0)
res/xml/preferences.xml (+5/-0)
src/org/tomdroid/NoteManager.java (+32/-4)
src/org/tomdroid/NoteProvider.java (+8/-2)
src/org/tomdroid/ui/PreferencesActivity.java (+38/-2)
src/org/tomdroid/ui/Tomdroid.java (+23/-1)
To merge this branch: bzr merge lp://staging/~vbkaisetsu/tomdroid/sort-button-beta
Reviewer Review Type Date Requested Status
Tomdroid Maintainers Pending
Review via email: mp+123299@code.staging.launchpad.net

This proposal supersedes a proposal from 2011-10-24.

Description of the change

I resubmit this request.

This branch adds a sort button on the action bar.
Please consider merging it.

Thanks.

To post a comment you must log in.
Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote : Posted in a previous version of this proposal

I just tested the new functionality and really liked it. I also could not find any bug. Works great and looks awesome!

What was not clear to me from the beginning, are the sort-icons in the actionbar.
Atm you are presenting the A-Z icon when sorting by modification date and the clock icon, when sorting alphabetically.
It seems logical, because the button will change it to the shown mode.

One could argue that the button should rather show the actual sorting method instead to indicate the used method to the user. In my opinion, the always visible localization in the actionbar seems to be perfect for showing the user what is on the screen right now, how it is sorted at the moment. He/She will anyways see, what is happening when clicking on it.

I am confused how it is now, but this is just a personal opinion.
What do you think?

Revision history for this message
Koichi Akabe (vbkaisetsu) wrote : Posted in a previous version of this proposal

Hello Stefan,

In my opinion, we can know the current sorting mode when we look at the list.
I think the button should show what will happen when the button is clicked.

Regards,
Koichi Akabe

Revision history for this message
Olivier Bilodeau (plaxx) wrote : Posted in a previous version of this proposal

Not sure about showing filters in the actionbar. In Settings it's nice.

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote : Posted in a previous version of this proposal

could you adopt this code to the beta branch, too? this would be great!

Revision history for this message
Koichi Akabe (vbkaisetsu) wrote : Posted in a previous version of this proposal

Hi,

Um... It's too difficult to merge, because the method to layout the actionbar is changed.
The stable code uses xml to layout it, but it was removed on the beta branch and changed to java.

Therefore, we should rewrite the layout code if we include this feature.

Revision history for this message
Koichi Akabe (vbkaisetsu) wrote : Posted in a previous version of this proposal

Ah, it's wrong... Beta also use xml for layout, but it has many changes.

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote : Posted in a previous version of this proposal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

We now use the native Android Actionbar.
If you want to include an Actionbar Button, you just have to make a
menu entry and in the xml you can choose, if you want to display it as
a menu entry, in the actionbar, or dependend on the available space.

So it should be much easier now. Just delete all the old
actionbar-stuff and make a menu button instead!

On 09/07/2012 11:51 AM, Koichi Akabe wrote:
> Ah, it's wrong... Beta also use xml for layout, but it has many
> changes.
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlBJxEkACgkQXeaPvgR0RGdPgwCgtcAdCSztArPopSh8W5DUz2L9
1O4Ani5AYnddS7LajmS/tV/jM9zX0Dpq
=VmSZ
-----END PGP SIGNATURE-----

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote : Posted in a previous version of this proposal

We use the native Android actoinbar now. There, you just have to define a new menu-entry and in the xml you can choose to display it in the actionbar, or as menu-button (or dependend on the available space).
Therefore this part is much easier now.

The search-list is also generated by Tomdroid.java now. So also this should be less work.

In principal, a rewrite is probably the easiest way. Generate a settings entry a menu entry and the list-sorting.

Revision history for this message
Koichi Akabe (vbkaisetsu) wrote : Posted in a previous version of this proposal

Hi, I created a new branch at:
  https://code.launchpad.net/~vbkaisetsu/tomdroid/sort-button-beta

The sort button works, but I don't now how to change the icon. (I tried setIcon and setVisible, but they didn't work on Android 2.2)
Do you have any idea?

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote : Posted in a previous version of this proposal

I would warmely suggest to only use icons from the android source!

My idea is to just take the icon @android:drawable/ic_menu_sort_by_size and exchange the caption with Sort by Date and Sort by Name.
This solves the problem of not having an icon for sort by date. I think this icon is universal for all kinds of sorting :-)

can I delete this merge request, as you already proposed a new one?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches