wordpress-mobile/WordPress-Android — pull request #1802 by roundhill (2014-09-01 21:22:22+00:00)
Title: Notifications redesign

# Notifications Redesign

An all-new new Notifications area that has a refined and rich experience across Android, iOS and WP.com.

The UX went through many iterations, which is why there's so many commits. Sorry ;)

## What's New?

* Complete redesign of comment list and detail views.
* Simplifies the note detail view, no longer need separate fragment for follows, likes, badges, etc.
* You can now like a comment from `CommentDetailFragment`.
* You can tap on a user's avatar to view their prmary blog, if they have one.
* A user displayed in a follow/like type notification will now show their site title and description, if it is available.
* Links in notifications will load native app views whenever possible.
* Adding new notifications should only require a server-side change.
* Added Simperium db indices for data displayed in the list view, which is a huge performance boost for list view scrolling.

## How's it work?

Notifications are still backed by Simperium, but now use the 'Notes 2.0' model which enable us to do many new and nifty things:

* A notification will contain an array of 'Blocks' in them. A block is a UI element that describes content in an area of a notification. See the `NoteBlock` class to see how the most basic block works. All other blocks are a subclass of `NoteBlock` that perform different rendering based on their block type.
* Each block gets its own row in a ListView in `NotificationsDetailListFragment`. For comment notifications, this Fragment is added to `CommentDetailView`.
* Text data in blocks can have `Ranges`. A range describes a substring in a text that can have an action. Most of the time, these are displayed as links but can also apply different formatting (such as BlockQuote). Ranges that have an action are made clickable by using a `NoteBlockClickableSpan`.
* If a Range's type matches up we will load the appropriate view in the app. For example, a `post` type will load the `ReaderPostDetailFragment` using the Ids that are provided in the Range.

## Notes
* There's a new `NoticonTextView` subclass that uses the noticon font to render the notification icons. This will future-proof icons for new notes added in the future and saves space as we don't need PNGs for the note icons any longer.
* This PR includes a small change to `JSONUtils`, so that submodule will need to be pushed with that change.
* The look and feel is quite different from the rest of the app. I'm going to work with @drw158 to get another PR going that will update the rest of the app to the new 'Calypso' coloring.
* There's an issue with comment likes not coming back around in Simperium that is currently being investigated. You may see comment likes not 'sticking' (even though they will have gone through fine on the site).
* _Not proud of_: In order to get the TextViews in the notifications list view to line up perfectly on HDPI devices, I had to add some half-dp values to `/values-hdpi/dimens.xml`. Wish there was a way around that but I couldn't get them pixel-perfect otherwise.