SelectFrameView 模仿手淘自动识别 UI 选择控件

Overview

Platform SDK

SelectFrameView

模仿手淘自动识别 UI 选择控件

Name Display
SelectSimpleDraweeView

用法

class VisionSelectSimpleDraweeView: SelectSimpleDraweeView<VisionBoxInfo> {
    constructor(context: Context) : this(context, null)
    constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
}
">
<com.jarvis.demo.ui.VisionSelectSimpleDraweeView
    android:id="@+id/js_view"
    android:layout_width="0dp"
    android:layout_height="0dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent" />
(R.id.refresh) refresh.setOnClickListener { selectView.setFrameData(arrayListOf( VisionBoxInfo(0.58f, 0.525f, 0.33f, 0.21f), VisionBoxInfo(0.28f, 0.48f, 0.53f, 0.51f) )) } /** 选择一个焦点 frame */ val focus = findViewById

引入

方式 1:

repositories {
    // ...
    maven {
        name = "GitHubPackages"
        url = uri("https://maven.pkg.github.com/JarvisGG/SelectFrameView")
        credentials {
            username = "JarvisGG"
            password = "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"
        }
    }
}

dependencies {
    implementation Libs.AndroidX.dynamicanimation // 目前 demo 依赖管理采用 buildSrc
    implementation "com.jarvis.libraries:select-base:1.0.3"
    // 如果需要 fresco 扩展,请添加
    implementation Libs.Fresco.core
    implementation "com.jarvis.libraries:select-fresco:1.0.2"
}

方式 2:

repositories {
    maven { url "https://jitpack.io" }
}
dependencies {
    implementation 'com.github.JarvisGG:SelectFrameView:1.0.5'
}
You might also like...
Releases(1.0.5)
Owner
Skeiro
Android Software engineer
Skeiro