DropdownTextView (/details/1/6765)
93 (https://github.com/hakobast/DropdownTextView/stargazers?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765) 5
(https://github.com/hakobast/DropdownTextView/watchers?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765) 7
(https://github.com/hakobast/DropdownTextView/network?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765) 1
(https://github.com/hakobast/DropdownTextView/issues?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
(https://facebook.com/sharer.php?
General u=https://android-
Category
arsenal.com/details/1/6765)
Free (/free)
Tag
(https://twitter.com/intent/twe
arsenal.com/details/1/6765&text=The%20An
Text Views (/tag/101)
License %2
%20DropdownTextView
Apache License, Version 2.0 (http://opensource.org/licenses/Apache-2.0?utm_source=android-arsenal.co
m&utm_medium=referral&utm_campaign=6765)
(http://news.ycombinator.com/submitlink
Min SDK
6 (Android 2.0.1 Eclair) (/api?level=6)
arsenal.com/details/1/6765&t=The%20Andro
Registered
Feb 17, 2018 %20Text%20Views%20-%20D
Favorites
4
Link
https://github.com/hakobast/DropdownTextView (https://github.com/hakobast/DropdownTextView?utm_so
urce=android-arsenal.com&utm_medium=referral&utm_campaign=6765)
See also
richeditor-android (/details/1/1696)
FireZenk-s-TickerText (/details/1/1849)
AutoScrollTextView (/details/3/2852)
(https://plus.google.com/share?
Float Labeled EditText (/details/1/475)
EmailAutoCompleteTextView (/details/1/900)
url=https://android-
Additional arsenal.com/details/1/6765)
Language
Kotlin
(https://reddit.com/subm
arsenal.com/details/1/6765&title=The%20An
Version
%20Text%20Views%20-%2
v0.2.0 (May 29, 2018) (https://github.com/hakobast/DropdownTextView/releases/tag/v0.2.0?utm_source=
android-arsenal.com&utm_medium=referral&utm_campaign=6765)
Created
Feb 11, 2018
Updated
May 30, 2018
Owner
Hakob Astvacatryan (hakobast) (/user/hakobast)
Contributor
1 (https://github.com/hakobast/DropdownTextView/graphs/contributors?utm_source=android-arsenal.com
&utm_medium=referral&utm_campaign=6765)
Activity
Badge
Generate
Download
Source code
APK file
Blurb
65% of Traders Lose
eToro™- No.1 in Money. Join 9M Users
Worldwide & Learn to
Social Trading Invest Better. Start Today!
DropdownTextView
Simple drop-down TextView for Android
Intro
(https://github.com/hakobast/DropdownTextView/raw/master/example-screens/example-1.gif?
utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=6765)
(https://github.com/hakobast/DropdownTextView/raw/master/example-screens/example-2.gif?
utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=6765)
Usage
Adds drop-down to your layout via XML
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<hakobastvatsatryan.DropdownTextView
android:id="@+id/first_dropdown_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title_font="@font/your-title-font"
app:title_text="@string/your-title-text"
app:title_text_color="@color/your-title-text-color"
app:title_text_size="@dimen/your-title-text-size"
app:content_font="@font/your-font"
app:content_padding="@dimen/your-content-padding"
app:content_text="@string/your-content-text"
app:content_text_color="@color/your-content-text-color"
app:content_text_size="@color/your-content-text-size"
app:arrow_drawable="@drawable/your-arrow-icon" comment="icon should be faced to the
app:bg_drawable_regular="@drawable/your-regular-background"
app:bg_drawable_expanded="@drawable/your-expanded-background"
app:expand_duration="@integer/your-expand-duration"
app:panel_padding="@dimen/your-panel-padding"/>
</LinearLayout>
Adds drop-down to your layout pragmatically
val dropdown = DropdownTextView.Builder(this)
.setTitleTextRes(R.string.your_title_text)
.setTitleTextColorRes(R.color.your_title_text_color)
.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)
.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:
compile 'com.github.hakobast:dropdown-textview:0.2'
Maven:
<dependency>
<groupId>com.github.hakobast</groupId>
<artifactId>dropdown-textview</artifactId>
<version>0.2</version>
<type>pom</type>
</dependency>
Contact
Email: hakob.astvacatryan@gmail.com (mailto:hakob.astvacatryan@gmail.com)
Twitter: https://twitter.com/hak_ast (https://twitter.com/hak_ast?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
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.
65% of Traders Lose
eToro™- No.1 in Money. Join 9M Users
Worldwide & Learn to
Social Trading Invest Better. Start Today!
Follow us on Twitter (https://twitter.com/Android_Arsenal?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
Read us in Telegram (https://telegram.me/AndroidArsenal?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
Get Android app on Google Play (https://play.google.com/store/apps/details?
id=com.android_arsenal.androidarsenal&utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
Stay informed with Pushbullet (https://www.pushbullet.com/channel?tag=android_arsenal&utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
Created by Vladislav Bauer (https://github.com/vbauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
(https://twitter.com/BauerVlad?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
(https://www.linkedin.com/in/vladislavbauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
(https://www.paypal.me/VladislavBauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=6765)
© 2014-2018 - Android Arsenal (/) | Privacy (/privacy)