val color = annotation.getResId(this) if (color != 0) { ssb.setSpan( ForegroundColorSpan(ContextCompat.getColor(this, color)), text.getSpanStart(annotation), text.getSpanEnd(annotation), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE ) } } } Span annotations val text = getText(R.string.msg_subscribe) as SpannedString val ssb = SpannableStringBuilder(text) val spans = text.getSpans(0, text.length, Annotation::class.java) https://www.youtube.com/watch?v=x-FcOX6ErdI
have notifications yet</annotation>.\n Tap the ( <annotation src="@drawable/ic_megaphone"> </annotation> ) icon to subscribe! </string> https://www.youtube.com/watch?v=x-FcOX6ErdI
condition that should never happen. * The error will always be logged at level ASSERT with the call stack. * Depending on system configuration, a report may be added to the * {@link android.os.DropBoxManager} and/or the process may be terminated * immediately with an error dialog. * @param tag Used to identify the source of a log message. * @param msg The message you would like logged. */ public static int wtf(String tag, String msg) { return wtf(LOG_ID_MAIN, tag, msg, null, false, false); } https://developer.android.com/reference/android/util/Log.html#wtf(java.lang.String,%20java.lang.String)
condition that should never happen. * The error will always be logged at level ASSERT with the call stack. * Depending on system configuration, a report may be added to the * {@link android.os.DropBoxManager} and/or the process may be terminated * immediately with an error dialog. * @param tag Used to identify the source of a log message. * @param msg The message you would like logged. */ public static int wtf(String tag, String msg) { return wtf(LOG_ID_MAIN, tag, msg, null, false, false); } https://developer.android.com/reference/android/util/Log.html#wtf(java.lang.String,%20java.lang.String)
using the default transition, * to a new scene defined by all changes within the given scene root between * calling this method and the next rendering frame. */ public static void beginDelayedTransition(final ViewGroup sceneRoot) { beginDelayedTransition(sceneRoot, null); } https://developer.android.com/reference/android/transition/TransitionManager#beginDelayedTransition(android.view.ViewGroup)
API >= 21 API < 21 https://stackoverflow.com/questions/43004886/resourcescompat-getdrawable-vs-appcompatresources-getdrawable Caused by: android.content.res.Resources$NotFoundException:
API >= 21 API < 21 android.defaultConfig.vectorDrawables.useSupportLibrary = true. https://stackoverflow.com/questions/43004886/resourcescompat-getdrawable-vs-appcompatresources-getdrawable
do not need to be visible on first launch, don’t inflate them” Developing for Android, III: The rules: Performance Chet Haase, Android Developers Jun 1, 2015 https://medium.com/google-developers/developing-for-android-iii-2efc140167fd
in 1m 8s 68 actionable tasks: 68 executed Publishing a build scan requires accepting the Gradle Terms of Service. Do you accept these terms? [yes, no] y Gradle Terms of Service accepted. Publishing build scan... ➜ ./gradlew build --scan
user making this call is subject to * teleportations. * * <p>As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can * now automatically identify goats using advanced goat recognition technology.</p> * * @return Returns true if the user making this call is a goat. */ public boolean isUserAGoat() { return mContext.getPackageManager() .isPackageAvailable("com.coffeestainstudios.goatsimulator"); } UserManager.java:1220
user interface is currently being messed with * by a monkey. */ public static boolean isUserAMonkey() { try { return getService().isUserAMonkey(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
and * {@link #hasSystemFeature}: The device's touch screen is capable of * tracking a full hand of fingers fully independently -- that is, 5 or * more simultaneous independent pointers. */ @SdkConstant(SdkConstantType.FEATURE) public static final String FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND = "android.hardware.touchscreen.multitouch.jazzhand";
Death Star in Empire units (m/s^2) */ public static final float GRAVITY_DEATH_STAR_I = 0.000000353036145f; /** Gravity on the island */ public static final float GRAVITY_THE_ISLAND = 4.815162342f; /** * A constant describing a Tricorder See * {@link android.hardware.SensorListener SensorListener} for more details. * * @deprecated use {@link android.hardware.Sensor Sensor} instead. */ @Deprecated public static final int SENSOR_TRICORDER = 1 << 6;
the beans */ public static final int JELLY_BEAN_MR2 = 18; /** Android 4.4. KitKat, another tasty threat. */ public static final int KITKAT = 19; /** Android 5.0. A flat one with beautiful shadows. But still tasty. */ public static final int LOLLIPOP = 21;