mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Remove: Unused method/function
This commit is contained in:
parent
343a125c7c
commit
4fcbb45b3a
@ -2,11 +2,6 @@ package com.looker.droidify.screen
|
|||||||
|
|
||||||
import android.animation.ValueAnimator
|
import android.animation.ValueAnimator
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Canvas
|
|
||||||
import android.graphics.ColorFilter
|
|
||||||
import android.graphics.Paint
|
|
||||||
import android.graphics.PixelFormat
|
|
||||||
import android.graphics.drawable.Drawable
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.animation.AccelerateInterpolator
|
import android.view.animation.AccelerateInterpolator
|
||||||
@ -520,48 +515,6 @@ class TabsFragment : ScreenFragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TabsBackgroundDrawable(context: Context, private val rtl: Boolean) : Drawable() {
|
|
||||||
private val height = context.resources.sizeScaled(2)
|
|
||||||
private val paint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
|
|
||||||
color = context.getColorFromAttr(android.R.attr.textColor).defaultColor
|
|
||||||
}
|
|
||||||
|
|
||||||
private var position = 0f
|
|
||||||
private var total = 0
|
|
||||||
|
|
||||||
fun update(position: Float, total: Int) {
|
|
||||||
this.position = position
|
|
||||||
this.total = total
|
|
||||||
invalidateSelf()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun draw(canvas: Canvas) {
|
|
||||||
if (total > 0) {
|
|
||||||
val bounds = bounds
|
|
||||||
val width = bounds.width() / total.toFloat()
|
|
||||||
val x = width * position
|
|
||||||
if (rtl) {
|
|
||||||
canvas.drawRect(
|
|
||||||
bounds.right - width - x, (bounds.bottom - height).toFloat(),
|
|
||||||
bounds.right - x, bounds.bottom.toFloat(), paint
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
canvas.drawRect(
|
|
||||||
bounds.left + x + width / 4, // + width/4 from start
|
|
||||||
(bounds.bottom - height).toFloat(),
|
|
||||||
bounds.left + x + width - width / 4, // - width/4 from end
|
|
||||||
bounds.bottom.toFloat(),
|
|
||||||
paint
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setAlpha(alpha: Int) = Unit
|
|
||||||
override fun setColorFilter(colorFilter: ColorFilter?) = Unit
|
|
||||||
override fun getOpacity(): Int = PixelFormat.TRANSLUCENT
|
|
||||||
}
|
|
||||||
|
|
||||||
private class SectionsAdapter(
|
private class SectionsAdapter(
|
||||||
private val sections: () -> List<ProductItem.Section>,
|
private val sections: () -> List<ProductItem.Section>,
|
||||||
private val onClick: (ProductItem.Section) -> Unit
|
private val onClick: (ProductItem.Section) -> Unit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user