上一页 1 ··· 9 10 11 12 13
摘要: Android Intent 大全 android 中intent是经常要用到的。不管是页面牵转,还是传递数据,或是调用外部程序,系统功能都要用到intent。 ★intent大全: 1.从google搜索内容 Intent intent = new Intent(); intent.setAction(Intent.ACTION_WEB_SEARCH); intent.putExtra(SearchManager.QUERY,"searchString") startActivity(intent); 2.浏览网页 Uri uri = Uri.parse("ht 阅读全文
posted @ 2011-11-04 12:28 纯洁的坏蛋 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 1. Uri uri = Uri.parse("http://www.google.com"); 2. Intent it = new Intent(Intent.ACTION_VIEW,uri); 3. startActivity(it);显示地图: 1. Uri uri = Uri.parse("geo:38.899533,-77.036476"); 2. Intent it = new Intent(Intent.Action_VIEW,uri); 3. startActivity(it);路径规划: 1. Uri uri = Uri.parse( 阅读全文
posted @ 2011-11-04 09:49 纯洁的坏蛋 阅读(611) 评论(0) 推荐(0) 编辑
摘要: 第一句:AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);這個context如果是在Activity/Service中,換成”类名.this“就可以了。第二句,调低音量:audioManager.adjustStreamVolume(stream, AudioManager.ADJUST_LOWER, 0);第三句,调高音量:audioManager.adjustStreamVolume(stream, AudioManager.ADJUST_RAISE, 0); 阅读全文
posted @ 2011-10-30 21:11 纯洁的坏蛋 阅读(284) 评论(0) 推荐(0) 编辑
摘要: Android应用程序在使用很多功能的时候必须在Mainifest.xml中声明所需的权限,否则无法运行。Android中为应用程序准备了很多可选权限,下面是Android应用程序权限清单:android.permission.ACCESS_CHECKIN_PROPERTIES :Allows read/write access to the “properties” table in the checkin database, to change values that get uploaded.允许以read/write访问检入数据库(checkin database?)的”propert 阅读全文
posted @ 2011-10-18 21:51 纯洁的坏蛋 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1.从google搜索内容Intent intent = new Intent();intent.setAction(Intent.ACTION_WEB_SEARCH);intent.putExtra(SearchManager.QUERY,"searchString")startActivity(intent);2.浏览网页Uri uri = Uri.parse("http://www.google.com");Intent it = new Intent(Intent.ACTION_VIEW,uri);startActivity(it);3.显示地图 阅读全文
posted @ 2011-10-18 21:50 纯洁的坏蛋 阅读(227) 评论(0) 推荐(0) 编辑
摘要: Questionandroid数据操作之一就是SqLite,如何对SqLite的select,insertSolutionUserColumns1packagecom.study;23importandroid.provider.BaseColumns;45publicclassUserColumnsimplementsBaseColumns{6publicstaticfinalStringuserName="USERNAME";78publicstaticfinalStringuserPassword="USERPASSWORD";9}DBHelpte 阅读全文
posted @ 2011-10-15 21:29 纯洁的坏蛋 阅读(2096) 评论(0) 推荐(0) 编辑
摘要: 在很多情况下,调用startActivity(Intent) 方法,跳转到另外一个Activity或其他component,需要传递一个对象给它。可以让这个要传递的对象所属类实现Serializable或者Parcelable接口。然后利用onCreate函数中的Bundle参数作为载体,传递这个对象。在新的组件中再获得即可。例如:@Overridepublic void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); listView 阅读全文
posted @ 2011-10-15 21:10 纯洁的坏蛋 阅读(901) 评论(0) 推荐(0) 编辑
摘要: Activities提供了一种方便管理的创建、保存、回复的对话框机制,例如onCreateDialog(int), onPrepareDialog(int, Dialog), showDialog(int), dismissDialog(int)等方法,如果使用这些方法的话,Activity将通过getOwnerActivity()方法返回该Activity管理的对话框(dialog). onCreateDialog(int):当你使用这个回调函数时,Android系统会有效的设置这个Activity为每个对话框的所有者,从而自动管理每个对话框的状态并挂靠到Activity上。这样,每个对话. 阅读全文
posted @ 2011-08-23 21:42 纯洁的坏蛋 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 对话框是Android中不可或缺的,在使用对话框的时候,需要使用AlertDialog.Builder类。当然处理系统默认的对话框外,还可以自定义对话框,如果对话框设置了按钮,那么要对其进行事件监听OnClickListener。下面的是一个用AlertDialog.Builder类和自定义的对话框的实例,当点击确定时,转移到登陆对话框,当输入用户名和密码后,转移到登陆进度对话框这里的自定义对话框是由两个TextView和两个EditText组成,也就是那个登录对话框,自定义对话框的布局文件是dialog.xml文件,见下面另外呢,使用AlertDialog来创建对话框,需要了解一下几个方法s 阅读全文
posted @ 2011-08-23 18:28 纯洁的坏蛋 阅读(922) 评论(0) 推荐(0) 编辑
摘要: 今天开通android博客 该认真学习了 大家都支持我啊!!!!哈哈哈 阅读全文
posted @ 2011-08-23 18:06 纯洁的坏蛋 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13