android中ImageView的ScaleType属性 ScaleType的值分别代表的意义:ImageView是Android中的基础图片显示控件,该控件有个重要的属性是ScaleType,该属性用以表示显示图片的方式,共有8种取值 ScaleType.CENTER::图片大小为原始大小,.....
分类:
移动开发 时间:
2014-07-19 18:00:53
阅读次数:
236
默认本工程创建的文件本工程对其有读写权限。我们可以通过context.openFileOutput("文件名", 模式);我们可以创建私有, 共有, 只读, 只写文件, 默认的文私有文件。如果别的Android工程访问本工程的文件的话就会受限制, android的内核是linux, 所以他的文件管理...
分类:
移动开发 时间:
2014-07-19 16:12:31
阅读次数:
346
http://www.cnblogs.com/zhangdongzi/archive/2011/04/14/2016434.html放在assets目录http://www.cnblogs.com/luxiaofeng54/archive/2011/03/15/1984617.htmlassets及...
分类:
移动开发 时间:
2014-07-19 15:17:54
阅读次数:
222
前言
android中滑动控件很多,相信大部分同学接触的都是...
分类:
移动开发 时间:
2014-07-19 08:20:09
阅读次数:
257
Android中实现view的更新有两组方法,一组是invalidate,另一组是postInvalidate,其中前者是在UI线
程自身中使用,而后者在非UI线程中使用。
Android提供了Invalidate方法实现界面刷新,但是Invalidate不能直接在线程中调用,因为他是违背了单
线程模型:Android UI操作并不是线程安全的,并且这些操作必须在UI线程中...
分类:
移动开发 时间:
2014-07-19 02:24:06
阅读次数:
188
先看效果图
这个是我们自己的apk点击之后的效果
下边是布局文件
activity_main.xml主布局文件
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="matc...
分类:
移动开发 时间:
2014-07-19 02:15:46
阅读次数:
280
package com.example.helloworld; import android.os.Bundle;import android.app.Activity;import android.content.Intent;import android.view.Menu;import and...
分类:
移动开发 时间:
2014-07-19 00:39:34
阅读次数:
207
Android开发的过程中,每次调用startService(Intent)的时候,都会调用该Service对象的onStartCommand(Intent,int,int)方法,然后在onStartCommand方法中做一些处理。然后我们注意到这个函数有一个int的返回值,这篇文章就是简单地讲讲i...
分类:
移动开发 时间:
2014-07-19 00:38:50
阅读次数:
218
先说说我的遇到的问题:1. 我在activity里写一个 fragment2.这个fragment里有个imageView ,用于显示图片。我使用 asyncTask获得图片,并准备在这个imageView 中显示该图片的缩略图,我准备使用ThumbnailUtils.extractThumbnai...
分类:
移动开发 时间:
2014-07-19 00:13:12
阅读次数:
234
主要是通过包名启动第三方应用,获取去包名的方法网上很多,就不多说了。
两种方式启动:
第一种:
Intent intent = new Intent();
intent.setClassName("要启动应用的包名", "要启动应用的activity");
startActivity(intent);
第二种:
Intent intent = new Intent();
int...
分类:
移动开发 时间:
2014-07-18 18:02:37
阅读次数:
217