找回密码
 立即注册
examplethe适配器这个 | android开发 2022-11-23 76 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
此demo一共有7个包,除去主界面的包,其他6个都有相对应的功能com.example.DBManager这个是对sqlite数据库操作的包,包括数据库的增修复查以及创建数据库和数据表。里边也用到了一个泛型与反射组合,可以从数据库查询任何已定义的类型的数据(具体见代码)com.example.MyCanvas这个包主要是用来制作图片的,将字符串制作成bitmapcom.example.MySimpleAdapter这个包是用来对自定义适配器的操作,现在适配器可以操作外面的(调用适配器界面的)控件。对适配器的改写暂时只能手动从头加载适配器。此适配器一共有四个控件,皆可以触发事情。com.example.Obj这个包仅仅为寄存数据对象的类的包,每个类都有对应的set和get方法,这个在反射的时候会用到。com.example.Photo这个包是用来调用系统拍照和选择相片的。也包括对图片的压缩com.example.WebService这个包是用来和服务器通信的,以xml格式保存json的字符创发送到服务器以上就是此demo的主要功能,部分功能是直接修复百度来的源码。在此感谢那些人的共享。

(This demo has 7 packages in total. Apart from the packages on the main interface, the other 6 packages have corresponding functions com.example DBManager is a package for sqlite database operations, including database updates and reviews, as well as creating databases and data tables. It also uses a generic and reflective combination. You can query data of any defined type from the database (see the code for details) com.example.MyCanvas. This package is mainly used to make pictures, making strings into bitmapcom.example The MySimpleAdapter package is used to operate the custom adapter. Now the adapter can operate the external (calling the adapter interface) controls. The adapter can only be manually loaded from the beginning. This adapter has four controls, all of which can trigger events. com.example. Obj is only a package of classes that store data objects. Each class has corresponding set and get methods, which are used in reflection. The package com.example.Photo is used to call the system to take photos and select photos. It also includes image compression com. example The WebService package is used to communicate with the server. Saving json characters in xml format and sending them to the server are the main functions of this demo. Some functions are to directly repair Baidu's source code. Thanks for sharing.)

[下载]11391404995.rar




上一篇:Android深入浅出课程思维导图
下一篇:老罗Android开发 (android常用UI编程) (1-33全)源码和PPT