Posts

Showing posts from August, 2014

Android-L #gist4: a SimpleSectionedRecyclerView

Image
It is a SimpleSectionedRecyclerViewAdapter.
It is the porting of the SimpleSectionedListAdapter[1] provided by Google with the #io code.

It can be used to realize a simple sectioned list without changing your adapter.

It works with a RecyclerView with a LinearLayoutManager and also work with the TwoWayView with the ListLayoutManager.

Here the code:


ps: the RecyclerView pattern is new... then this code can be improved (I am sure).

[1]: Google Io14

Android-L gist#3 : Recycler View: Item Animations

Image
Here you can find a little collection of ItemAnimators for the RecyclerView.

SlideInOutLeftItemAnimator : which applies a slide in/out from/to the left animation
SlideInOutRightItemAnimator : which applies a slide in/out from/to the right animation
SlideInOutTopItemAnimator : which applies a slide in/out from/to the top animation

Github repo:
https://github.com/gabrielemariotti/RecyclerViewItemAnimators

Android-L gist#2: A little gist for the new Toolbar

Image
Android-L introduced a new widget called Toolbar.

The new Toolbar contains the following elements: A navigation button. This may be an Up arrow, navigation menu toggle, close, collapse, done or another glyph of the app's choosing. This button should always be used to access other navigational destinations within the container of the Toolbar and its signified content or otherwise leave the current context signified by the Toolbar.A branded logo image. This may extend to the height of the bar and can be arbitrarily wide.A title and subtitle. The title should be a signpost for the Toolbar's current position in the navigation hierarchy and the content contained there. The subtitle, if present should indicate any extended information about the current content. If an app uses a logo image it should strongly consider omitting a title and subtitle.One or more custom views. The application may add arbitrary child views to the Toolbar. They will appear at this position within the layout…