Android安卓上用代码实现设置圆角radius的颜色背景

Android经常会使用shape来定制一些View的背景,可以修改View的背景颜色,形状等属性。一般情况下,shape都是在xml文件里面实现,比如:

<shape xmlns:android="http://schemas.android.com/apk/res/android" >
    <solid android:color="#1d3c80" />
    <corners android:radius="@dimen/dim30" />
</shape>

继续阅读“Android安卓上用代码实现设置圆角radius的颜色背景”

android TextView autolink的用法——自动识别电话|网址|邮件

1. 通用的方法

textView.setAutoLinkMask(Linkify.ALL);
或者在xml布局文件中 android:autoLink=”all”

2. 带正则式的识别方法,超过五位数字默认为手机号

Pattern pattern = Pattern.compile(“\\d{5,}”);
Linkify.addLinks(mTv_kuaibao, pattern, “tel:”);
最后:防止点击事件冲突,在TextView的根部局中加入
android:descendantFocusability=”blocksDescendants”

3. 只自动识别电话

android:autoLink=”phone”

4. 只自动识别网址

android:autoLink=”web”

chrome扩展通过firefox下载安装

FireFox下面竟然有个开脑洞的扩展:

https://addons.mozilla.org/zh-CN/firefox/addon/chrome-store-foxified/

Chrome Store Foxified

Enables the Google Chrome Store for Firefox. Point and click to install Chrome extensions straight into Firefox.

继续阅读“chrome扩展通过firefox下载安装”

Android的logcat中如何根据标签去过滤掉不显示某些log信息

Eclipse Logcat Viewer支持各种形式的过滤规则的——Search for messages. Accepts Java regexes. Prefix with pid:, app:, tag or text: to limit scope.


继续阅读“Android的logcat中如何根据标签去过滤掉不显示某些log信息”