Android中TextView添加删除线
项目中的需求~~~~
商城中物品的一个本身价格,还有一个就是优惠价格。。。需要用到一个删除线。
public class TestActivity extends Activity { private TextView tv;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tv = (TextView) findViewById(R.id.tvId);
tv.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG);
} }
当然还有其他的属性,比如下划线等待。。。有时间的童鞋可以试试
本文为博主原创文章,转载请注明出处
http://www.cnblogs.com/rencm/p/5194972.html
Android中TextView添加删除线的更多相关文章
- Android中TextView和EditView常用属性设置
Android中TextView和EditView常用属性设置 点击跳转
- android 为TextView添加边框
今天需要在TextView上面添加一个边框,但是TextView本身不支持边框,所以只能采用其他方式,在网上查询了一下,主要有三种方式可以实现1.带有边框的透明图片2.使用xml的shape设置3继承 ...
- Android中textView自动识别电话号码,电子邮件,网址(自动加连接)
extends:http://blog.csdn.net/wx_962464/article/details/8471195 其实这个是很简单的,在android中已经为我们实现了,但是我估计很多人都 ...
- Android开发:TextView添加超链接的简便方法
TextView中加入超链接的方式很多,但下面的方式应该的最简便合理的 strings.xml中定义字串 <string name="blog"><a href= ...
- Android 为 TextView 添加超链接 (网址,邮件,电话)
<string name="info">Cette application a été développée par <a href="http://w ...
- Android中TextView setText int 报错
在对中TextView setText 覆值int 时报错,网上查下原因是setText整型表明是设值R.id.xxx,当然找不到. 解决方法是将int转化为string,用String.valueO ...
- iOS 为label添加删除线
UILabel *testLabel = [[ UILabel alloc] initWithFrame:CGRectMake(, , , )]; testLabel.numberOfLines = ...
- ios Lable 添加删除线
遇到坑了: NSString *goodsPrice = @"230.39"; NSString *marketPrice = @"299.99"; NSStr ...
- python 对过时类或方法添加删除线的方法
class Cat(Animal): def __init__(self): import warnings warnings.warn("Cat类带删除线了", Deprecat ...
随机推荐
- VS2015 新Web项目(C#6)出现CS1617错误的解决
VS2015新增了对C#6的支持. 在新的Web项目模板中通过引入nuget包Microsoft.CodeDom.Providers.DotNetCompilerPlatform:1.0.0并在web ...
- Microsoft Orleans 之 入门指南
Microsoft Orleans 在.net用简单方法构建高并发.分布式的大型应用程序框架. 原文:http://dotnet.github.io/orleans/ 在线文档:http://dotn ...
- jQuery Ajax实现下拉框无刷新联动
HTML代码: @{ Layout = null; } @using DAL; @using System.Data; @{ AreaDal areaDal = new AreaDal(); stri ...
- 参数类型params
params参数练习 namespace Test { class Program { static void Main(string[] args) { //params 构造函数声明数组,可变数组 ...
- jquery.tagthis和jquery.autocomplete一起实现标签
目的 jquery.tagthis:http://www.dangribbin.co/jquery-tag-this/demo/ 使用tagthis控件实现标签的输入提醒功能,每个标签具有id和tex ...
- css特效
1.页面淡入淡出 <html style="background:#0086b5"> <!--简易loading--> <div id="l ...
- C#操作XML文件
1.创建.读取XML文件 using System; using System.Collections.Generic; using System.Linq; using System.Text; u ...
- 导出Excel文件(针对Dev)
文件类: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System. ...
- Oracle Database 11g For Windows7 旗舰版的安装
系统环境:win7 32位系统 安装步骤: 1,Oracle(甲骨文)官网下载适合自己的数据库安装包,下载地址http://www.oracle.com/technetwork/cn/indexes/ ...
- 框架SpringMVC笔记系列 二 传值
主题:SpringMVC(第一节中再回顾复习一次) 学习资料参考网址: 1.http://www.icoolxue.com 2.http://haohaoxuexi.iteye.com/blog/13 ...