# WaveSideBar
**Repository Path**: q5938/WaveSideBar
## Basic Information
- **Project Name**: WaveSideBar
- **Description**: WavaSideBar+仿通讯录+字母导航栏+中英文搜索+拼音转换
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-02-19
- **Last Updated**: 2024-12-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# WaveSideBar
WavaSideBar——一个自带中英文对应排序和检索功能的字母导航栏
##效果图

#### ⊙开源不易,希望给个star或者fork奖励
#### ⊙拥抱开源:https://github.com/nanchen2251/
## 特点
1、支持手势滑动导航栏
2、支持自定义设置偏移量和颜色
3、支持设置字母导航栏设置位置
4、支持自动匹配中英文
5、支持拼音和中文搜索
## 使用方法
#### 1、添加依赖
#### 2017年1月5日后仓库转移到jitpack,添加依赖方式为:
##### Step 1. Add it in your root build.gradle at the end of repositories:
```java
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
##### Step 2. Add the dependency
```java
dependencies {
compile 'com.github.nanchen2251:WaveSideBar:1.0.6'
}
```
#### 2、在xml文件里面使用
```java
```
#### 3、在Activity里面使用
```java
mWaveSideBarView = (WaveSideBarView) findViewById(R.id.main_side_bar);
mWaveSideBarView.setOnSelectIndexItemListener(new OnSelectIndexItemListener() {
@Override
public void onSelectIndexItem(String letter) {
for (int i=0; i
```java
FirstLetterUtil.getFirstLetter(name);
```
#### 5、中文转换成拼音
```java
Trans2PinYinUtil.trans2PinYin(String name);
```
具体请下载查看示例代码
## 属性一览
| Attributes | Format | Default | Description |
| ------------------- | ------: | :---------: | :----------- |
| sidebar_text_color | color | Color.GRAY | Text color. |
| sidebar_max_offset | dimension| 80dp |Offset of the selected item. |
| sidebar_position | enum {right, left}| right | Be placed on left or right in the view. |
| sidebar_text_alignment | enum {center, left, right}| center | Alignment of items. |
| sidebar_lazy_respond | boolean| false |If true, the listener will not be called until the finger up. If false, the listener will be called when the finger down, move and up. |
该项目参考了:
* [https://github.com/gjiazhe/WaveSideBar](https://github.com/gjiazhe/WaveSideBar)
* [https://github.com/Solartisan/WaveSideBar](https://github.com/Solartisan/WaveSideBar)
## 关于作者
南尘
四川成都
[其它开源](https://github.com/nanchen2251/)
[博客园](http://www.cnblogs.com/liushilin/)
## Licenses
```
Copyright 2019 nanchen(刘世麟)
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.
```