# index **Repository Path**: vimeo/index ## Basic Information - **Project Name**: index - **Description**: A simple and easy-to-use address book index control. - **Primary Language**: Android - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-05-25 - **Last Updated**: 2024-12-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: View, Library ## README # index [![](https://jitpack.io/v/com.sunzn/index.svg)](https://jitpack.io/#com.sunzn/index) [![](https://img.shields.io/badge/License-Apache%202.0-orange.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) A simple and easy-to-use address book index control. ### Gradle To get a Git project into your build: **Step 1**. Add the JitPack repository to your build file ```groovy allprojects { repositories { ... maven { url 'https://jitpack.io' } } } ``` **Step 2**. Add the dependency ```groovy dependencies { implementation 'com.sunzn.index:index:1.0.7' } ``` **Step 3**. Link the IndexView and the RecyclerView together ```kotlin IndexMediator(indexView, recyclerView, object : IndexMediator.IndexStrategy { override fun initLetterIndex(letter: String): Int { return data.indexOf(letter) } override fun initIndexLetter(position: Int): String { return adapter.getItem(position).first().toString() } }).attach() ``` ### Attribute | Attribute | Describe | Additional | |-----------------------|-----------------------------------------------|-------------------------------------------------------| | index_drop_text_color | Unselected index letter color | Support for colors and references. | | index_drop_text_size | Unselected index letter size | Supported sp values for text. | | index_pick_text_color | Selected index letter color | Support for colors and references. | | index_pick_text_size | Selected index letter size | Supported sp values for text. | | index_mark_pick_color | Selected index letter background color | Support for colors and references. | | index_text_pick_shape | Selected index letter background shape | Support circle and square, default is circle. | | index_line_multiplier | Row height of index letters | Support float value. | | index_show_water_drop | Whether to display water droplet prompt | Is the water droplet displayed, default is true. | | index_water_drop_gap | Spacing between water droplets and index bars | Only takes effect when index_show_water_drop is true. | ### License ``` Copyright [2023-2023] sunzn 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. ```