共 281 篇文章
显示摘要每页显示  条
Android中获取应用程序(包)的信息。> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">> <ListView android:id="@+id/list...
颜色矩阵android中可以通过颜色矩阵(ColorMatrix类)方面的操作颜色,颜色矩阵是一个5x4 的矩阵(如图1.1)矩阵的运算规则是矩阵A的一行乘以矩阵C的一列作为矩阵R的一行,setScale(float sx, float sy, float px, float py) 放大 setSkew(float kx, float ky, float px, float py) 斜切 setTranslate(float dx, float dy) ...
图像倾斜4)图像倒影 为图像添加倒影效果之后,图像看起来会有立体感,更有真实感,在Android中使用Matrix类可以很容易实现图像的倒影效果。图像倒影5)图像剪切 如果只需要图像的一部分,就必须对图像进行剪切处理,在原图像上选择一个剪切区域,使用PorterDuffXfermode图像叠加规则,就可以把指定的图像区域剪切下来,下面通过三...
第二个版本是让这些线程等待至一定的时间,如果还有线程没有到达barrier状态就直接让到达barrier的线程执行后续任务。假若有若干个线程都要进行写数据操作,并且只有所有线程都完成写数据操作之后,这些线程才能继续做后面的事情,此时就可以利用CyclicBarrier了:当所有线程线程写入操作完毕之后,所有线程就继续进行后续的操作了。从结果可以...
aidl 中通过RemoteCallbackList 运用到的回调机制: service回调activity的方法。} public int speak(String callingApp, String text, int queueMode, String[] params) { ArrayList<String> speakingParams = new ArrayList<String>();import com.pateo.aidl.Stub() { @Override public v...
android 瀑布流效果(仿蘑菇街)> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:color/background_light" android:orientation="...
// 根据响应获取文件大小 File dir = new File(dirStr); this.localFile = new File(dir, filename); RandomAccessFile raf = new RandomAccessFile(this.localFile, "rw"); raf.setLength(fileSize); raf.close();
Android高效加载大图、多图解决方案,有效避免程序OOM.http://developer.android.com/training/displaying-bitmaps/index.html高效加载大图片我们在编写Android程序的时候经常要用到许多图片,不同图片总是会有不同的形状、不同的大小,但在大多数情况下,这些图片都会大于我们程序所需要的大小。现在图片的大小已经知道了,我们就可以决定是把...
string.format用来格式化字符串(按指定的规则连接字符串或输出其他变量并返回新的字符串) 。--下面的%s对应参数str, %i对应参数intstr = string.format("这是字符串:''%s'' 这是数字值 %i",str,int);代码 u,o,x,X参数 数字值(number) 含义 参数作为一个无符号数字值打印,u使用十进制,o使用八进制,x或X使用十六进...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部