Skip to content

Instantly share code, notes, and snippets.

View martin640's full-sized avatar
🐧

Martin M. martin640

🐧
  • Bánovce nad Bebravou, Slovakia
View GitHub Profile
@Heilum
Heilum / gist:f5cc44bf663f3722bd19097be47ccf9b
Last active February 19, 2024 07:55
let Android Activity's transition animation like iOS navigationController's push-pop one
1.Override CommonActivity's startActivity and finish
@Override
public void startActivity(Intent intent) {
super.startActivity(intent);
overridePendingTransition(R.anim.from_right_in, R.anim.from_left_out);
}
@Override
public void finish() {
super.finish();
@catehstn
catehstn / AndroidOneColorImage.java
Last active May 27, 2024 12:11
Android create one color image
/**
* A one color image.
* @param width
* @param height
* @param color
* @return A one color image with the given width and height.
*/
public static Bitmap createImage(int width, int height, int color) {
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);