摘要: github地址:https://github.com/hdodenhof/CircleImageViewpackage de.hdodenhof.circleimageview;import edu.njupt.zhb.main.R;import android.content.Context;i... 阅读全文
posted @ 2015-07-11 15:52 包子糖Sakura 阅读(2050) 评论(0) 推荐(0)
摘要: 当按钮使用shape.xml文件设置了圆角之后,如果直接在代码中使用setBackgroundColor(color),则会失去圆角效果这种情况怎么解决呢比如设置登录时的按钮:1 GradientDrawable myGrad = (GradientDrawable) login.getBackgr... 阅读全文
posted @ 2015-07-09 19:48 包子糖Sakura 阅读(197) 评论(0) 推荐(0)
摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2015-07-09 17:34 包子糖Sakura 阅读(138) 评论(0) 推荐(0)
摘要: Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer... 阅读全文
posted @ 2015-07-05 13:38 包子糖Sakura 阅读(155) 评论(0) 推荐(0)
摘要: ##Roman to Integer > Given a roman numeral, convert it to an integer.首先介绍罗马数字罗马数字共有七个,即I(1),V(5),X(10),L(50),C(100),D(500),M(1000)。按照下面的规则可以表示任意正整数。重复... 阅读全文
posted @ 2015-07-01 21:57 包子糖Sakura 阅读(1265) 评论(0) 推荐(0)
摘要: Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.题目的意图It seems that it is not to check betwe... 阅读全文
posted @ 2015-07-01 16:50 包子糖Sakura 阅读(159) 评论(0) 推荐(0)
摘要: 题目如下:1.如何画出一个印章的图案; 2.如何实现一个字体的描边与阴影效果;3.同一个应用程序的不同Activity可以运行在不同的进程中么?如果可以,举例说明;4.Java中的线程同步有哪几种方式,举例说明;5.说说对Handler, Looper, 以及HandlerThread的理解;6... 阅读全文
posted @ 2015-04-12 13:46 包子糖Sakura 阅读(251) 评论(0) 推荐(0)
摘要: 1、利于系统自带的颜色类如TextView1.setTextColor(Android.graphics.Color.RED);2、数字颜色表示法TextView1.setTextColor(0xffff00ff);3、自定义颜色TextView1.setTextColor(this.getReso... 阅读全文
posted @ 2015-04-09 19:59 包子糖Sakura 阅读(841) 评论(1) 推荐(1)
摘要: 后来注意到Genymotion启动的时候adb无法正常使用,反复调用adb启动新的server也无法解决 解决起来很简单。打开Genymotion设置界面,进入ADB标签,选中Use custom Android SDK tools,配置正确的SDK地址,OK,![](http://images.c... 阅读全文
posted @ 2015-04-08 14:06 包子糖Sakura 阅读(673) 评论(0) 推荐(0)
摘要: 在xml文件中,view控件一般都会有android:visibility这个属性android:visibility:gone|cisible|invisible在代码中,可以通过方法setVisbility来改变这一属性setVisibility(int visibility)visibilit... 阅读全文
posted @ 2015-04-08 13:43 包子糖Sakura 阅读(849) 评论(0) 推荐(0)
摘要: gravity 这个英文单词是重心的意思,在这里就表示停靠位置的意思。android:layout_gravity 和 android:gravity 的区别从名字上可以看到,android:gravity是对元素本身说的,元素本身的文本显示在什么地方靠着换个属性设置,不过不设置默认是在左侧的。an... 阅读全文
posted @ 2015-03-13 19:27 包子糖Sakura 阅读(284) 评论(0) 推荐(0)