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
fun <T : Comparable<T>> loop(vararg range: Iterable<T>, action: (List<T>) -> Unit) { | |
if (range.isEmpty()) return | |
startLoop(range.size, range, listOf(), action) | |
} | |
fun <T : Comparable<T>> startLoop( | |
rawSize: Int, | |
rs: Array<out Iterable<T>>, | |
ps: List<T>, | |
action: (List<T>) -> Unit |
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 androidx.preference.PreferenceDataStore | |
import cn.vove7.smartkey.BaseConfig | |
import cn.vove7.smartkey.get | |
/** | |
* # SmartKeyDataStore | |
* | |
* Created on 2020/6/29 | |
* @author Vove |
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 android.text.Layout; | |
import android.text.NoCopySpan; | |
import android.text.Selection; | |
import android.text.Spannable; | |
import android.text.method.MovementMethod; | |
import android.text.method.ScrollingMovementMethod; | |
import android.text.style.ClickableSpan; | |
import android.view.KeyEvent; | |
import android.view.MotionEvent; |
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 io.ktor.application.* | |
import io.ktor.http.HttpStatusCode | |
import io.ktor.response.respond | |
import io.ktor.util.AttributeKey | |
import io.ktor.util.pipeline.PipelinePhase | |
typealias DoHandlerExp = suspend (ApplicationCall, Throwable) -> Unit | |
class ExceptionHandler( |
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 android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.databinding.DataBindingUtil | |
import androidx.databinding.ViewDataBinding | |
import androidx.recyclerview.widget.RecyclerView | |
import kotlin.reflect.KClass | |
/** |
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 android.view.View | |
import android.widget.Spinner | |
import android.widget.TextView | |
import kotlin.reflect.KProperty | |
/** | |
* View 属性代理 | |
* | |
* @param V : 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
// This script is used to initialize the build in a module or plugin project. | |
// During this phase, the script applies the Maven plugin and configures the | |
// destination of the local repository. | |
// The local repository will contain the AAR and POM files. | |
void configureProject(Project project, String mavenUrl, String mavenUser, String mavenPwd, String version) { | |
if (!project.hasProperty("android")) { | |
throw new GradleException("Android property not found.") | |
} | |
if (!project.android.hasProperty("libraryVariants")) { |