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
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; |
app.on('ready', function () { | |
var globalShortcut = require('global-shortcut'); | |
globalShortcut.register('Alt+Command+I', function() { | |
mainWindow.toggleDevTools(); | |
}); | |
}); |
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 | |
# |
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
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 |
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; |