- 博客(13)
- 收藏
- 关注
原创 版本更新demo
第一步:新建一个xml文件,用于定义下载过程中的ProgressBar的进度显示,名为progress.xml android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > a
2016-07-29 08:33:10 225
原创 android版本更新
第一步:新建一个xml文件,用于定义下载过程中的ProgressBar的进度显示,名为progress.xmlandroid:layout_width="fill_parent"android:layout_height="wrap_content" >android:id="@+id/progress"style="?android:attr/progressBarS
2016-07-27 16:10:51 204
原创 第三方登录and分享
1.解压SDK压缩包,将文件夹中的'main/libs'和'main/res'文件夹复制到你的项目工程根目录下(如使用'ADT 17'以下用户需要手动添加'libs'下的jar文件到工程Path中)2.其中增加一个activityactivity android:name="com.umeng.socialize.editorpage.ShareActivity"
2016-06-30 16:10:39 237
原创 刷新
public class MainActivity extends Activity implements IXListViewListener { String refresh = "http://ic.snssdk.com/2/article/v25/stream/?category=news_tech&count=20&min_behot_time=1465266200&b
2016-06-30 11:51:38 311
原创 xml解析+刷新
public class MainActivity extends ActionBarActivity implements IXListViewListener { String path = "http://www.oschina.net/action/api/news_list"; Handler handler = new Handler() {
2016-06-30 11:45:11 267
原创 布局混排适配器代码
public class MyBaseAdapter extends BaseAdapter { Context context; private List list; public MyBaseAdapter(Context context, List list) { this.context=context; thi
2016-06-30 10:30:58 163
原创 百度推送步骤
1.先在项目一文件夹中找到PushDemo 将文件中的MyPushMessageReceiver.Java和Utils.java文件粘贴到工程中。把包名修改为实际的包名类名2.将PushDemo 中的libs文件夹复制到工程根目录下3.在Application或者Application的子类中 初始化数据 并在onCreate()方法中调用此方法public cla
2016-06-28 20:57:31 332
原创 横向滑动菜单
android:layout_width="match_parent" android:layout_height="50dp" android:orientation="horizontal"> android:id="@+id/nav_HorizontalScrollView" an
2016-06-27 08:35:50 368
原创 pull解析
// 得到Xml解析器(pull方式) XmlPullParser pullParser = Xml.newPullParser(); try { // 设置要解析的xml文件到解析器里 pullParser.setInput(getAssets().open("data.xml"), "utf-8");
2016-06-13 09:18:16 199
原创 HttpURLConnection请求数据
private void geData() { // 设置接口地址 try { URL url = new URL(path); HttpURLConnection connection = (HttpURLConnection) url .
2016-06-13 08:35:08 274
原创 网络请求数据
public class NetWorkUtils { public static String getStr(String path){ HttpClient http=new DefaultHttpClient(); HttpGet get=new HttpGet(path); try {
2016-05-31 12:14:45 180
原创 ViewPager自动轮播
// ViewPager布局 android:id="@+id/relat" android:layout_width="match_parent" android:layout_height="200dp" > android:id="@+id/vp"
2016-05-30 12:01:54 175
原创 二级列表展示网络请求到的数据
public class MainActivity extends Activity { String key = "99e383f9a3e57517fb763732ce221be0"; // String key = "d1633613bc9232311b2c663e721f8a66"; String path = "http://japi.juhe.cn/co
2016-05-26 21:48:54 646
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人