Skip to content

Commit

Permalink
Change gradle configuration for bintray, improve sample and xml previ…
Browse files Browse the repository at this point in the history
…ew for MorphBottomNavigationView
  • Loading branch information
tommybuonomo committed Jun 21, 2018
1 parent 7a217c3 commit 1fc16b2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -41,3 +41,4 @@ local.properties
#Android Studio
/captures
/*/keystore.properties
keystore.properties
2 changes: 1 addition & 1 deletion build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.2.41'
ext.kotlin_version = '1.2.50'
repositories {
google()
jcenter()
Expand Down
Expand Up @@ -159,9 +159,12 @@
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
app:backgroundTint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/menu_bottom_navigation"
app:morphCornerRadius="128dp"
app:morphItemRadius="64dp"
app:morphVerticalOffset="8dp"
style="@style/BottomNavigationView"
/>

Expand Down
4 changes: 2 additions & 2 deletions morph-bottom-navigation/build.gradle
Expand Up @@ -36,9 +36,9 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.core:core-ktx:1.0.0-alpha1'
implementation 'androidx.core:core-ktx:1.0.0-alpha3'
api 'com.google.android.material:material:1.0.0-alpha3'
implementation 'com.tbuonomo:magicshapepath:1.0.0-alpha3'
api 'com.tbuonomo:magicshapepath:1.0.0-alpha3'
}


Expand Down
14 changes: 6 additions & 8 deletions morph-bottom-navigation/deploy.gradle
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.jfrog.bintray'

ext {
groupId = 'com.tbuonomo' // package name of the project
artifactId = "magic-shape-path" // module name of the library
artifactId = "morph-bottom-navigation" // module name of the library
libVersion = "1.0.0"
}
version = libVersion
Expand All @@ -12,12 +12,10 @@ group = groupId
def propsFile = rootProject.file('keystore.properties')

bintray {
if (propsFile.exists()) {
def props = new Properties()
props.load(new FileInputStream(propsFile))
key = file(props['bintrayKey'])
user = file(props['bintrayUser'])
}
def props = new Properties()
props.load(new FileInputStream(propsFile))
key = props.getProperty("bintrayKey")
user = props.getProperty("bintrayUser")
configurations = ['archives']
publish = true //[Default: false] Whether version should be auto published after an upload
override = false //[Default: false] Whether to override version artifacts already published
Expand All @@ -26,7 +24,7 @@ bintray {
// properties (like userOrg, desc, etc).
pkg {
repo = "maven" //bintray repo
name = "magic-shape-path" //bintray package
name = "morph-bottom-navigation" //bintray package
version {
name = libVersion
}
Expand Down
Expand Up @@ -110,9 +110,9 @@ class MorphBottomNavigationView : BottomNavigationView, OnNavigationItemSelected
materialShapeDrawable.isShadowEnabled = true
materialShapeDrawable.paintStyle = Style.FILL
materialShapeDrawable.setTint(backgroundTint)
background = materialShapeDrawable

val menuParams = bottomNavigationMenuView?.layoutParams as FrameLayout.LayoutParams
background = materialShapeDrawable
val menuParams = bottomNavigationMenuView.layoutParams as FrameLayout.LayoutParams
menuParams.gravity = (Gravity.BOTTOM or Gravity.CENTER_HORIZONTAL)

setOnNavigationItemSelectedListener(this)
Expand Down

0 comments on commit 1fc16b2

Please sign in to comment.