6 Star 14 Fork 3

vee / JTCharIndexViewDemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

JTCharIndexView Download License

一个超轻量级,通讯录音序列表。

image

功能:

  1. 点击回调音序(字符串形式)
  2. 超级轻量,超级简单,所以小白看看源码就能在上面改动扩展呢。
  3. 基于java

安装:

dependencies {
    ......
    implementation 'com.william:JTCharIndexView:1.0.0'
}

用法:

java:

非常简单懒得说明了详见demo
package com.william.charindexviewdemo

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.widget.Toast
import com.william.charindexview.CharIndexView
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() ,CharIndexView.OnCharIndexChangedListener{

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val labels = charArrayOf('#','A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
            'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z')

        this.civ.setCHARS(labels)
        this.civ.requestLayout()

        this.civ.setOnCharIndexChangedListener(this)
        this.civ.invalidate()
    }


    override fun onCharIndexSelected(currentIndex: String?) {
        Toast.makeText(this,"点击了"+currentIndex,Toast.LENGTH_SHORT).show()
    }
}

License

Copyright 2018 william Inc.

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.

空文件

简介

一个超轻量级的 Android 通讯录音序列表。 展开 收起
Android
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Android
1
https://gitee.com/william198824/JTCharIndexViewDemo.git
git@gitee.com:william198824/JTCharIndexViewDemo.git
william198824
JTCharIndexViewDemo
JTCharIndexViewDemo
master

搜索帮助