# DropdownTextView **Repository Path**: mevermore/DropdownTextView ## Basic Information - **Project Name**: DropdownTextView - **Description**: DropdownTextView 是一个可定制的 Android UI 组件,以美观且高效的方式展示可展开/折叠的内容区域。 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-15 - **Last Updated**: 2025-08-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: Library ## README # DropdownTextView Simple drop-down TextView for Android ## Intro ![](example-screens/example-1.gif) ![](example-screens/example-2.gif) ## Usage Adds drop-down to your layout via XML ```xml ``` Adds drop-down to your layout pragmatically ```kotlin val dropdown = DropdownTextView.Builder(this) .setTitleTextRes(R.string.your_title_text) .setTitleTextColorRes(R.color.your_title_text_color) .setTitleTextColorExpandedRes(R.color.your_title_text_color_expanded) .setTitleTextSizeRes(R.dimen.your_title_text_size) .setTitleFontRes(R.font.your_title_font) .setContentTextRes(R.string.your_content_text) .setContentTextColorRes(R.color.your_content_text_color) .setContentTextSizeRes(R.color.your_content_text_size) .setContentFontRes(R.color.your_content_text_font) .setContentPaddingRes(R.dimen.your_content_padding) .setHtmlContent(htmlText) .setHtmlContent(htmlText, handler) .setLinkTextColorRes(R.color.your_text_link_color) .setLinkUnderline(isUnderlineVisible) .setArrowDrawableRes(R.drawable.your_drawable_icon) // icon should be faced to the right .setRegularBackgroundDrawableRes(R.drawable.your_regular_background) .setExpandedBackgroundDrawableRes(R.drawable.your_expanded_background) .setPanelPaddingRes(R.dimen.your_panel_padding) .setExpandDuration(your_expand_duration) .build() root.addView(dropdown) // You can specify layout params for dropdown ``` ## Download Gradle: ```groovy compile 'com.github.hakobast:dropdown-textview:0.3.1' ``` Maven: ```xml com.github.hakobast dropdown-textview 0.3.1 pom ``` ## Contact - **Email**: hakob.astvacatryan@gmail.com - **Twitter**: https://twitter.com/hak_ast ## License Copyright 2018 Hakob Astvatsatryan 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.