Skip to content

Instantly share code, notes, and snippets.

View ankitbaderiya's full-sized avatar
🏠
Working from home

Ankit Baderiya ankitbaderiya

🏠
Working from home
  • University of Florida
  • Gainesville, FL
View GitHub Profile
@kristopherjohnson
kristopherjohnson / make-android-app-icons.sh
Created August 28, 2016 18:23
bash script to create all necessary sizes of app icons for Android applications
#!/bin/bash
#
# Given a source image, create icons in all sizes needed for an Android launcher icon.
#
# First (required) argument is path to source file.
#
# Second (optional) argument is the filename to be used for the output files.
# If not specified, defaults to "ic_launcher.png".
#
# Third (optional) argument is path to the GraphicsMagick gm executable.
@kristopherjohnson
kristopherjohnson / make-ios-app-icons.sh
Last active January 1, 2024 06:32
bash script to create all necessary sizes of app icons for iOS applications
#!/bin/bash
#
# Given a source image, create icons in all sizes needed for an iOS app icon.
# See <https://developer.apple.com/library/ios/qa/qa1686/_index.html> for details.
#
# First (required) argument is path to source file.
#
# Second (optional) argument is the prefix to be used for the output files.
# If not specified, defaults to "app_icon_".
#
@kristopherjohnson
kristopherjohnson / ItemPickerDialogFragment.java
Last active May 7, 2018 06:42
Android dialog fragment that allows selection of an item from a list
package net.kristopherjohnson;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;