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
class AlphanumComparator : Comparator<String> { | |
override fun compare(s1: String, s2: String): Int { | |
var thisMarker = 0 | |
var thatMarker = 0 | |
val s1Length = s1.length | |
val s2Length = s2.length | |
while (thisMarker < s1Length && thatMarker < s2Length) { | |
val thisChunk = getChunk(s1, s1Length, thisMarker) | |
thisMarker += thisChunk.length |
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 io.michaelrocks; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Rect; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.view.WindowInsets; | |
import android.widget.FrameLayout; |
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 2015 Michael Rozumyanskiy | |
* | |
* 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.theming" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk android:minSdkVersion="11" /> | |
<application | |
android:icon="@drawable/ic_launcher" |