摘要: 在CSDN进行搬家,将在那里进行继续更新~~~ 阅读全文
posted @ 2012-11-13 16:29 Tammie-锴 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 小鸟 在学习的过程中使用了各种的方法,基本可以成功的,在listview的基础上,ExpandableListView没什么难度但是在使用自定义的Adapter的时候 有些变化了数据的设置时候 ExpandableListView elv = (ExpandableListView) findViewById(R.id.elv); // List<maindata> listc=new ArrayList<maindata>(); List<Map<String, String>> maps = new ArrayLis... 阅读全文
posted @ 2012-10-23 17:06 Tammie-锴 阅读(1081) 评论(0) 推荐(0) 编辑
摘要: 手机屏幕太小,经常会用到半透明的效果以增加可视范围,给大家分享以下半透明实现方式!下面是自定义Activity半透明的效果例子:res/values/styles.xml<resources> <style name="Transparent "> <item name="android:windowBackground">@color/transparent_background</item> <item name="android:windowNoTitle">true& 阅读全文
posted @ 2012-10-22 09:47 Tammie-锴 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 一.导入导出excel常用方法:1.用查询表的方式查询并show在数据集控件上。代码public static string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source =C:\\08.xls;Extended Properties=Excel 8.0"; public static DataSet ds; protected void Page_Load(object sender, EventArgs e) { OleDbConnection conn = new O... 阅读全文
posted @ 2012-09-11 13:51 Tammie-锴 阅读(593) 评论(0) 推荐(0) 编辑
摘要: 下面主要介绍这三个类: 一、NotificationManager 这个类是这三个类中最简单的。主要负责将Notification在状态显示出来和取消。主要包括5个函数:void cancel(int id),void cancel(String tag, int id),void cancelAll(),void notify(int id, Notification notification),notify(String tag, int id, Notification notification) 看看这五个函数就知道这个类的作用了。但是在初始化对象的时候要注意: Notificatio 阅读全文
posted @ 2012-08-25 11:35 Tammie-锴 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 前言今天看了pro android 3中menu这一章,对Android的整个menu体系有了进一步的了解,故整理下笔记与大家分享。PS:强烈推荐《Pro Android 3》,是我至今为止看到的最好的一本android书,中文版出到《精通Android 2》。理解Android的菜单菜单是许多应用程序不可或缺的一部分,Android中更是如此,所有搭载Android系统的手机甚至都要有一个"Menu"键,由此可见菜单在Android程序中的特殊性。Android SDK提供的菜单有如下几种:选项菜单:最常规的菜单,android中把它叫做option menu子菜单:an 阅读全文
posted @ 2012-08-24 10:01 Tammie-锴 阅读(635) 评论(0) 推荐(0) 编辑
摘要: xml文件通过程序进行新建、载入、读取等处理的方式。这里使用的代码都是魏祝林老师的,我只是拿来学习分析的,不是原创的。先来看看xml的新建步骤: private void createXmlFile(){ File linceseFile = new File(BOOKS_PATH); //一个瓶子,指定路径 linceseFile.createNewFile(); //放好瓶子 FileOutputStream fileos= new FileOutputStream(linceseFile); //插好导管 XmlSeri... 阅读全文
posted @ 2012-08-20 11:44 Tammie-锴 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 这两个方法是用来序列化数据的,主要是用在不同的Activity之间在通过intent进行通信的时候,数据传输时,Data部分的传输。以前没注意过这个,都是直接用putData的,例如:Intent it=new Intent();Bundle bd=new Bundle();bd.putInt("aa",20);bd.putString("bb",ok);it.setExtras(bd);it.setClass(Activity1.this.class,Activity2.this.class)startActivity(it,Activity2.thi 阅读全文
posted @ 2012-08-16 15:44 Tammie-锴 阅读(560) 评论(0) 推荐(0) 编辑
摘要: 这是看到了Android_Tutor的博客中的内容,就贴过来自己学习下了public String getLocalIpAddress() { try { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration<InetAddress> enum... 阅读全文
posted @ 2012-08-15 16:54 Tammie-锴 阅读(2022) 评论(0) 推荐(0) 编辑
摘要: PopUpWindow在显示的时候有点像是个widget,是一个独立的程序块。或者说是像个AlertDialog但是注意了:popupWindow是一个阻塞式的弹出框,这就意味着在我们退出这个弹出框之前,程序会一直等待。 AlertDialog是非阻塞式弹出框,AlertDialog弹出的时候,后台可是还可以做其他事情的哦。主要的工作步骤: 1加载popupWindow的布局文件,这和widget的方法差不多。 1)先顶一个画布contentView 2)popupWindow布局view加载到contentVew中 2 .setFocusable(true)很重要,是p... 阅读全文
posted @ 2012-08-15 16:36 Tammie-锴 阅读(346) 评论(0) 推荐(0) 编辑