Skip to content

Popalay/Tutors

Repository files navigation

Download Android Arsenal API License

Tutors

A simple way to show the user interface tutorials.

Getting Started

compile 'com.github.popalay:tutors:latest-version'
compile 'com.github.popalay:tutors-kotlin:latest-version'

Usage

From Java

Tutors tutors = new TutorsBuilder()
                .textColorRes(android.R.color.white)
                .shadowColorRes(R.color.shadow)
                .textSizeRes(R.dimen.textNormal)
                .completeIconRes(R.drawable.ic_cross_24_white)
                .nextButtonTextRes(R.string.action_next)
                .completeButtonTextRes(R.string.action_got_it)
                .spacingRes(R.dimen.spacingNormal)
                .lineWidthRes(R.dimen.lineWidth)
                .cancelable(false)
                .build();

tutors.show(getSupportFragmentManager(), toolbar, "It's a toolbar", !iterator.hasNext());

See sample.

From Kotlin

val tutors = Tutors.create {
             textColorRes = android.R.color.white
             shadowColorRes = R.color.shadow
             textSizeRes = R.dimen.textNormal
             completeIconRes = R.drawable.ic_cross_24_white
             nextButtonTextRes = R.string.action_next
             completeButtonTextRes = R.string.action_got_it
             spacingRes = R.dimen.spacingNormal
             lineWidthRes = R.dimen.lineWidth
             cancelable = false
}

tutors.show(supportFragmentManager, view = toolbar, text = "It's a toolbar", isLast = true)

See sample.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.