dom4j保存文件xml格式和读取XML文件内容,代码如下:
package com.qmjs.imut
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import org.apache.log4j.Logger;
impor...
分类:
其他好文 时间:
2014-05-23 01:45:47
阅读次数:
267
介绍一个list滑动时通过一个text提示Array首字母位置的应用
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file exce...
分类:
其他好文 时间:
2014-05-23 00:58:42
阅读次数:
326
介绍一个多选list
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with th...
分类:
其他好文 时间:
2014-05-23 00:52:57
阅读次数:
455
该Demo运行后,会显示所有你sd卡上的音乐文件列表, 并可以点击列表选择某一首歌曲进行播放。
运行效果:
源代码:
activity_audio_browser.xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schema...
分类:
移动开发 时间:
2014-05-23 00:34:40
阅读次数:
410
介绍在在title bar上显示indeterminate progress
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file ...
分类:
其他好文 时间:
2014-05-23 00:31:27
阅读次数:
352
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo...
分类:
其他好文 时间:
2014-05-23 00:30:50
阅读次数:
415
注意要点:
1)必须要在AndroidManifest.xml中添加发送短信权限
设置视图:setContentView(R.layout.布局xml文件);
2)查找控件:findViewById(R.id.控件id);
3)监听按钮事件:控件.setOnClickListener(this),实现OnClickListener接口
4)获取editText里的值:getTex();
...
分类:
移动开发 时间:
2014-05-22 22:39:56
阅读次数:
460
最近在googl play上发布apk要优化
这里用android sdk来优化...
分类:
移动开发 时间:
2014-05-22 18:50:40
阅读次数:
285
通过IP获取归属地
请输入ip地址:
//获取ip地址
//$ip = $_SERVER['REMOTE_ADDR']; //自动获取客户端的IP
//ip对应的地区
if(!empty($_POST['ip'])){
$ip = $_POST['ip'];
//接口地址,这样返回的是一个xml结果集,如图1;
$str = file_get_cont...
分类:
Web程序 时间:
2014-05-22 18:27:26
阅读次数:
354
import re
data = open('a.txt')
fh = open('b.txt', 'w')
"""Search the string begining with '【'"""
p = re.compile(r'\s*[\u3010]')
for each_d in data:
if re.match('\s*3\d{4}', each_d):
...
分类:
编程语言 时间:
2014-05-22 17:26:17
阅读次数:
293