Skip to content

Commit

Permalink
Merge pull request #2 from mutairibassam/hotfix/err-setAttributeFromXml
Browse files Browse the repository at this point in the history
Hotfix/err set attribute from xml
  • Loading branch information
qamarelsafadi authored Apr 10, 2022
2 parents fc119e8 + 9291775 commit 446c20f
Show file tree
Hide file tree
Showing 11 changed files with 158 additions and 97 deletions.
138 changes: 138 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,141 @@
.externalNativeBuild
.cxx
local.properties
.idea/

# Created by https://www.toptal.com/developers/gitignore/api/androidstudio
# Edit at https://www.toptal.com/developers/gitignore?templates=androidstudio

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

# Built application files
*.apk
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle
.gradle/
build/

# Signing files
.signing/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
captures/
.navigation/
*.ipr
*~
*.swp

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Android Patch
gen-external-apklibs

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# NDK
obj/

# IntelliJ IDEA
*.iml
*.iws
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/assetWizardSettings.xml
.idea/gradle.xml
.idea/jarRepositories.xml
.idea/navEditor.xml

# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar

# End of https://www.toptal.com/developers/gitignore/api/androidstudio
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

21 changes: 0 additions & 21 deletions .idea/gradle.xml

This file was deleted.

24 changes: 0 additions & 24 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ buildscript {
}
}
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
id 'com.android.application' version '7.1.3' apply false
id 'com.android.library' version '7.1.3' apply false
id 'org.jetbrains.kotlin.android' version '1.5.30' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import android.graphics.Color
import android.graphics.Typeface
import android.graphics.drawable.GradientDrawable
import android.graphics.drawable.RippleDrawable
import android.os.Build
import android.util.AttributeSet
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
import android.widget.FrameLayout
import android.widget.RelativeLayout
import androidx.core.view.ViewCompat
import androidx.core.widget.ImageViewCompat
Expand All @@ -23,7 +21,7 @@ import com.qamar.curvedbottomnaviagtion.enum.NavigationType


@Suppress("unused")
class BottomNaviagtionItem @JvmOverloads constructor(
class BottomNavigationItem @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttrs: Int = 0
Expand All @@ -33,7 +31,7 @@ class BottomNaviagtionItem @JvmOverloads constructor(
const val EMPTY_VALUE = "empty"
}

var isTextVisible = 1
private var isTextVisible = 1
private val binding = DataBindingUtil.inflate<BottomNavigationItemBinding>(
LayoutInflater.from(context),
R.layout.bottom_navigation_item,
Expand Down Expand Up @@ -86,7 +84,7 @@ class BottomNaviagtionItem @JvmOverloads constructor(
binding.titleTxt.setTextColor(value)
}

var navigationType = NavigationType.LABELED
private var navigationType = NavigationType.LABELED
set(value) {
field = value
if (allowDraw) {
Expand Down Expand Up @@ -176,7 +174,7 @@ class BottomNaviagtionItem @JvmOverloads constructor(
binding.badgeTxt.typeface = field
}

var titleFont: Typeface? = null
private var titleFont: Typeface? = null
set(value) {
field = value
if (allowDraw && field != null)
Expand Down Expand Up @@ -228,7 +226,7 @@ class BottomNaviagtionItem @JvmOverloads constructor(
if (isTextVisible == 1) binding.titleTxt.gone()
d.setColor(circleColor)
d.shape = GradientDrawable.OVAL
if (Build.VERSION.SDK_INT >= 21 && !isItemSelected) {
if (!isItemSelected) {
binding.fl.background = RippleDrawable(ColorStateList.valueOf(rippleColor), null, d)
} else {
{
Expand Down Expand Up @@ -295,7 +293,7 @@ class BottomNaviagtionItem @JvmOverloads constructor(
layoutParams.height = selectedIconSize.toInt()
layoutParams.width = selectedIconSize.toInt()
binding.titleTxt.gone()
Log.e("qmrTYPE", "${navigationType}")
Log.e("qmrTYPE", "$navigationType")

}

Expand All @@ -308,7 +306,7 @@ class BottomNaviagtionItem @JvmOverloads constructor(
interpolator = FastOutSlowInInterpolator()
addUpdateListener {
val f = it.animatedFraction
Log.e("qmrFraction", "${f}")
Log.e("qmrFraction", "$f")
progress = if (enableCell)
f
else
Expand Down
Loading

0 comments on commit 446c20f

Please sign in to comment.