Skip to content

Commit df074f4

Browse files
committed
remove unused functions
1 parent 7234344 commit df074f4

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

app/src/androidMain/kotlin/de/westnordost/streetcomplete/util/ktx/Drawable.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,3 @@ fun Drawable.createBitmap(width: Int = intrinsicWidth, height: Int = intrinsicHe
1515
setBounds(0, 0, this.width, this.height)
1616
draw(this)
1717
}
18-
19-
fun Drawable.asBitmapDrawable(resources: Resources, width: Int = intrinsicWidth, height: Int = intrinsicHeight): BitmapDrawable =
20-
if (this is BitmapDrawable) this else createBitmap(width, height).toDrawable(resources)
21-
22-
fun Drawable.asImageSpan(width: Int = intrinsicWidth, height: Int = intrinsicHeight): ImageSpan {
23-
this.mutate()
24-
this.setBounds(0, 0, width, height)
25-
// ALIGN_CENTER does not work correctly on SDK 29, see #3736
26-
val alignment = if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) ImageSpan.ALIGN_CENTER else ImageSpan.ALIGN_BASELINE
27-
return ImageSpan(this, alignment)
28-
}

app/src/androidMain/kotlin/de/westnordost/streetcomplete/util/ktx/View.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ suspend fun View.awaitNextLayout() = suspendCancellableCoroutine { cont ->
4949
addOnLayoutChangeListener(listener)
5050
}
5151

52-
suspend fun View.awaitPreDraw() = suspendCancellableCoroutine { cont ->
53-
val listener = doOnPreDraw { cont.resume(Unit) }
54-
cont.invokeOnCancellation { listener.removeListener() }
55-
}
56-
5752
fun View.getLocationInWindow(): Point {
5853
val pos = IntArray(2)
5954
getLocationInWindow(pos)

0 commit comments

Comments
 (0)