随笔分类 - Android_Mars学习笔记
摘要:一、简介 1.在main.xml中用TabHost、TabWidget、FrameLayout标签作布局 2.在MainActivity中生成TabHost、TabSpec,调用setIndicator()、setContent()、addTab(),用Intent指明要跳转的tab对应的class
阅读全文
摘要:一、简介 1.在onListItemClick()中new Intent,Intent以存储序列化后的mp2Info对象作为参数,启动serivce 2.DownloadService在onStartCommand()中通过intent 获取mp3info,开启新线程,利用HttpDownloade
阅读全文
摘要:一、项目设计 二、歌曲列表简介 1.利用java.net.HttpURLConnection以流的形式下载xml文件为String 2.自定义ContentHandler--》Mp3ListContentHandler 3.利用自定义的ContentHandler和javax.xml.parsers
阅读全文
摘要:一、代码1.xml(1)activity_main.xml 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/t
阅读全文
摘要:一、代码 1.xml(1)activity_main.xml 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/
阅读全文
摘要:一、流程 1.编写service,重写onBind(Intent intent),返回自定义的Binder 2.自写义Binder,提供一个可访问的方法,以传递数据 3.点击界面按钮会开启service,过程为,通过Intent的setClass指定要开启的service,再通过bindServic
阅读全文
摘要:一、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:ori
阅读全文
摘要:一、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:ori
阅读全文
摘要:一、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:ori
阅读全文
摘要:一、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:ori
阅读全文
摘要:一、简介 二、代码1.xml(1)activity_main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
阅读全文
摘要:一、代码 1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:or
阅读全文
摘要:一、简介 一、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 androi
阅读全文
摘要:一、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:ori
阅读全文
摘要:一、代码1.xml(1)activity_main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 an
阅读全文
摘要:一、流程 1.自定义Handler,重写handleMessage(Message msg),用msg得到bundle,从而得到传递过来的数据 2.开启android.os.HandlerThread,获取looper,据此为参数new一个自定义的Handler 3.以new出来的自定义的Handl
阅读全文
摘要:一、流程 1.点击按钮,则代码会使handler把updateThread压到队列里去,从而执行updateThread的run() 2.run()里会通过msg.arg1 = i 和bundle来写参,通过执行updateBarHandler.sendMessage(msg)把消息压入消息队列,会
阅读全文
摘要:一、运行结果 一、代码1.xml(1)activity_main.xml 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.androi
阅读全文
摘要:一、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:ori
阅读全文
摘要:一、代码 1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:or
阅读全文

浙公网安备 33010602011771号