第一步:自定义ClickableSpan 第二步:处理html 第三步:设置给textView 至此就能首先自定义点击了。

第一步:自定义ClickableSpan 第二步:处理html 第三步:设置给textView 至此就能首先自定义点击了。
前言 最近产品提了个需求,要把商品列表做成类似淘宝的样式 一般遇到这种需求,我们首先会想到的是,拦截TouchEvent,然后自己来处理滑动,这种方法虽然行得通,但是代码写起...
本文已授权 微信公众号 玉刚说 (@任玉刚)独家发布。 前言 我是一个崇尚 开源 的Android开发者,在过去的一段时间里,我研究了Github上的一些优秀的开源库,这些库...
不居中有一块是这样布局的,以前
那么在ConstraintLayout里面该怎么设计呢?(这是整个页面布局的一小块)
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:background="#ff0000"
android:padding="16dp"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:textColor="#ffffff"
android:text="姓名"
/>
</LinearLayout>
约束布局ConstraintLayout看这一篇就够了目录 1.介绍 2.为什么要用ConstraintLayout 3.如何使用ConstraintLayout3.1 添加依赖3.2 相对定位3.3 角度定位3.4 边距3.5...
最近也在学习,觉得Widget的写法好混乱啊,各种嵌套……各种括号,看得晕……
1.首先什么是HLS格式的视频,大家去谷歌下就知道了。 2.我们知道HLS格式的视频,只有安卓4.0以上才支持,目前基本4.0一下的机子基本可以考虑,不兼容了,所以为了减少工...
简介 RecyclerView在24.2.0版本中新增了SnapHelper这个辅助类,用于辅助RecyclerView在滚动结束时将Item对齐到某个位置。特别是列表横向滑...
原文链接 现状 网上关于Android studio打包jar的教程很多,基本思路如下 项目build.gradle中增加一个Jar任务, 指定打包路径。如下: 这样做个人觉...
我非常喜欢Material Design里折叠工具栏的效果,bilibili Android客户端视频详情页就是采用的这种设计。这篇文章的第二部分我们就通过简单的模仿bili...