Skip to content

Commit

Permalink
Improved code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumman04 committed Dec 2, 2023
1 parent 3a32005 commit b0d4c70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion J-Slider/src/main/java/com/jummania/JSlider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ class JSlider @JvmOverloads constructor(
)
(layoutParams as LayoutParams).addRule(ALIGN_PARENT_BOTTOM) // Align to the bottom of the parent view
gravity = Gravity.CENTER // Center the selected dot indicator
orientation = LinearLayout.HORIZONTAL // Set the orientation to horizontal
setBackgroundResource(R.drawable.indicator)
setColor(selectedIndicatorColor)
}
Expand Down
4 changes: 2 additions & 2 deletions J-Slider/src/main/java/com/jummania/widgets/JIndicator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Path
import android.widget.LinearLayout
import android.view.View
import com.jummania.types.ShapeTypes

/**
Expand All @@ -19,7 +19,7 @@ import com.jummania.types.ShapeTypes
*/
internal abstract class JIndicator(
private val context: Context?, private val shapeTypes: ShapeTypes
) : LinearLayout(context) {
) : View(context) {

// Paint object used for drawing
private val paint by lazy {
Expand Down

0 comments on commit b0d4c70

Please sign in to comment.