Skip to content

Instantly share code, notes, and snippets.

View balachandarlinks's full-sized avatar

Balachandar Kolathur Mani balachandarlinks

View GitHub Profile
@balachandarlinks
balachandarlinks / contact_name_lookup.java
Last active June 15, 2019 21:30
Retrieve contact name by giving a phone number
/**
*
* @param context
* @param phoneNumber
* @return contactName
*/
public static String getContactName(Context context, String phoneNumber) {
Uri uri = Uri.withAppendedPath(
PhoneLookup.CONTENT_FILTER_URI,
@balachandarlinks
balachandarlinks / ImageFlipper.java
Last active June 15, 2019 21:31
ImageFlipper helps you to run a flip animation with a series of images on any ImageView.
public class ImageFlipper{
private static final int START_ANGLE = 90;
private static final int END_ANGLE = 270;
private int animationDuration = 800;
private ObjectAnimator flipObjectAnimator;
public ImageFlipper(final View targetView, final int[] drawableResources){
((ImageView)targetView).setImageResource(drawableResources[0]);
flipObjectAnimator = ObjectAnimator.ofFloat(targetView, "rotationY", START_ANGLE, END_ANGLE);
@balachandarlinks
balachandarlinks / ViewAnimationUtilsCircularReveal.java
Last active June 15, 2019 21:31
ViewAnimationUtils - Circular Reveal Effect
//Reveal View. Note: View should be invisible before revealing
currentTubeStatusContainer.setVisibility(View.INVISIBLE);
// Do the API compatibility check
new Timer().schedule(new TimerTask() {
@Override
public void run() {
getActivity().runOnUiThread(new Runnable() {
@Override