Skip to content

lightonalan/TagView

Repository files navigation

Refer to iOS version: HLImages
Feature

  • Tag an user to image with finger tap.
  • Move TagView when overlap.
  • Remove tag. alt text

    Usage
    Inherit ImageTagViewTapped interface from Activity
class MainActivity : AppCompatActivity(), ImageTagViewTapped 

Create ImageTagView

val img = ImageTagView(this)
img.delegate = this //important
img.canAddOrMoveTag = true //allow user tag or not, defalut = true
ll_main.addView(img)

Override tapAt function to detect user tap position

override fun tapAt(point: Point, imageTag: ImageTagView) {
    //Create fake user or redirect to Search User Function
    var user = TagUser()
    user.tagId = (imageTag.tags.size + 1).toString()
    user.userId = (imageTag.tags.size + 1).toString()
    user.userName = "タグを付ける"
    user.point = point
    imageTag.addTag(user)
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages