tt_mc

导航

上一页 1 2 3 4 5 6 ··· 18 下一页

2014年8月9日 #

android开发常见编程错误总结

摘要: 1.设置TextView的文本颜色123TextView tv;...tv.setTextColor(R.color.white);其实这样设置的颜色是 R.color.white的资源ID值所代表的颜色值,而不是资源color下的white颜色值:正确的做法如下:1tv.setTextColor(... 阅读全文

posted @ 2014-08-09 14:23 tt_mc 阅读(1995) 评论(0) 推荐(0) 编辑

2014年8月5日 #

Ant自动编译打包&发布 android项目

摘要: Eclipse用起来虽然方便,但是编译打包android项目还是比较慢,尤其将应用打包发布到各个渠道时,用Eclipse手动打包各种渠道包就有点不切实际了,这时候我们用到Ant帮我们自动编译打包了。1 Ant自动编译打包android项目 1.1 Ant安装 ant的安装比较简单,下载ant压... 阅读全文

posted @ 2014-08-05 09:41 tt_mc 阅读(13437) 评论(0) 推荐(0) 编辑

2014年8月2日 #

Android Multiple Screens Android 屏幕适配的一些总结

摘要: 作为一名Android应用开发程序猿,最痛苦的事莫过于在屏幕适配了,这与历史原因有关,具体就不深究了。直到最近才搞明白dpi是怎么换算的,在开发的过程中,一个应用运行的屏幕标准应该是分辨率为320x480密度为160dpi的屏幕上,所以所有放在drawable、drawable-mdpi、value... 阅读全文

posted @ 2014-08-02 16:37 tt_mc 阅读(708) 评论(0) 推荐(0) 编辑

Android开发贴士集合

摘要: Activity.startActivities()——对于从app流的中部启动会非常好。TextUtils.isEmpty()——一个普遍适用的简单工具类。Html.fromHtml()——格式化Html的快速方法,本人认为它也不是非常快,所以我不是经常用它(我说不经常用它是为了重点突出这句话:请... 阅读全文

posted @ 2014-08-02 16:26 tt_mc 阅读(1193) 评论(0) 推荐(0) 编辑

2014年7月27日 #

Swift学习笔记 - 函数与闭包

摘要: import Foundation//1.函数的定义与调用//以 func 作为前缀,返回箭头 -> 表示函数的返回类型func sayHello(name: String) -> String { let greeting = "Hello " + name + "!" return ... 阅读全文

posted @ 2014-07-27 13:32 tt_mc 阅读(3673) 评论(0) 推荐(0) 编辑

2014年7月12日 #

Swift学习笔记

摘要: 常量 :let product_constant = "iphone6"变量 :var product_var = "ipad" //不需要声明变量类型,会根据右侧的值推导左侧变量的类型可以多个变量定义在一起:var x1 = 30, x2 = "abc"可以精确指定变量的类型: var x1:In... 阅读全文

posted @ 2014-07-12 22:24 tt_mc 阅读(370) 评论(0) 推荐(0) 编辑

2014年6月18日 #

Android TextView文字空格

摘要:  表示全角空格, 你好      啊http://stackoverflow.com/questions/1587056/android-string-concatenate-how-to-keep-the-spaces-at-... 阅读全文

posted @ 2014-06-18 16:02 tt_mc 阅读(12885) 评论(0) 推荐(1) 编辑

2014年5月30日 #

adb shell dumpsys 命令

摘要: Android开发中,常常可以用adbshelldumpsys这条命令来dump出系统运行时的状态信息,例如可以这样来察看某个应用的内存使用信息adb shell dumpsys meminfo com.google.android.apps.maps察看TaskStackadb shell dum... 阅读全文

posted @ 2014-05-30 13:12 tt_mc 阅读(3712) 评论(0) 推荐(0) 编辑

2014年3月28日 #

ViewPager PagerAdapter not updating the View

摘要: There are several ways to achieve this.The first option is easier, but bit more inefficient.Override getItemPosition in your PagerAdapter like this:public int getItemPosition(Object object) { return POSITION_NONE;}This way, when you call notifyDataSetChanged(), the view pager will remove all view... 阅读全文

posted @ 2014-03-28 10:42 tt_mc 阅读(292) 评论(0) 推荐(0) 编辑

2014年3月26日 #

Make ProgressBar Vertical

摘要: Create a drawable in yourDrawablefolder calledvertical_progress_bar.xml: Create astyles.xmlfile in theResource/Valuesfolder: Now you should be able to use something like, in your layout: 阅读全文

posted @ 2014-03-26 19:02 tt_mc 阅读(610) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 18 下一页