-
CH06
Android sdk开发范例大全(第二版)第6章节
- 2013-08-02 11:12:28下载
- 积分:1
-
android相册系统(Matrix实现)
JavaApk汒隴ㄩ :
1) 掛桴祥悵痐垀枑鼎璃麼最唗腔俇淕俶睿假俶﹝
2) 蛌婥掛桴枑鼎腔訧埭昦刉壺掛佽隴恅璃﹝
3) 掛桴埭鎢峈厙奻刲摩麼厙衭枑鼎ㄛ彆扡摯麼漲善蠟腔唳ㄛ蕾撈籵眭扂蠅﹝
4) 掛桴枑鼎轎煤測鎢硐褫鼎旃噶悝炾妏蚚ㄛ昦蚚衾妀珛蚚芴蚕森竘珨綴彆迵掛桴拸壽﹝
5) 妀珛埭鎢婓埭鎢忨毓峓囀輛俴妏蚚ㄐ
- 2022-03-01 03:07:26下载
- 积分:1
-
pedometer
开源Android项目计步器源码,打开软件后,手握手机,可根据你走路时胳膊摆的次数准确测试出你走了多少步,有意思吧,而且这个项目的源码是开源的,分iPhone版和Android版,此为android版的pedometer源代码,有条件的可重新编译运行一下。(Open-source Android project pedometer source, open the software, hand phone, according to the swing arm when you walk out the number of accurately test how many steps you take, it is interesting, and this project' s source code is open source, and the iPhone version of Android version, this version of the pedometer for android source code, conditions can be recompiled to run it.)
- 2013-06-06 16:07:19下载
- 积分:1
-
android activity 切换效果例子
android activity 切换效果例子
- 2015-06-17下载
- 积分:1
-
android wifi信息扫描和rssi值检测 实例源码下载
android wifi信息扫描和rssi值检测 实例源码下载
- 2014-08-26下载
- 积分:1
-
android 开发mp4 浏览 播放 例子源码
[实例简介]开发mp4 [实例截图] [核心代码]package com.example.mp4;import java.io.File;import java.util.Vector;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.KeyEvent;import android.view.View;import android.view.View.OnClickListener;import android.view.ViewGroup;import android.widget.AdapterView;import android.widget.AdapterView.OnItemClickListener;import android.widget.BaseAdapter;import android.widget.Button;import android.widget.EditText;import android.widget.ImageView;import android.widget.ListView;import android.widget.TextView;import android.widget.Toast;public class MyFileActivity extends Activity { private final String[] FILE_MapTable = { ".3gp", ".mov", ".avi", ".rmvb", ".wmv", ".mp3", ".mp4" }; private Vector items = null;// 存放显示的名称 private Vector paths = null;// 存放文件路径 private Vector sizes = null;// 存放文件大小 private String rootPath = "/mnt/sdcard";// 起始文件夹 private EditText pathEditText;// 路径 private Button queryButton;// 查询按钮 private ListView fileListView;// 文件列表 @Override protected void onCreate(Bundle icicle) { // TODO Auto-generated method stub super.onCreate(icicle); setContentView(R.layout.myfile); this.setTitle("多媒体文件浏览"); pathEditText = (EditText) findViewById(R.id.path_edit); queryButton = (Button) findViewById(R.id.qry_button); fileListView = (ListView) findViewById(R.id.file_listview); // 单击按钮事件 queryButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub File file = new File(pathEditText.getText().toString()); if (file.exists()) { if (file.isFile()) { // 如果是媒体文件直接打开 openFile(pathEditText.getText().toString()); } else { // 打开目录下的文件 getFileDir(pathEditText.getText().toString()); } } else { Toast.makeText(MyFileActivity.this, "找不到位置,请确定位置是否正确!", Toast.LENGTH_SHORT).show(); } } }); //设置listitem中的文件被单击时要做的动作 fileListView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView arg0, View arg1, int position, long arg3) { // TODO Auto-generated method stub fileOrDir(paths.get(position)); } }); //打开默认文件夹 getFileDir(rootPath); } //重写返回键功能是否为back public boolean onKeyDown(int keyCode,KeyEvent event){ //判断触发键是否为back键 if(keyCode == KeyEvent.KEYCODE_BACK){ pathEditText = (EditText)findViewById(R.id.path_edit); File file = new File(pathEditText.getText().toString()); if(rootPath.equals(pathEditText.getText().toString().trim())){ return super.onKeyDown(keyCode, event); }else{ getFileDir(file.getParent()); return true; } }else{ return super.onKeyDown(keyCode, event); } } //处理文件或目录的方法 private void fileOrDir(String path){ File file = new File(path); if(file.isDirectory()){ getFileDir(file.getPath()); }else{ openFile(path); } }//获取文件结构的方法 private void getFileDir(String filePath) { // TODO Auto-generated method stub pathEditText.setText(filePath); items = new Vector(); paths = new Vector(); sizes = new Vector(); File f = new File(filePath); File[] files = f.listFiles(); if (files != null) { /* 将所有文件添加到ArrayList中 */ for (int i = 0; i < files.length; i ) { if (files[i].isDirectory()) { items.add(files[i].getName()); paths.add(files[i].getPath()); sizes.add(""); } } for (int i = 0; i < files.length; i ) { if (files[i].isFile()) { String fileName = files[i].getName(); int index = fileName.lastIndexOf("."); if (index > 0) { String endName = fileName.substring(index, fileName.length()).toLowerCase(); String type = null; for(int x=0;i< FILE_MapTable.length;x ){ //符合预先定义的多媒体格式的文件才会在界面中显示 if(endName.equals(FILE_MapTable[x])){ type = FILE_MapTable[x]; break; } } if(type !=null){ items.add(files[i].getName()); paths.add(files[i].getPath()); sizes.add(files[i].length() ""); } } } } } fileListView.setAdapter(new FileListAdapter(this,items)); } private void openFile(String path) { // TODO Auto-generated method stub Intent intent = new Intent(MyFileActivity.this,MediaPlayerActivity.class); intent.putExtra("path", path); startActivity(intent); finish(); } //列表适配器 class FileListAdapter extends BaseAdapter{ private Vector items =null;//存放显示的名称 private MyFileActivity myFile; public FileListAdapter(MyFileActivity myFile,Vector items){ this.items = items; this.myFile = myFile; } @Override public int getCount() { // TODO Auto-generated method stub return items.size(); } @Override public Object getItem(int position) { // TODO Auto-generated method stub return items.elementAt(position); } @Override public long getItemId(int position) { // TODO Auto-generated method stub return items.size(); } @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub if(convertView==null){ //加载列表布局文件 convertView = myFile.getLayoutInflater().inflate(R.layout.file_item, null); } //文件名称 TextView name = (TextView)convertView.findViewById(R.id.name); //媒体文件类型 ImageView music = (ImageView)convertView.findViewById(R.id.music); //文件夹类型 ImageView folder = (ImageView)convertView.findViewById(R.id.folder); name.setText(items.elementAt(position)); if(sizes.elementAt(position).equals("")){ //隐藏媒体文件图标,显示文件夹图标 music.setVisibility(View.GONE); folder.setVisibility(View.VISIBLE); }else{ music.setVisibility(View.VISIBLE); folder.setVisibility(View.GONE); } return convertView; } }}
- 2015-04-10下载
- 积分:1
-
带你走向rxjava_retrofit3.0_okhttp的世界
重所周知 当下最流行的网络请求的框架非rxjava+retrofit+okhttp3三合一了 但是在网络上总是找不到一个比较全面的介绍 于是乎我自己研究了一套网络请求的发开框架 目前已经写入我开发的项目当中 目前还在学习的小伙伴们可以学习一下
- 2022-03-22 11:43:19下载
- 积分:1
-
aidl 体现跨进程通信实例源码下载(aidlserver/aidlclient)
aidl(Android Interface Definition Language)进程通信
- 2014-12-22下载
- 积分:1
-
Plane_war_game
基于android的飞机大战游戏,不过不能触屏控制,只能通过DAPD板控制上下左右,对初学者有用(Plane war game based on android, but can t touch screen control, only through DAPD board to control the up and down or so, useful for beginners)
- 2013-12-07 21:49:44下载
- 积分:1
-
安卓手机上的饼状图
在安卓屏幕上画数据统计的饼状图,不同颜色代表不同区域,数据详尽显示在界面右侧,可以自适应屏幕不同尺寸和分辨率。
- 2022-07-26 16:39:03下载
- 积分:1