This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TransitionDrawable transition = (TransitionDrawable) view.getBackground(); | |
if (toggle) { | |
view.startTransition(1200); | |
} else { | |
view.reverseTransition(1200); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ResizeAnimation extends Animation { | |
final int startWidth; | |
final int targetWidth; | |
View view; | |
public ResizeAnimation(View view, int targetWidth) { | |
this.view = view; | |
this.targetWidth = targetWidth; | |
startWidth = view.getWidth(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javax.xml.bind.DatatypeConverter.printHexBinary(bytes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from http://developer.android.com/reference/java/lang/Object.html | |
// Use @Override to avoid accidental overloading. | |
@Override public boolean equals(Object o) { | |
// Return true if the objects are identical. | |
// (This is just an optimization, not required for correctness.) | |
if (this == o) { | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TextView | |
android:shadowColor="@color/black" | |
android:shadowDx="1" | |
android:shadowDy="1" | |
android:shadowRadius="1.5" | |
android:textColor="@color/white" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ResourceBundle config = ResourceBundle.getBundle("config"); | |
System.out.println(config.getString("api_key")); |