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
<formatted> | |
Hello, <semibold><color value="#FF00FF00"><italic>World</italic></color></semibold>. | |
Press this <link value="https://go.com">link</link> to know more. | |
</formatted> |
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
fun ViewGroup.children() : List<View> = arrayListOf<View>().apply { | |
for (i in 0..childCount-1) { | |
add(getChildAt(i)) | |
} | |
} |
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
@Test | |
fun testEmitWithDelays() { | |
val DELAY = 500L | |
val COUNT = 5 | |
val latch = CountDownLatch(1) | |
val startMoment = System.currentTimeMillis() | |
var endMoment : Long = 0 | |
Observable |
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
This diagram llustrates flow of states when we have to add some location-aware functions into UI |
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 void printPermissions(Context context) { | |
PackageInfo android; | |
try { | |
android = context.getPackageManager().getPackageInfo("android", PackageManager.GET_PERMISSIONS); | |
} catch (PackageManager.NameNotFoundException e) { | |
e.printStackTrace(); | |
return; | |
} | |
PermissionInfo[] permissions = android.permissions; |