自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Mosthink

文章都是刚从wordpress手动搬过来的,格式转换得不好,比较乱

  • 博客(26)
  • 收藏
  • 关注

原创 The Adapter of ListView: Just adapt data to view, don’t do anything else

The design of SimpleAdapter is not good in my opinion.An adapter should just adapter the data to view, not care to inflate xml to create Layout View, hold the member Views of the layout view, and, fill

2016-03-16 20:58:40 318

原创 Shape + Selector: Make a Shape as one item of the Selector

Generally, I use a selector to select pictures or colors to render the normal and the pressed background for View.And use a Shape to draw a fixed background with border, round, gradient and other UI ef

2016-03-16 20:57:55 372

原创 Units Problem: How to read text size as custom attr from xml and set it to TextView in java code

Here is this topic’s background:I defined a custom View which extends FrameLayout and contains a TextView, calledMyView here. And I defined custom attribute “myviewtextsize” in attrs.xml for MyView so

2016-03-16 20:55:34 438

原创 Android笔记

Eclipse 【ADT】 源https://dl-ssl.google.com/android/eclipseNotice that no matter what scenario causes the activity to stop, the system always calls onPause() before calling onStop().Although the onPause()

2016-03-16 20:54:38 262

原创 js笔记

定义描述类名或者方法名的注解:ClassOrMethodFullName.java【写一个js方法】123function alertdemo() { //}; function + 方法名 + 括号 + 代码块【调用这个js方法得加括号】1点击这里【带参数的函数,参数是不需要声明类型部分的】12345function alertmsg(msg) {alert(ms

2016-03-16 20:53:57 227

原创 设计模式笔记

设计模式笔记

2016-03-16 20:53:22 268

原创 多线程笔记

某个线程获得对象的锁之后,只能阻止其他线程获得同一个锁,并不能阻止其他线程通过另外的锁来访问对象的变量每个可变或共享的变量都该由同一个锁来保护;简单粗暴的全部synchronized会使得并发程序变成串行程序,影响性能,多核CPU会有空载运行,应该缩小同步块的大小,将不影响共享状态并且执行时间较长的操作从同步代码块中分离出去。简单性(对整个方法同步)与并发性(对尽可能短的代码路径进行同步)之间的平衡

2016-03-16 20:52:26 297

原创 泛型:有限通配符的用法

发送一个子类对象给声明了其父类类型的方法,是没问题的;但是发送一个子类对象List给声明了其父类类型List的方法,是不行的;这个时候,有限通配符就可以派上用场,在接受方法的声明中:List

2016-03-16 20:51:30 308

原创 ClassLoader笔记

类与类加载器类加载器阶段的“通过一个类的全限定名来获取描述此类的二进制字节流”这个动作被放到了Java虚拟机外部去实现,以便让应用程序自己定义如何获取所需要的类,即,可在自己的代码中实现一个java.lang.ClassLoader类作为自定义的类加载器;不同的类加载器加载上来的类并不相等,即使是来源于同一个二进制字节流的class定义;换言之,比较两个类是否相等,只有在这两个类是同一个类加载器的前

2016-03-16 20:49:48 460

原创 程序:推送水木文章到Kindle

代码见: https://github.com/Viyu/PushNewsmth2Mail当年买Kindle的时候,想再Kindle上阅读水木的帖子,但Kindle的Web上网体验太差,想着把文章推送到Kindles上看,就写了这个项目。基本流程就是:JavaFx的WebEngine加载页面 –> Jsoup解析抽取内容 –> Java mail发邮件给Kindle邮箱界面也是JavaFx写的一个桌

2016-03-16 20:48:59 505

原创 安卓应用:DoubleFacedCamera

未完成,当年对其产品形态有很高的评价,觉得双面同时拍是个创意。代码见: https://github.com/Viyu/DoubleFacedCamera这个app的想法是:用手机的前置和后置摄像头同时拍摄画面合成输出一张图,把拍摄者和被拍摄者的画面同时保存。完成进度:可以以固定位置的方式,将前置照片合到后置照片上,两张照片“几乎”是同时拍摄的。困难:“几乎”是同时拍摄的,由于安卓手机不能同时打开两

2016-03-16 20:47:49 409

原创 安卓应用:蓝牙对聊

代码见: https://github.com/Viyu/BluetoothChat当时对这个产品的形态有很高的评价….蓝牙聊天核心是Android Demo里的,我加上了类似微信的界面。我觉得这个应用要是能推广的话,有点市场,它的应用场景在于:1, 聊天不需要流量,在没有网络、断网的情况下,两个人聊天,这个软件就派上用场了;2, 看完1, 肯定会问:两个人既然都蓝牙范围内了,还需要用手机聊天?干嘛

2016-03-16 20:44:22 570

原创 安卓应用:简单记事本

代码见: https://github.com/Viyu/ANotepad当年学安卓做的第一个应用。

2016-03-16 20:42:48 717

原创 安卓游戏应用-连连看

代码见:https://github.com/Viyu/LianLianKan

2016-03-16 20:42:04 532

原创 安卓游戏应用-变形金刚拼图

代码见: https://github.com/Viyu/TransformersPuzzle

2016-03-16 20:41:18 354

原创 排序笔记

排序笔记

2016-03-16 20:39:57 288

原创 JVM笔记

局部变量表(虚拟机栈中的一部分)在编译期完成分配,运行期不会再改变大小;每个方法对应一个栈帧(存储局部变量表、操作数栈、动态链接、方法出口等),栈帧被存储到虚拟机栈中,每个线程对应一个虚拟机栈,方法结束,栈帧生命周期结束,线程结束,虚拟机栈生命周期结束;如果线程请求的虚拟机栈深度大于虚拟机所允许的深度,throw StackOverflowerror;如果动态扩展时请求不到足够内存,throw Ou

2016-03-16 20:39:10 228

原创 Java String笔记

【String】就是对char[]数组进行封装的对象,由三部分组成:1, char数组:它是String对象所表示的字符串的超集;2, 3, offset和count,表示了String对象表示的字符串在char数组中的起始段;String是特定设计的,包含以下三个特点:1, 不变性: 不变模式immutable,节省了同步和锁等待的消耗;2, 针对【常量池】的优化:变量 内存空间 常量池Strin

2016-03-16 20:38:25 412

原创 集合笔记

集合笔记

2016-03-16 20:37:44 326

原创 数据结构和算法笔记

数据结构和算法笔记

2016-03-16 20:28:03 405

原创 LED notification in Android device

Code can control the LED notification in Android device, using android.app.Notification:notification = new Notification();notification.flags = Notification.FLAG_SHOW_LIGHTS;notification.ledARGB =

2013-12-10 16:19:40 698

原创 How to tile small texture image onto page as its background?

You don’t need to set a big size image as the background of pages if the image is texture or uniform color.How to tile small texture image onto big page/area as its background?First, define dr

2013-12-05 11:20:27 495

原创 Implement a TextView with an animation in its left side.

In my case, I want to write a TextView with an animation in its left side.ImageView + TextView could work but it’s not frugal enough.TextView with drawableLeft would be the best option.<Te

2013-12-05 11:18:55 1549

原创 The Adapter of ListView: Just adapt data to view, don’t do anything else

The design of SimpleAdapter is not good in my opinion.An adapter should just adapter the data to view, not care to inflate xml to create Layout View, hold the member Views of the layout view, and,

2013-12-05 11:15:51 432

原创 Shape + Selector: Make a Shape as one item of the Selector

Generally, I use a selector to select pictures or colors to render the normal and the pressed background for View. And use a Shape to draw a fixed background with border, round, gradient and other UI

2013-12-05 11:12:56 623

原创 Units Problem: How to read text size as custom attr from xml and set it to TextView in java code

Here is this topic’s background:I defined a custom View which extends FrameLayout and contains a TextView, calledMyView here. And I defined custom attribute “myviewtextsize” in attrs.xml for MyV

2013-12-05 11:08:43 1025

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除