Skip to content

Instantly share code, notes, and snippets.

@ishitcno1
ishitcno1 / BouncingBallsActivity.java
Created June 20, 2014 00:49
android property animation bouncing balls
public class BouncingBallsActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_bouncing_balls);
LinearLayout container = (LinearLayout) findViewById(R.id.ac_bouncing_balls_container);
container.addView(new MyAnimationView(this));
}
@ignasi
ignasi / resizer-xxhdpi.sh
Last active February 7, 2021 15:29
Android XXHDPI Resizer (Tested on OS X Mavericks)
#!/bin/bash
f=$(pwd)
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi
# fake argv and argc in bash
argc=$#; argv[0]=$0 # argv[0] is a prog name
for foo in $( seq $argc )
do
@keyboardr
keyboardr / FragmentUtils.java
Last active March 8, 2019 05:30
Utility method for getting the appropriate parent of a Fragment for a given callback interface.
import android.support.v4.app.Fragment;
public class FragmentUtils {
/**
* @param fragment
* The Fragment whose parent is to be found
* @param parentClass
* The interface that the parent should implement
* @return The parent of fragment that implements parentClass,