Skip to content

Instantly share code, notes, and snippets.

View matrixxun's full-sized avatar

xwhy matrixxun

  • China
View GitHub Profile
@gabrielemariotti
gabrielemariotti / README.md
Last active February 24, 2021 10:52
How to manage the support libraries in a multi-module projects. Thanks to Fernando Cejas (http://fernandocejas.com/)

Centralize the support libraries dependencies in gradle

Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.

A very good way is to separate gradle build files, defining something like:

root
  --gradleScript
 ----dependencies.gradle
@gabrielemariotti
gabrielemariotti / MaterialLargeImageCard.java
Created September 2, 2014 17:41
A simple gist to build a MaterialCard with cardslib v2.
//Create a Card, set the title over the image and set the thumbnail
MaterialLargeImageCard card = new MaterialLargeImageCard(getActivity());
card.setTextOverImage("Italian Beaches");
card.setDrawableCardThumbnail(R.drawable.sea);
//Set the title and subtitle in the card
card.setTitle("This is my favorite local beach");
card.setSubTitle("A wonderful place");
// Set supplemental actions
@gabrielemariotti
gabrielemariotti / Readme.md
Last active June 14, 2018 08:40
SlideInOutLeftDefaultItemAnimator : a simple animator which applies a slide in/out from/to the left animation to item views in the `RecyclerView`

This class provides a simple animator which applies a slide in/out from/to the left animation to item views in the RecyclerView

This code is cloned from DefaultItemAnimator provided by Google, customizing the part highlighted as "Custom implementation".

Example:

   mRecyclerView.setItemAnimator(new SlideInOutLeftDefaultItemAnimator(mRecyclerView));
@MartinDelille
MartinDelille / enum.cs
Created August 1, 2012 09:15
Enumerating an enum
foreach (Suit suit in Enum.GetValues(typeof(Suit)))
{
// ...
}