Skip to content

Commit

Permalink
[3.9] Fixed minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumman04 committed Nov 24, 2023
1 parent 3a5d1ad commit 70114ed
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
Binary file modified J-Slider-release.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion J-Slider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ afterEvaluate {
register<MavenPublication>("release") {
groupId = "com.github.Jumman04"
artifactId = "Jummania-Slider"
version = "3.8"
version = "3.9"

afterEvaluate {
from(components["release"])
Expand Down
8 changes: 5 additions & 3 deletions J-Slider/src/main/java/com/jummania/JSlider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import com.jummania.JSlider.BooleanObject.isSliding
import com.jummania.JSlider.IntObject.defaultIndicatorColor
import com.jummania.JSlider.IntObject.indicatorMarginHorizontal
import com.jummania.JSlider.IntObject.indicatorUpdateType
import com.jummania.JSlider.IntObject.measureSpec
import com.jummania.JSlider.IntObject.rules
import com.jummania.JSlider.IntObject.selectedIndicatorColor
import com.jummania.JSlider.IntObject.size
Expand Down Expand Up @@ -101,7 +100,6 @@ class JSlider @JvmOverloads constructor(

// Object to store integer values related to the slider configuration
private object IntObject {
var measureSpec: Int = 0 // Measure spec for the slider
var slidingDuration: Long = 1555 // Sliding duration in milliseconds
var size = 30 // Size of the dot indicator
var indicatorMarginHorizontal = 6 // Horizontal margin between dot indicators
Expand Down Expand Up @@ -869,7 +867,7 @@ class JSlider @JvmOverloads constructor(
private inner class JIndicator(context: Context?, shapeTypes: ShapeTypes) :
com.jummania.widgets.JIndicator(context, shapeTypes)

private inner class Slider(context: Context) : com.jummania.widgets.Slider(context, measureSpec)
private inner class Slider(context: Context) : com.jummania.widgets.Slider(context)

/**
* Override the onMeasure method to adjust the height of the ViewPager.
Expand Down Expand Up @@ -944,4 +942,8 @@ class JSlider @JvmOverloads constructor(
this@JSlider.listener = listener
}

internal companion object {
internal var measureSpec: Int = 0
}

}
5 changes: 2 additions & 3 deletions J-Slider/src/main/java/com/jummania/widgets/Slider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ package com.jummania.widgets

import android.content.Context
import androidx.viewpager.widget.ViewPager
import com.jummania.JSlider.Companion.measureSpec

/**
* Abstract class representing a custom ViewPager with adjusted height.
* * Created by Jummania on 20,November,2023.
* * Email: sharifuddinjumman@gmail.com
* * Dhaka, Bangladesh.
*
* @param measureSpec The measurement specification for height.
* @param context The context in which the Slider is created.
*/
internal abstract class Slider(context: Context, private val measureSpec: Int) :
ViewPager(context) {
internal abstract class Slider(context: Context) : ViewPager(context) {

/**
* Override the onMeasure method to adjust the height of the ViewPager.
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
minSdk = 17
targetSdk = 34
versionCode = 3
versionName = "3.8"
versionName = "3.9"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class MainActivity : AppCompatActivity() {
* CUBE_OUT,
* DEPTH_PAGE,
* DEPTH_SLIDE,
* DEPTH_SLIDE2,
* DEPTH_TRANSFORMATION,
* DEPTH_ZOOM_OUT,
* FADEOUT,
Expand Down
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ before_install:
- ./scripts/prepareJitpackEnvironment.sh
install:
- FILE="-Dfile=J-Slider-release.aar"
- mvn install:install-file $FILE -DgroupId=com.github.Jumman04 -DartifactId=Jummania-Slider -Dversion=3.7 -Dpackaging=aar -DgeneratePom=true
- mvn install:install-file $FILE -DgroupId=com.github.Jumman04 -DartifactId=Jummania-Slider -Dversion=3.9 -Dpackaging=aar -DgeneratePom=true
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.Jumman04</groupId>
<artifactId>Jummania-Slider</artifactId>
<version>3.7</version>
<version>3.9</version>
<packaging>pom</packaging>
<description>Empower Your UI with Seamless Slides: Introducing JSlider, the Universal Slider Library</description>
</project>

0 comments on commit 70114ed

Please sign in to comment.