Android Arsenal – Showcase-Ansichten

Android-Bibliothek zum Hervorheben verschiedener Funktionen der Anwendung, die mit Jetpack Compose erstellt wurden.

Die Bibliothek ist inspiriert Tippen Sie auf TargetView Es ist nützlich für geerbte Ansichten.

Aufbau

Fügen Sie es Ihrem root build.gradle am Ende des Repositorys hinzu:

repositories {
    maven { url 'https://jitpack.io' }
}

Sucht hinzufügen

  implementation 'com.github.canopas:Intro-showcase-view:1.0.2'

Wie benutzt man?

@Composable
fun ShowcaseSample() {
    val targets = remember {
        mutableStateMapOf<String, ShowcaseProperty>()
    }
    Box {
        FloatingActionButton(
            onClick = {},
            modifier = Modifier.padding(16.dp).align(Alignment.BottomStart).onGloballyPositioned { coordinates ->
                targets["email"] = ShowcaseProperty(
                    1, coordinates, "Check emails", "Click here to check/send emails"
                )
            },
            backgroundColor = ThemeColor,
            contentColor = Color.White,
            elevation = FloatingActionButtonDefaults.elevation(6.dp)
        ) {
            Icon(
                Icons.Filled.Email,
                contentDescription = "Email"
            )
        }

        IntroShowCase(targets) {
            // Showcase finished!!
        }
    }
}
   

Weitere Informationen finden Sie unter Lernprogramm

Für Fehler, Fragen und Diskussionen verwenden Github-Probleme.

Canopas Software LLP

Copyright 2022 Canopas Software LLP

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.