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 subprocess | |
from datetime import datetime | |
# Get the ISO 8601 UTC datetime | |
now = datetime.utcnow() | |
iso_time = now.strftime('%Y%m%dT%H%M%SZ') | |
# Get the SHA of the latest commit | |
commit_hash = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8').strip()[:7] |
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
mapView.getMapboxMap().addOnMapClickListener { point -> | |
val queryRenderOptions = RenderedQueryOptions(arrayListOf("country-label"), null) | |
mapView.getMapboxMap().queryRenderedFeatures( | |
mapView.getMapboxMap().pixelForCoordinate(point), | |
queryRenderOptions | |
) { | |
val feature: Feature = it.getValueOrElse { | |
throw IllegalStateException() | |
}[0].feature |
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
./gradlew -Pmapbox.abis=none :MapboxGLAndroidSDKTestApp:assembleAndroidTest |
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
# below matches files saved to Environment.getExternalStorageDirectory() + "/from/path" | |
adb pull "`adb shell 'printenv EXTERNAL_STORAGE' | tr -d '\r'`/from/path |
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
/** | |
* Utility class to generate Bitmaps for Symbol. | |
* <p> | |
* Bitmaps can be added to the map with {@link com.mapbox.mapboxsdk.maps.MapboxMap#addImage(String, Bitmap)} | |
* </p> | |
*/ | |
public final class SymbolGenerator { | |
/** | |
* Generate a Bitmap from an Android SDK 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
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
/* | |
* Copyright (C) 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
adb shell dumpsys meminfo <process name> |
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
// DISABLE SCREENSHOT | |
getWindow().setFlags(LayoutParams.FLAG_SECURE,LayoutParams.FLAG_SECURE); |
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 ViewFinder { | |
@SuppressWarnings("unchecked") | |
public static <T extends View> T find(Activity activity, int id) { | |
return (T) activity.findViewById(id); | |
} | |
@SuppressWarnings("unchecked") | |
public static <T extends View> T find(Fragment fragment, int id) { | |
return (T) fragment.getView().findViewById(id); |
NewerOlder