This commit is contained in:
machiav3lli
2022-04-06 04:02:29 +02:00
parent f33ccfd247
commit c2e7c3823e
6 changed files with 0 additions and 260 deletions

View File

@@ -14,10 +14,6 @@ fun Cursor.asSequence(): Sequence<Cursor> {
return generateSequence { if (moveToNext()) this else null }
}
fun Cursor.firstOrNull(): Cursor? {
return if (moveToFirst()) this else null
}
fun SQLiteDatabase.execWithResult(sql: String) {
rawQuery(sql, null).use { it.count }
}

View File

@@ -23,13 +23,6 @@ object TypefaceExtra {
val light = Typeface.create("sans-serif-light", Typeface.NORMAL)!!
}
val Number.toPx
get() = TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP,
this.toFloat(),
Resources.getSystem().displayMetrics
)
fun Context.getColorFromAttr(@AttrRes attrResId: Int): ColorStateList {
val typedArray = obtainStyledAttributes(intArrayOf(attrResId))
val (colorStateList, resId) = try {