Skip to content

Upgrade kotlin, gradle and migrate build to jitpack #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/AndroidProjectSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

607 changes: 607 additions & 0 deletions .idea/caches/deviceStreaming.xml

Large diffs are not rendered by default.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 22 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/modules.xml

This file was deleted.

8 changes: 8 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BubbleShowCase - Android
[ ![Download](https://api.bintray.com/packages/laboratorioec/Laboratorio-apps/BubbleShowCase/images/download.svg) ](https://bintray.com/laboratorioec/Laboratorio-apps/BubbleShowCase/_latestVersion)
[ [Download]](https://bintray.com/laboratorioec/Laboratorio-apps/BubbleShowCase/_latestVersion)
[![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-BubbleShowCase-green.svg?style=flat )]( https://android-arsenal.com/details/1/7119 )

BubbleShowCase is an elegant and simple framework developed in Kotlin (usable also in Java) that let you to use informative bubbles to help your users pointing out different features of your application or in your App onboarding. The basic use of the framework consists on a target element passed as input which will be highlighted over a translucent background and pointed out by a customizable bubble.
Expand All @@ -8,11 +8,15 @@ BubbleShowCase is an elegant and simple framework developed in Kotlin (usable al

## Getting started

Add the library into your proyect is really easy, you just need to add this line in dependencies block in your app Gradle:
Add the library into your project is really easy,
1. Add the maven jitpack dependency to your project build.gradle repositories block
```groovy
implementation 'com.elconfidencial.bubbleshowcase:bubbleshowcase:LATEST_VERSION'
maven { url 'https://jitpack.io' }
```
2. Then add the repo to your dependencies in your app build.gradle
```groovy
implementation 'com.github.musicmeetscode:BubbleShowCase-Android:v2.0.2'
```
**NOTE:** You can check the LATEST_VERSION in the version badge at the top of this file.

## Usage
### Basic sample
Expand Down
18 changes: 15 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'
//apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 27
compileSdkVersion 33
defaultConfig {
applicationId "com.elconfidencial.bubbleshowcase"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -20,6 +20,18 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
kotlinOptions {
jvmTarget = '11' // ✅ valid
}
viewBinding {
enabled = true
}

namespace "com.elconfidencial.bubbleshowcase"
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}

dependencies {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:exported="true"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
36 changes: 17 additions & 19 deletions app/src/main/java/com/elconfidencial/bubbleshowcase/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,26 @@ package com.elconfidencial.bubbleshowcase
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v4.content.ContextCompat
import android.support.v7.view.menu.ActionMenuItemView
import android.view.Menu
import android.view.MenuItem
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_main.*
import com.elconfidencial.bubbleshowcase.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {
private val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
setContentView(binding.root)
setUpListeners()
}

private fun setUpListeners(){
buttonSimpleShowCase.setOnClickListener { getSimpleShowCaseBuilder().show() }
buttonColorShowCase.setOnClickListener { getCustomColorShowCaseBuilder().show() }
buttonTextSizeShowCase.setOnClickListener { getTextSizeShowCaseBuilder().show() }
buttonArrowLeftShowCase.setOnClickListener { getArrowLeftShowCaseBuilder().show() }
buttonArrowRightShowCase.setOnClickListener { getArrowRightShowCaseBuilder().show() }
buttonEventListener.setOnClickListener { getListenerShowCaseBuilder().show() }
buttonSequence.setOnClickListener { getSequence().show() }
binding. buttonSimpleShowCase.setOnClickListener { getSimpleShowCaseBuilder().show() }
binding. buttonColorShowCase.setOnClickListener { getCustomColorShowCaseBuilder().show() }
binding.buttonTextSizeShowCase.setOnClickListener { getTextSizeShowCaseBuilder().show() }
binding. buttonArrowLeftShowCase.setOnClickListener { getArrowLeftShowCaseBuilder().show() }
binding.buttonArrowRightShowCase.setOnClickListener { getArrowRightShowCaseBuilder().show() }
binding. buttonEventListener.setOnClickListener { getListenerShowCaseBuilder().show() }
binding. buttonSequence.setOnClickListener { getSequence().show() }
}

//SHOW CASES GETTERS
Expand All @@ -33,7 +31,7 @@ class MainActivity : AppCompatActivity() {
return BubbleShowCaseBuilder(this)
.title("Welcome!!!")
.description("This is a simple BubbleShowCase with default values.")
.targetView(buttonSimpleShowCase)
.targetView(binding.buttonSimpleShowCase)
}

private fun getCustomColorShowCaseBuilder(): BubbleShowCaseBuilder{
Expand All @@ -44,7 +42,7 @@ class MainActivity : AppCompatActivity() {
.image(ContextCompat.getDrawable(this, R.drawable.ic_color)!!)
.closeActionImage(ContextCompat.getDrawable(this, R.drawable.ic_close_black)!!)
.textColor(ContextCompat.getColor(this, R.color.colorBlack))
.targetView(buttonColorShowCase)
.targetView(binding.buttonColorShowCase)
}

private fun getTextSizeShowCaseBuilder(): BubbleShowCaseBuilder{
Expand All @@ -56,7 +54,7 @@ class MainActivity : AppCompatActivity() {
.titleTextSize(18)
.descriptionTextSize(16)
.closeActionImage(null)
.targetView(buttonTextSizeShowCase)
.targetView(binding.buttonTextSizeShowCase)
}

private fun getArrowLeftShowCaseBuilder(): BubbleShowCaseBuilder{
Expand All @@ -65,23 +63,23 @@ class MainActivity : AppCompatActivity() {
.description("You only have to specify in which side you want the arrow, and the bubble will be located depending on it.")
.arrowPosition(BubbleShowCase.ArrowPosition.LEFT)
.backgroundColor(ContextCompat.getColor(this, R.color.colorRed))
.targetView(buttonArrowLeftShowCase)
.targetView(binding.buttonArrowLeftShowCase)
}

private fun getArrowRightShowCaseBuilder(): BubbleShowCaseBuilder{
return BubbleShowCaseBuilder(this)
.title("Arrow set on right side this time :)")
.arrowPosition(BubbleShowCase.ArrowPosition.RIGHT)
.backgroundColor(ContextCompat.getColor(this, R.color.colorPink))
.targetView(buttonArrowRightShowCase)
.targetView(binding.buttonArrowRightShowCase)
}


private fun getListenerShowCaseBuilder(): BubbleShowCaseBuilder{
return BubbleShowCaseBuilder(this)
.title("Listen user actions!")
.description("You can detect when the user interacts with the different view elements to act consequently.")
.backgroundColor(ContextCompat.getColor(this, R.color.colorOrange))
.backgroundColor(ContextCompat.getColor(this, com.elconfidencial.bubbleshowcase.R.color.colorOrange))
.image(ContextCompat.getDrawable(this, R.drawable.ic_sentiment_satisfied)!!)
.listener(object : BubbleShowCaseListener{
override fun onBubbleClick(bubbleShowCase: BubbleShowCase) {
Expand All @@ -100,7 +98,7 @@ class MainActivity : AppCompatActivity() {
Toast.makeText(this@MainActivity, "OnClose", Toast.LENGTH_SHORT).show()
}
})
.targetView(buttonEventListener)
.targetView(binding.buttonEventListener)
}

private fun getSequence(): BubbleShowCaseSequence{
Expand Down
Loading