会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
屌丝迷途
上一页
1
···
10
11
12
13
14
2014年10月10日
Android读取自定义View属性
摘要: Android读取自定义View属性attrs.xml : activity_main.xml : MyView.java :public MyView(Context context, AttributeSet attrs) { super(c...
阅读全文
posted @ 2014-10-10 10:31 屌丝迷途
阅读(415)
评论(0)
推荐(0)
2014年9月19日
Canvas drawText实现中英文居中
摘要: @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); ...
阅读全文
posted @ 2014-09-19 16:11 屌丝迷途
阅读(792)
评论(0)
推荐(0)
Textview在Listview中实现跑马灯效果
摘要: textview添加属性:android:singleLine="true" 表示单行显示android:ellipsize="marquee"设置当文字过长时,该控件该如何显示。有如下值设置:”start”—–省略号显示在开头;”end”——省略号显示在结尾;”middle”—-省略号显示在中间;...
阅读全文
posted @ 2014-09-19 15:29 屌丝迷途
阅读(456)
评论(0)
推荐(0)
2014年9月16日
停止运行ExecutorService中的线程
摘要: 1 while(true){2 try { 3 sleep(1000);4 } catch (InterruptedException e) {5 ...
阅读全文
posted @ 2014-09-16 14:32 屌丝迷途
阅读(4487)
评论(0)
推荐(0)
2013年4月9日
点击Notification正确回调到之前已经放置在后台的Task中的对应Activity,而不是创建它的一个新实例
摘要: NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable.logo_icon_16,"移动营销", System.currentTimeMillis()); Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGOR
阅读全文
posted @ 2013-04-09 00:10 屌丝迷途
阅读(378)
评论(0)
推荐(0)
2013年4月8日
Android中在通知栏内常驻应用程序消息
摘要: // 添加常驻通知private void setNotification() { NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable.icon, getString(R.string.app_name), System.currentTimeMillis()); Intent intent = new Inten...
阅读全文
posted @ 2013-04-08 23:50 屌丝迷途
阅读(1892)
评论(0)
推荐(0)
上一页
1
···
10
11
12
13
14
导航
博客园
首页
新随笔
联系
订阅
管理
公告