【基础学习】Android可伸缩文本内容显示
来源:互联网 发布:unity3d教程百度云 编辑:程序博客网 时间:2024/06/05 19:15
介绍:
一个可以伸缩展开并且带平缓过渡动画的自定义文本控件,你可以设置其展开的行数,伸缩收起的图标,伸缩收起的文本和颜色等。
运行效果:
使用说明:
把TextViewExpandableAnimation.java以及一些资源文件比如attrs.xml拷贝到你的项目。
xml
<com.freecats.demo.view.TextViewExpandableAnimation xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/tv_expand" android:layout_width="wrap_content" android:layout_height="wrap_content" app:tvea_expandBitmap="@drawable/icon_green_arrow_down" app:tvea_expandLines="3" app:tvea_shrinkBitmap="@drawable/icon_green_arrow_up" app:tvea_textContentColor="@color/color_gray_light_content_text" app:tvea_textContentSize="@dimen/sp_txt_size_content" app:tvea_textExpand="@string/expand" app:tvea_textShrink="@string/shrink" app:tvea_textStateColor="@color/colorPrimary" />
java
TextViewExpandableAnimation tvExpand = (TextViewExpandableAnimation) findViewById(R.id.tv_expand); tvExpand.setText(text);
支持以下属性:
源码:https://github.com/freecats/TextViewExpandableAnimation
0 0
- 【基础学习】Android可伸缩文本内容显示
- 文本阅读伸缩显示
- Android 文本伸缩效果
- Android 文本内容滚动显示
- 可伸缩的文本控件ExpandTextView
- Android ----可伸缩的控件
- 表格内容可伸缩代码实现
- android中使用gridview显示文本内容
- Android前台界面之详解TextView内容任意长度的伸缩、显示与隐藏
- mlpack:可伸缩C++机器学习库
- mlpack:可伸缩C++机器学习库
- SVG可伸缩矢量图形学习笔记
- Qt on Android:创建可伸缩界面
- android ExpandableTextView可伸缩的TextView
- Qt on Android:创建可伸缩界面
- android中可伸缩图像的应用。
- 可根据内容多少自动伸缩的textarea
- details——内容可伸缩的标签
- 块状链表及其实现
- ios中用到的数学函数
- 设计模式之观察者模式
- ACID
- String类型转成bigdecimal类型
- 【基础学习】Android可伸缩文本内容显示
- Oracle 12c RAC: Clusterware logs are now centralized
- HTTP请求方法
- Android_ContentProvider详解(实现增删改查)
- Struts与Struts2的区别
- 区间重合判定
- POJ2728-Desert King(最优比率生成树)
- vmare Mac OS 常见错误
- mysql 动态横向扩展