This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
| public class NewIntentProcessor extends AbstractProcessor { | |
| private static final String METHOD_PREFIX = "start"; | |
| private static final ClassName classIntent = ClassName.get("android.content", "Intent"); | |
| private static final ClassName classContext = ClassName.get("android.content", "Context"); | |
| private Filer filer; | |
| private Messager messager; | |
| private Elements elements; | |
| private Map<String, String> activitiesWithPackage; | 
| ImageView imageView = (ImageView) findViewById(R.id.card_thumbnail_image); | |
| Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.rose); | |
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ | |
| //Default | |
| imageView.setBackgroundResource(R.drawable.rose); | |
| } else { | |
| //RoundCorners | |
| RoundCornersDrawable round = new RoundCornersDrawable(mBitmap, | |
| getResources().getDimension(R.dimen.cardview_default_radius), 0); //or your custom radius | 
This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
| brew update | |
| brew versions FORMULA | |
| cd `brew --prefix` | |
| git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
| brew install FORMULA | |
| brew switch FORMULA VERSION | |
| git checkout -- Library/Formula/FORMULA.rb # reset formula | |
| ## Example: Using Subversion 1.6.17 | |
| # | 
| app.on('ready', function () { | |
| var globalShortcut = require('global-shortcut'); | |
| globalShortcut.register('Alt+Command+I', function() { | |
| mainWindow.toggleDevTools(); | |
| }); | |
| }); | 
| import android.util.Log; | |
| import com.squareup.leakcanary.AnalysisResult; | |
| import com.squareup.leakcanary.DisplayLeakService; | |
| import com.squareup.leakcanary.HeapDump; | |
| import retrofit.RestAdapter; | |
| import retrofit.RetrofitError; | |
| import retrofit.http.Multipart; | |
| import retrofit.http.POST; | |
| import retrofit.http.Part; | |
| import retrofit.mime.TypedFile; | 
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="action_pause">#FF8F00</color> | |
| <color name="action_resume">#43A047</color> | |
| </resources> | 
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));| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.sample.myapplication" > | |
| <application | |
| android:allowBackup="true" | |
| android:icon="@drawable/ic_launcher" | |
| android:label="@string/app_name" | |
| android:theme="@style/AppTheme" > | |
| <activity | 
| # | |
| # Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
| # Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
| # | |
| # Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
| # | |
| # Alternative to http://www.groths.org/trim-enabler-3-0-released/ | |
| # Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4 | |
| # See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks | |
| # And here: http://forums.macrumors.com/showthread.php?t=1410459 |