https://www.raywenderlich.com/247-react-native-tutorial-building-android-apps-with-javascript
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
echo "# fresco-image-library-samples" >> README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin https://github.com/glidodroid/fresco-image-library-samples.git | |
git push -u origin master | |
*** Create patch for last commit *** | |
git show HEAD > some-patch0001.patch |
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
##Method in the same class: | |
/** See also {@link #myMethod(String)}. */ | |
void foo() { ... } | |
##Method in a different class, either in the same package or imported: | |
/** See also {@link MyOtherClass#myMethod(String)}. */ | |
void foo() { ... } | |
##Method in a different package and not imported: |
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
Usage 1: | |
ContextCompat.getColor(context, R.color.color_name) | |
Usage 2: | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | |
yourTitle.setTextColor(getActivity().getResources().getColor(android.R.color.white, getActivity().getTheme())); | |
}else { | |
yourTitle.setTextColor(getActivity().getResources().getColor(android.R.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
NumberPicker picker = new NumberPicker(this); | |
picker.setMinValue(0); | |
picker.setMaxValue(2); | |
picker.setDisplayedValues( new String[] { "Belgium", "France", "United Kingdom" } ); |
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
<?xml version="1.0" encoding="utf-8"?> | |
style="?android:listSeparatorTextViewStyle" // applied for text view with bottom border. |
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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
apply plugin: "androidx.navigation.safeargs.kotlin" | |
apply plugin: 'com.google.gms.google-services' | |
apply from: "$rootDir/spotless.gradle" | |
def keystorePropertiesFile = rootProject.file("keystore.properties") | |
def keystoreProperties = new Properties() |
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
#!/bin/bash | |
LC_ALL=C | |
RED='\033[0;1;31m' | |
NC='\033[0m' # No Color | |
echo "Running git pre-commit hook" | |
local_branch="$(git rev-parse --abbrev-ref HEAD)" |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion" |
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
apply plugin: 'com.diffplug.gradle.spotless' | |
spotless { | |
kotlin { | |
target '**/*.kt' | |
ktlint("0.36.0") | |
//ktlint("0.36.0").userData(['disabled_rules': 'no-wildcard-imports']) | |
trimTrailingWhitespace() | |
indentWithSpaces() | |
endWithNewline() |
OlderNewer