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
import java.util.Locale | |
fun countryCodeToEmojiFlag(countryCode: String) { | |
return countryCode | |
.toUpperCase(Locale.US) | |
.map { char -> | |
Character.codePointAt("$char", 0) - 0x41 + 0x1F1E6 | |
} | |
.map { codePoint -> | |
Character.toChars(codePoint) |
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
if (hasProperty("publishFlavors") && hasProperty("publishTypes")) { | |
afterEvaluate { | |
publishFlavors.splitEachLine(",") { | |
it.each { flavor -> | |
publishTypes.splitEachLine(",") { | |
it.each { type -> | |
publish.dependsOn "publish${type.capitalize()}${flavor.capitalize()}Release" | |
} | |
} | |
} |
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 MainActivity extends Activity implements View.OnClickListener { | |
View mView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mView = findViewById(R.id.view); |
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
package com.exmaple.overlay; | |
import android.app.Activity; | |
import android.graphics.*; | |
import android.graphics.drawable.BitmapDrawable; | |
/** | |
* Convenience factory for creating fullscreen backgrounds that are partially transparent and may contain | |
* multiple circular punch holes to let the lower layers shine through. </br></br> | |
* |