-
android 读取天气信息源码下载,简洁天气仿墨迹天气
android 读取天气信息源码下载,简洁天气仿墨迹天气
- 2015-04-24下载
- 积分:1
-
高仿人人网android客户端主界面 示例源码下载
SlidingMenu https://github.com/jfeinstein10/SlidingMenu ActionBarSherlock https://github.com/JakeWharton/ActionBarSherlock
- 2013-10-23下载
- 积分:1
-
android人脸检测
【实例简介】
- 2021-08-21 00:30:59下载
- 积分:1
-
android 实现调用系统相机拍照,并且存到sd卡 实例 附完整源码
一个demo,实现调用系统相机拍照,将其显示在屏幕上,并且存到sd卡。 Android中实现拍照有两种方法,一种是调用系统自带的相机,然后使用其返回的照片数据。 还有一种是自己用Camera类和其他相关类实现相机功能,这种方法定制度比较高,洗染也比较复杂,一般平常的应用只需使用第一种即可。 用Intent启动相机的代码:Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);startActivityForResult(intent, 1); 拍完照后就可以在onActivityResult(int requestCode, int resultCode, Intent data)中获取到Bitmap对象了。Bitmap bitmap = (Bitmap) data.getExtras().get("data"); 要将图像存储到sd卡之前最好先检查一下sd卡是否可用 String sdStatus = Environment.getExternalStorageState(); if (!sdStatus.equals(Environment.MEDIA_MOUNTED)) { // 检测sd是否可用 Log.v("TestFile", "SD card is not avaiable/writeable right now."); return; } 以下代码可以实现将图像文件存到“sdcard/myImage/”文件夹下,名称为“111.jpg” File file = new File("/sdcard/myImage/"); file.mkdirs();// 创建文件夹 String fileName = "/sdcard/myImage/111.jpg"; try { b = new FileOutputStream(fileName); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, b);// 把数据写入文件 } catch (FileNotFoundException e) { e.printStackTrace(); } finally { try { b.flush(); b.close(); } catch (IOException e) { e.printStackTrace(); } } 另外要注意的是读写sd卡文件必须首先要在Mainifest.xml文件中配置权限: 一个demo,实现调用系统相机拍照,将其显示在屏幕上,并且存到sd卡。
- 2013-06-13下载
- 积分:1
-
android 百度定位实例
简单定位
- 2015-06-23下载
- 积分:1
-
android 记事本 例子源码下载(初级版本)
将数据写入文件了
- 2014-09-15下载
- 积分:1
-
android 异步 执行 任务 例子 附讲解
Rules::The AsyncTask instance must be created in UI thread. .execute must be invoked on the UI thread.Never call objMyTask.onPreExecute(), objMyTask.doInBackground(), objMyTask.onProgressUpdate(), objMyTask.onPostExecute manually.The AsyncTask can be executed only once (an exception will be thrown if a second execution is attempted.)AsyncTask have Four Main Method... onPreExecute() doInBackground() onProgressUpdate() onPostExecute() onPreExecute-This method is called first when you start AsyncTask using objAsync.execute().And mostly this method is use for initializing dialog(ProgressDialog,CustomDialog) and showing. doInBackground-The main purpose of AsyncTask is accomplished by this method.Any non-UI thread process is running in this method.Such as Rss Feed Reader,Image and video Uploading and Downloading.You cant handle your View in this method.Because this method is non-UI thread.While any background process is running if you want to handle UI therea are onProgressUpdate method. after completion of process this method send result to OnPostExecute. onProgressUpdate-While backgrounding task is running ,you can handle your UI using this method .Such as status of downloading or uploading task.and this method is called from doInBackground.Using publishProgress() you can call onProgressUpdate method to update UI while process is running. onPostExecute -This method is called after the background computation finishes.The result of background process in passed in this method as parameters.And now you can dismiss progress dialog ,to indicate that background task is completed. You can cancel AsyncTask using objAsyncTask.cancel().then you just check in doInBackground, if (isCancelled()) { break; } else { //continue... } See this Image For more Clear.
- 2013-07-05下载
- 积分:1
-
Android应用源码之android打电话源码.rar
【实例简介】
- 2021-09-07 00:31:14下载
- 积分:1
-
android 网络图片下载 示例源码
很好的下载图片的工具类,特别是结合listview一起用,废话不多说,直接上源码
- 2014-03-26下载
- 积分:1
-
App自动更新
App自动更新
- 2013-10-23下载
- 积分:1