登录
首页 » Android » android画图板

android画图板

于 2022-06-13 发布 文件大小:263.90 kB
0 154
下载积分: 2 下载次数: 1

代码说明:

这是一个简单的android画图板,有画笔选颜色,画笔粗细,背景色调整等功能,适合初学者学习。 部分文件预览

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • pork
    在高斯白噪声信道下,采用qpsk调制的ofdm系统的源码,(In Gaussian white noise channel, the source code of ofdm system using qpsk modulation,)
    2019-03-27 19:31:57下载
    积分:1
  • IWeather
    天气预报+显示定位功能,很简洁,无任何广告与多余的东西,实习作品(Weather Forecast + Display Location Function)
    2019-06-14 13:48:12下载
    积分:1
  • android忍者跳游戏
    这是一款非常好玩且耐玩的游戏。游戏中你扮演一个忍者,去消灭敌人,冲向丛林的尽头!忍者突袭游戏中有:跳跃、飞镖、飞跃、加速等多种动作组合,使游戏具有了一定的难度。此外,还有丰富的成就系统满足你的成就控。
    2022-09-27 21:35:21下载
    积分:1
  • 时时获取android 手机陀螺仪数据,并保存数据。
    时时获取android 手机陀螺仪数据 ,并保存数据。
    2022-03-11 06:54:43下载
    积分:1
  • Android PathEffect 效果实例
    从一本书中得到的Android PathEffect 效果实例,不多说了,直接把关键代码帖出来吧,需要完整代码的可下载本源码,运行的效果请参见下边的截图所示,运行时,可看到多条像流水一样的路径曲线,下面是代码:   // 定义画板为白色   canvas.drawColor(Color.WHITE);   pe[0] = null;   // 此PathEffect为圆滑的弧形   pe[1] = new CornerPathEffect(10);   // 离散的线   // 第一个参数为离散在弧上的间距   // 第二个参数为离散的程度   pe[2] = new DiscretePathEffect(3, 10);   // Dash为破折号的意思。 应该是破这行   // 其中第一个参数是new float[]{} 表示其中的间隔和距离   // phase表示相位   pe[3] = new DashPathEffect(new float[] { 20, 5, 5, 20 }, phase);   //先建立一个Path 然后创建PathDashPathEffect对象 其中p为path   Path p = new Path();   p.addRect(0,0,8,8,Path.Direction.CW);   pe[4] = new PathDashPathEffect(p, 12, phase, PathDashPathEffect.Style.ROTATE);   //此方法表示两个组合的PathEffect   pe[5] = new ComposePathEffect(pe[2], pe[4]);   //结果和pe[5]类似   pe[6] = new SumPathEffect(pe[4], pe[3]);   // 开始画七条线   for (int i = 0; i < pe.length; i++) {   // 如果没有paint.setPathEffect(),那么系统默认为paint.setPathEffect(null);   paint.setPathEffect(pe[i]);   paint.setColor(colors[i]);   canvas.drawPath(path, paint);   //使画板平移
    2022-07-25 12:05:42下载
    积分:1
  • android 调用webservice(json),在listview上显示数据
    android 调用webservice(json),在listview上显示数据
    2014-08-26下载
    积分:1
  • android 一键锁屏实例源码下载
    android 一键锁屏实例源码下载
    2014-09-02下载
    积分: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
  • UARTTest
    一个例子关于 android 和串行端口之间的数据传输,它具有基于 android sdk UsbAccessory。
    2022-03-11 04:01:51下载
    积分:1
  • Android-API-
    android API chm文档,希望对大家有帮助。 里面邮箱系的说明,更主要的是他是中文版的哦(The Android API chm document, we want to help. Inside the mailbox Department, the main thing is that he is a Chinese version of Oh)
    2013-04-22 14:06:36下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载