摘要: //将listview放在scrollview中时只显示一条,尽量别放,违背设计初衷//listview未显示的时候将其生成图片会导致只显示一条view,通过下面public void fixListViewHeight(ListView listView) { // 如果没有设置数据适配器,则Li 阅读全文
posted @ 2016-01-16 18:41 visuals 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 有两种用法,我的通常写在代码中,像下面这样:Java代码/***Layout动画**@return*/protectedLayoutAnimationControllergetAnimationController(){intduration=300;AnimationSetset=newAnima... 阅读全文
posted @ 2015-12-31 15:17 visuals 阅读(931) 评论(0) 推荐(0) 编辑
摘要: 要进行电源的操作需要在AndroidManifest.xml中声明该应用有设置电源管理的权限。你可能还需要另外WakeLock的设置是 Activiy 级别的,不是针对整个Application应用的if(wakeLock == null) { Log.v("acquire=wakeloc... 阅读全文
posted @ 2015-12-10 13:51 visuals 阅读(1088) 评论(0) 推荐(0) 编辑
摘要: 今天使用Fragment的时候,出现了这个错误IllegalStateException: Can not perform this action after onSaveInstanceState:E/AndroidRuntime(12747):Causedby:java.lang.Illegal... 阅读全文
posted @ 2015-11-30 18:27 visuals 阅读(2155) 评论(0) 推荐(0) 编辑
摘要: 一、setMaskFilter(MaskFilter maskfilter)setMaskFilter(MaskFilter maskfilter)是paint中的方法,它可以用来对图像进行一定的处理。这个方法需要传入一个MaskFilter对象。但MaskFilter类中没有任何实现方法,所以我们... 阅读全文
posted @ 2015-11-24 13:55 visuals 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 首先在Manifest中找到该Activity,设置属性:android:windowSoftInputMode="adjustResize|stateAlwaysHidden"在XML文件中搞一个自定义Layout如:然后定义这个Layout:public class TestSoftKeyboa... 阅读全文
posted @ 2015-11-19 13:19 visuals 阅读(190) 评论(0) 推荐(0) 编辑
摘要: public Bitmap createCanNotRecycleBitmap(Bitmap bitmap) { int fgWidth = bitmap.getWidth(); int fgHeight = bitmap.getHeight(); //create the new... 阅读全文
posted @ 2015-11-10 18:17 visuals 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-11-09 15:57 visuals 阅读(750) 评论(0) 推荐(0) 编辑
摘要: open -a /Applications/Sublime\ Text\ 2.app composer.json每次这样输太麻烦,可以这样:ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/lo... 阅读全文
posted @ 2015-11-04 17:33 visuals 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 今天跑程序的时候,出现这样的错误:android.content.res.Resources$NotFoundException:String resource ID #0x86LogCat显示出错行是:if (bet.getStatus() != null) { holder.statusVi... 阅读全文
posted @ 2015-10-29 18:26 visuals 阅读(130) 评论(0) 推荐(0) 编辑