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