DevStore首页 > DEV资源 > 源码下载 > 源码详情

各种view的上拉刷新下拉加载

 
xg145 | 2015-06-11 17:20    浏览量(4164)    评论(3)    收藏(21)
功能分类:工具 支持平台:Android 运行环境:Android
开发语言:Java 开发工具:Eclipse 源码大小:1.28MB
下载源码 572 人下载

源码简介

请将1个lib工程和2个ext工程全部导入,simple为使用试例,运行界面也在simple里 请运行这个工程你就能看到界面了

源码截图

  • 运行截图
  • 运行截图
  • 运行截图
  • 运行截图
DevStore所有源码来自用户上传分享,版权问题及牵扯到商业纠纷均与DevStore无关。

源码片段

/*******************************************************************************
 * Copyright 2011, 2012 Chris Banes.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.handmark.pulltorefresh.samples;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class LauncherActivity extends ListActivity {

	public static final String[] options = { "ListView", "ExpandableListView", "GridView", "WebView", "ScrollView",
			"Horizontal ScrollView", "ViewPager", "ListView Fragment", "WebView Advanced", "ListView in ViewPager" };

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setListAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, options));
	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		Intent intent;

		switch (position) {
			default:
			case 0:
				intent = new Intent(this, PullToRefreshListActivity.class);
				break;
			case 1:
				intent = new Intent(this, PullToRefreshExpandableListActivity.class);
				break;
			case 2:
				intent = new Intent(this, PullToRefreshGridActivity.class);
				break;
			case 3:
				intent = new Intent(this, PullToRefreshWebViewActivity.class);
				break;
			case 4:
				intent = new Intent(this, PullToRefreshScrollViewActivity.class);
				break;
			case 5:
				intent = new Intent(this, PullToRefreshHorizontalScrollViewActivity.class);
				break;
			case 6:
				intent = new Intent(this, PullToRefreshViewPagerActivity.class);
				break;
			case 7:
				intent = new Intent(this, PullToRefreshListFragmentActivity.class);
				break;
			case 8:
				intent = new Intent(this, PullToRefreshWebView2Activity.class);
				break;
			case 9:
				intent = new Intent(this, PullToRefreshListInViewPagerActivity.class);
				break;
		}

		startActivity(intent);
	}

}
  •   赞(2) 赞 +1 赞(2) 已赞
  •   收藏(21) 收藏 +1 已收藏 取消
  •   下载(572)
评论(3)
烛九阴

烛九阴 2016-07-08 15:37:24

真心感谢楼主
回复(0) 赞(0) 赞(1)
lewhonly

lewhonly 2015-10-16 16:20:24

八错 下载了
回复(0) 赞(0) 赞(1)
yy991852

yy991852 2015-08-04 16:42:12

好东西 先收藏了
回复(0) 赞(0) 赞(1)
  • 推荐
  • 审核
  • 收录
  • 获取活力值

源码上传作者

  • 8 能力值
  • 4 源码
  • 0 评测
  • 0 资料

热门源码