This file contains hidden or 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
apply plugin: 'com.android.application' | |
import com.android.build.OutputFile; | |
dependencies { | |
compile project(':lib') | |
} | |
// map for the version code for ABIs. | |
// x86 is more important because x86 devices also support arm. | |
// Same for mips | |
ext.versionCodes = ["armeabi-v7a":1, "mips":2, "x86":3, "all":0] | |
android { |
This file contains hidden or 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
aapt dump badging MyAwesomeApplication.apk |grep version |
This file contains hidden or 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 static Uri resourceToUri(final Context context, final int resID) { | |
return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + | |
context.getResources().getResourcePackageName(resID) + '/' + | |
context.getResources().getResourceTypeName(resID) + '/' + | |
context.getResources().getResourceEntryName(resID)); | |
} |
This file contains hidden or 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
if(BuildConfig.DEBUG){ | |
Log.d(TAG, this.getClass().getSimpleName() + " - onCreate!"); | |
} |
This file contains hidden or 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
private void checkLastKeyWasEnter(final Editable pSequence) { | |
if (pSequence.length() > 0 && pSequence.charAt(pSequence.length() - 1) == '\n') { | |
pSequence.replace(pSequence.length() - 1, pSequence.length(), ""); | |
} | |
} |
This file contains hidden or 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
private class OnMyEditorActionListener implements OnEditorActionListener { | |
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { | |
if (actionId == R.id.your_new_ID || actionId = EditorInfo.IME_Null) { | |
doSomething(); | |
return true; | |
} | |
return false; | |
} | |
} |
This file contains hidden or 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
export JAVA_HOME='/usr/libexec/java_home -v 1.8' | |
export ANDROID_HOME='/Users/dominic.thomas/Library/Android/sdk' | |
export GRADLE_HOME='/Users/dominic.thomas/Build/gradle-2.2.1' | |
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$GRADLE_HOME/bin:$JAVA_HOME/bin |
This file contains hidden or 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
card_view:cardUseCompatPadding = "true" | |
card_view:cardCornerRadius="10dp" | |
card_view:contentPaddingLeft="20dp" | |
card_view:contentPaddingRight="@dimen/activity_horizontal_margin" | |
card_view:contentPaddingTop="20dp" | |
card_view:contentPaddingBottom="@dimen/activity_vertical_margin" |
This file contains hidden or 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
ffmpeg -i inputfile.wav -ab 320k outputfile.mp3 |