This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| import java.lang.reflect.ParameterizedType; | |
| import java.lang.reflect.Type; | |
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.Iterator; | |
| import com.google.gson.Gson; | |
| import com.google.gson.JsonArray; | |
| import com.google.gson.JsonDeserializationContext; | |
| import com.google.gson.JsonDeserializer; | 
| public class JacksonConverter implements Converter | |
| { | |
| private final ObjectMapper mapper; | |
| public JacksonConverter(ObjectMapper mapper) | |
| { | |
| this.mapper = mapper; | |
| } | |
| @Override public Object fromBody(TypedInput body, Type type) throws ConversionException | 
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | 
| public class SimpleListLayout extends TwoWayLayoutManager { | |
| public SimpleListLayout(Context context, Orientation orientation) { | |
| super(context, orientation); | |
| } | |
| @Override | |
| protected void measureChild(View child, Direction direction) { | |
| measureChildWithMargins(child, 0, 0); | |
| } | 
You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.
The RecyclerView should use a LinearLayoutManager.
You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter provided by Google
Example:
| // on error the server sends JSON | |
| /* | |
| { "error": { "data": { "message":"A thing went wrong" } } } | |
| */ | |
| // create model classes.. | |
| public class ErrorResponse { | |
| Error error; | |
| /* | |
| * Copyright (C) 2014 skyfish.jy@gmail.com | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | 
| AppCompat-v7:21 provides a very useful way of dealing with pressed/focused/activated states maintaining backwards compatibility downto API-7, but there's a small issue (big for some) with the default selectableItemBackground: It uses some PNGs and/or default values for API<21. | |
| The main reason is that android drawable resource definitions (prior API 21) CANNOT use theme attributes at all, so there's no way of making something like: | |
| <shape android:shape="rectangle"> | |
| <solid android:color="?attr/colorControlHighlight" /> | |
| </shape> | |
| For this, I've put this simple mockup on how to give your app better drawables that the appcompat defaults. | 
| /* | |
| * Copyright (C) 2014 I.C.N.H GmbH | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |