[JAVA] I made a library for displaying tutorials on Android.

This is about the library registered earlier here Create and publish Android library --Qiita. The library itself was completed a while ago, but it was troublesome to upload it and summarize how to use it. There aren't many good Android tutorial libraries. Then make it. GitHub is here.

It will be a remake of what we made in our app for the library. It's made by kotlin, but of course you can use it with java.

About the essential library

This is the one.

sample_tutorial.gif

Things to be careful about when making

It's perfect! I can't say that even if my mouth is torn, but I made it with the following in mind.

-Reduce library dependencies

Due to a recent mass update of the library, we have encountered a number of dependency errors in our app. Moreover, it is difficult to understand the content of the error. So how much did you want to destroy the environment? The result is a storm of ʻexclude module: hogehoge`.

With that in mind, this library has the following dependencies.

build.gradle


dependencies {
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

}

・ Make it as easy as possible to display.

The tutorial is issued after the target View has been drawn so that you do not have to worry about the tutorial generation timing.

The value for display can be set in the builder pattern. There is a problem that the properties required for the setting have not been integrated yet, but.

How to use

If you use it easily

--Add the following to dependencies

build.gradle


dependencies {
	implementation 'jp.studio.edamame:balloontutorial:0.2.2'
}

--Implementation looks like this

TutorialBuilder.init(activituy, target = binding.buttonTutorialCircle)
        .holeType(TutorialBuilder.HoleType.CIRCLE)
        .radiusOfDp(50f)
        .descriptionByString("Circle type")
        .buildAndLayout() //drawing

You can use it if you set the value in this way.

Advanced Setting

Initialize the builder

TutorialBuilder.init(activituy, target = targetView)

Initialize with .init (activity, targetView).

Specify the target highlighting shape

.holeType(type: TutorialBuilder.HoleType)

--Rectangle

.holeType(TutorialBuilder.HoleType.SQUARE)
.holeType(TutorialBuilder.HoleType.CIRCLE)
.radiusOfDp(50f) //Specify the radius if it is circular(dp)

Set callout

.descriptionByString("Description goes") //Callout characters
.textColor(@ColorInt color: Int) //Letter color
.balloonColor(@ColorInt color: Int) //Callout color

Specify tap behavior

.onClickedOutSide { } //When tapped outside the target
.onClickedTarget { } //When the target is tapped

Specify animation time

--Specified by msec

.durationForBaseAnimation(150) //Background display
.durationForHoleAnimation(300) //Show highlights
.durationForBalloonTextAnimation(200) //Speech bubble

end

I'm thinking of adding a mechanism that will allow me to publish tutorials in a row. that's all.

Recommended Posts

I made a library for displaying tutorials on Android.
I made a calculator app on Android
I made a simple graph library for smartphone apps [MP Android Chart Kai]
I made a matching app (Android app)
[Android] I made a pedometer app.
I made a plugin for IntelliJ IDEA
I made a rock-paper-scissors app with android
I made a Diff tool for Java files
I made an Android app for MiRm service
I made a Ruby extension library in C
I made a portfolio with Ruby On Rails
[Android] I want to create a ViewPager that can be used for tutorials
Android: I had a hard time displaying the HTML file on the SD card
I made a Docker image of SDAPS for Japanese
I made a check tool for the release module
I made a method to ask for Premium Friday
I made a drawing chat "8bit paint chat" on WebAssembly
I made a library that works like a Safari tab !!
[Android Studio] I want to use Maven library on Android
Multipart transmission library on Android
I made a chat app.
I tried adding a separator line to TabLayout on Android
Ruby: I made a FizzBuzz program!
Intel Multi-OS Engine (MOE), a cross-platform library for Android and iOS
I made a shopify app @java
I made a mistake when installing VLC on Ubuntu 18.04 via snap
I made a GUI with Swing
I made a reply function for the Rails Tutorial extension (Part 1)
Library collection useful for Android development
I made a question that can be used for a technical interview
I made a method to ask for Premium Friday (Java 8 version)
I made a simple recommendation function.
I made a reply function for the Rails Tutorial extension (Part 5):
I made a package.xml generation tool.
I was in trouble at work, so I made a plugin for IntelliJ
I made an app to scribble with PencilKit on a PDF file
I made a reply function for Rails Tutorial extension (Part 2): Change model
I made a site that summarizes information on carbohydrate restriction with Vue.js
[Ruby] I made a simple Ping client
A memorandum for android application development beginners
Notes on creating android plugins for Unity
Made a one-liner method for Premium Friday
I made a risky die with Ruby
I made a rock-paper-scissors app with kotlin
I made a new Java deployment tool
I made a bulletin board using Docker 1
I have a question about Android studio.
Created a multifunctional routing library for Android that also supports Shared Element --MoriRouter
I made a THETA API client that can be used for plug-in development
left4dead2 I made a Docker image for the server and tried running it on GCE # 3 (I had a hard time building the server)
I made a primality test program in Java
04. I made a front end with SpringBoot + Thymeleaf
I made a mosaic art with Pokemon images
Building a Ruby environment for classes on Mac
I made an app for myself! (Reading management app)
I made a gender selection column with enum
I made a rock-paper-scissors game in Java (CLI)
I made a viewer app that displays a PDF
I made a Docker container to run Maven
I stumbled on Android DataBinding + Kotlin (more BindingAdapter)
[Rails] I made a draft function using enum