mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-08-14 13:51:57 +00:00
Clean up
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user