- 博客(17)
- 资源 (1)
- 收藏
- 关注
原创 输入流转为字符串
package com.fan.listview_show.utils;import java.io.ByteArrayOutputStream;import java.io.InputStream;public class StreamUtils { public static String streamUtils(InputStream inputSt
2016-06-01 19:30:41
645
原创 百度地图定位
manifest里面需要配置: android:name="com.baidu.location.f" android:enabled="true" android:process=":re
2016-06-01 14:57:25
233
原创 点击按两次返回键退出
// 定义一个变量,来标识是否退出 // 实现两次点击退出 private static boolean isExit = false; private static final String TAG = MainActivity.class.getSimpleName(); private static Handler mHandler = new Han
2016-05-31 20:09:17
425
原创 给图片设置小圆点
package com.example.mypic;import java.util.ArrayList;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.support.v4.view.ViewPager;import andr
2016-05-20 21:00:06
703
原创 用pull解析XML
try { // 获取factory XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); // 获取 parser XmlPullParser parser = factory.newPullParser();
2016-05-15 20:50:38
224
原创 用Xstream解析XML
url="http://www.oschina.net/action/api/news_list";public class MyNews implements Serializable{ private String id; private String title; private String body; private String co
2016-05-15 20:42:48
340
原创 AsyncTask异步交互
package com.example.picdemo;import java.io.InputStream;import java.net.URL;import org.apache.http.HttpResponse;import org.apache.http.client.HttpClient;import org.apache.http.client.meth
2016-05-13 19:58:51
196
原创 httpclient网络请求数据
package com.example.android_login;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.UnsupportedEncodingException;import java.net.URL
2016-05-13 19:56:09
359
原创 httpUrlConnection请求数据
package com.example.android_login;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.io.UnsupportedEncodingE
2016-05-13 19:55:03
378
原创 圆的放大和缩小
package com.lisen.view;import android.annotation.SuppressLint;import android.content.Context;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;im
2016-05-13 19:51:29
1016
原创 侧滑菜单
package com.example.cehua;import java.util.ArrayList;import java.util.List;import android.app.Activity;import android.os.Bundle;import android.widget.ArrayAdapter;import android.widget
2016-05-13 19:48:05
162
原创 画圆
package com.example.day01_1_view.view;import android.content.Context;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.graphics.Pain
2016-05-10 07:49:33
276
原创 解析XML
private List anlayzeXml() { // try { // 获取一个文件流 InputStream inputStream = getAssets().open("data.xml"); // 准备解析 获取解析器 XmlPullParse
2016-04-05 20:08:02
210
原创 给ImageView设置标记,实现加载图片
public class Fragment2 extends Fragment { private View view; private ListView listView; private int positon; private String path; Handler handler = new Handler() { @S
2016-04-05 11:18:21
2232
原创 DBUtils的使用
public class MainActivity extends Activity { private static final String TAG = "MainActivity"; private DbUtils dbUtils; @Override protected void onCreate(Bundle savedInstanceSt
2016-04-05 11:07:32
364
原创 分页加载
listView.setOnScrollListener(new OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { switch (scrollState)
2016-04-05 11:04:25
216
转载 根据关键字查找
bt_serarch.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { String key = et_serach.getText().toSt
2016-04-05 10:07:26
401
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人