Skip to content

Commit

Permalink
Merge pull request #27 from ShwetaChauhan18/fix/release_error
Browse files Browse the repository at this point in the history
🐛 jitpack release fail issue
  • Loading branch information
shwetachauhan-simform committed Sep 5, 2021
2 parents 98c96de + 6a96ad8 commit 8cfaaf4
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The actual features are:

```
dependencies {
implementation 'com.github.simformsolutions:SSCustomBottomNavigation:3.1'
implementation 'com.github.simformsolutions:SSCustomBottomNavigation:3.2'
}
```

Expand Down
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
Expand All @@ -10,8 +9,8 @@ android {
applicationId "com.sscustombottomnavigation"
minSdkVersion 21
targetSdkVersion 30
versionCode 2
versionName "3.1"
versionCode 3
versionName "3.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
15 changes: 15 additions & 0 deletions custombottomnavigation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'maven-publish'

afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
from components.release
groupId = 'com.simform.custombottomnavigation'
artifactId = 'custombottomnavigation'
version = '3.2'
}
}
}
}

android {
compileSdkVersion 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class CustomBottomNavigationIcon : RelativeLayout, LayoutContainer {
set(value) {
field = value
if (allowDraw) {
if(!isEnabledCell) tv.setTextColor(iconTextColor) else tv.setTextColor(selectedIconTextColor)
if (!isEnabledCell) tv.setTextColor(iconTextColor) else tv.setTextColor(
selectedIconTextColor
)

}
}
Expand All @@ -72,7 +74,9 @@ class CustomBottomNavigationIcon : RelativeLayout, LayoutContainer {
set(value) {
field = value
if (allowDraw)
if(isEnabledCell) tv.setTextColor(selectedIconTextColor) else tv.setTextColor(iconTextColor)
if (isEnabledCell) tv.setTextColor(selectedIconTextColor) else tv.setTextColor(
iconTextColor
)
}

var iconTextTypeface: Typeface? = null
Expand Down Expand Up @@ -158,7 +162,7 @@ class CustomBottomNavigationIcon : RelativeLayout, LayoutContainer {
private var progress = 0f
set(value) {
field = value
Log.e("TAG","height is ${containerView.layoutParams.height} ${dip(context, 18)}")
Log.e("TAG", "height is ${containerView.layoutParams.height} ${dip(context, 18)}")
fl.y = (1f - progress) * dip(context, 18) + dip(context, -2)

iv.color = if (progress == 1f) selectedIconColor else iconTextColor
Expand Down Expand Up @@ -215,7 +219,11 @@ class CustomBottomNavigationIcon : RelativeLayout, LayoutContainer {
initializeView()
}

constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(
context,
attrs,
defStyleAttr
) {
setAttributeFromXml(context, attrs)
initializeView()
}
Expand All @@ -226,7 +234,8 @@ class CustomBottomNavigationIcon : RelativeLayout, LayoutContainer {

private fun initializeView() {
allowDraw = true
containerView = LayoutInflater.from(context).inflate(R.layout.custom_bottom_navigation_icon, this)
containerView =
LayoutInflater.from(context).inflate(R.layout.custom_bottom_navigation_icon, this)
draw()
}

Expand Down

0 comments on commit 8cfaaf4

Please sign in to comment.