这护门神兽叫什么?那哪位大神知道道?

找一本小说,男主是白色狐狸,上古神兽,女主穿越,东玄女强,书迷叫男主白大神,女主好像叫什么九儿,去_百度知道
找一本小说,男主是白色狐狸,上古神兽,女主穿越,东玄女强,书迷叫男主白大神,女主好像叫什么九儿,去
找一本小说,男主是白色狐狸,上古神兽,女主穿越,东玄女强,书迷叫男主白大神,女主好像叫什么九儿,去珐害粹轿诔计达袭惮陋年追的连载,现在应该差不多快完结了,也有可能完结了,宠文,女主十二三岁,男主修炼几千年了,开始的时候男主只是把女主当小孩子
噬血冥殇作者:孤蟹
类型:仙侠
状态:新书上传苍穹大珐害粹轿诔计达袭惮陋陆强者为尊,成王败寇。冷傲杀手因至爱背叛而穿越,灭门之仇、他人那充满着嘲讽的眼神,使他那颗孤傲的心逐渐冰封。  一个名为冥殇的冷漠少年,一只时而白时而红的小狐狸,一股神秘的血白色真气
来自团队:
其他类似问题
为您推荐:
其他1条回答
……(ง •̀_•́)ง
我是找一本小说
我要是找得到就不在这问了
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁& ListView分页加载数据
ListView分页加载数据
对于ListView分页加载数据,是正常情况下是非常有必要。一般对于少量的数据一次性把全部数据加载到ListView中显示,对于数据量多比较大,特别在资源有限的手机设备中更有重要,由用户去点击加载想要数据更为合适。在一些博客上看到关于ListView分页加载,但不太全面,实用性不高,因此我模拟正常情况下ListView分页加载,对于有方面帮助的朋友肯定有用,由于本人技术有限,可能存在些问题,欢迎指正,谢谢!
先看效果吧,
2. java代码:MainActivity.java
* ListView分页加载数据
* @author zhangkai281
public class MainActivity extends Activity {
private ListView listV
private List&Map&String,Object&&
private listViewA
//分页加载的数据的数量
private int pageSize=10;
private final int pageType=1;
//查看更多
private TextView moreTextV
//正在加载进度条
private LinearLayout loadProgressB
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list_page);
listView=(ListView)findViewById(R.id.lv_id);
//第一个参数:1起始数
第二个参数:显示的数目
data=InitValue.initValue(1,15);
//在ListView中添加"加载更多"
addPageMore();
//添加"加载更多"一定要在设置Adapter之前
adapter=new listViewAdapter();
listView.setAdapter(adapter);
private class listViewAdapter extends BaseAdapter{
int count=data.size();
public int getCount() {
public Object getItem(int position) {
public long getItemId(int position) {
public View getView(int position, View convertView, ViewGroup parent) {
View view=LayoutInflater.from(MainActivity.this).inflate(R.layout.list_page_item, null);
TextView title=(TextView)view.findViewById(R.id.tv_id);
TextView text=(TextView)view.findViewById(R.id.title_id);
title.setText(data.get(position).get("title").toString());
text.setText(data.get(position).get("text").toString());
* 加载下一页的数据
* @param pageStart
* @param pageSize
private void chageListView(int pageStart,int pageSize){
List&Map&String,Object&& data=InitValue.initValue(pageStart,pageSize);
for (Map&String, Object& map : data) {
this.data.add(map);
* 在ListView中添加"加载更多"
private void addPageMore(){
View view=LayoutInflater.from(this).inflate(R.layout.list_page_load, null);
moreTextView=(TextView)view.findViewById(R.id.more_id);
loadProgressBar=(LinearLayout)view.findViewById(R.id.load_id);
moreTextView.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
//隐藏"加载更多"
moreTextView.setVisibility(View.GONE);
//显示进度条
loadProgressBar.setVisibility(View.VISIBLE);
new Thread(new Runnable() {
public void run() {
//休眠3秒,用于模拟网络操作时间
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
//加载模拟数据:下一页数据, 在正常情况下,上面的休眠是不需要,直接使用下面这句代码加载相关数据
chageListView(data.size(),pageSize);
Message mes=handler.obtainMessage(pageType);
handler.sendMessage(mes);
}).start();
listView.addFooterView(view);
private Handler handler=new Handler(){
public void handleMessage(Message msg) {
switch (msg.what) {
case pageType:
//改变适配器的数目
adapter.count += pageS
//通知适配器,发现改变操作
adapter.notifyDataSetChanged();
//再次显示"加载更多"
moreTextView.setVisibility(View.VISIBLE);
//再次隐藏“进度条”
loadProgressBar.setVisibility(View.GONE);
super.handleMessage(msg);
模拟数据,通常是通过网络取得服务器的数据,显示出来,得向服务传递参数包括分页相关,当时启起行数,每页显示多行数据。也可以加载本地的SQLite库中的数据。加载网络的比较比吧,以下只是模拟数据:
public class InitValue {
public static int page=1;
* 模拟数据分页加载,
* @param pageStart
* @param pageSize
每页显示数目
public static List&Map&String,Object&& initValue(int pageStart,int pageSize){
Map&String,Object&
List&Map&String,Object&& list=new ArrayList&Map&String,Object&&();
for(int i=0;i&pageSi++){
map=new HashMap&String,Object&();
map.put("text", "zhangkai281发表文章");
map.put("title", page+"_ListView分页显示");
list.add(map);
4. 布局文件:main.xml:
&?xml version="1.0" encoding="utf-8"?&
&ScrollView android:layout_width="fill_parent" xmlns:android="/apk/res/android"
android:layout_height="wrap_content" android:scrollbars="vertical"&
&LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"&
&TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="@string/app_name" /&
&ViewFlipper android:id="@+id/vf_id" android:layout_width="fill_parent"
android:layout_height="wrap_content" /&
&/LinearLayout&
&/ScrollView&
5. 布局文件:list_page.xml:
&?xml version="1.0" encoding="utf-8"?&
&LinearLayout xmlns:android="/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"&
&ListView android:id="@+id/lv_id" android:layout_width="fill_parent"
android:layout_height="wrap_content"/&
&/LinearLayout&
6. 布局文件:list_page_load.xml
&?xml version="1.0" encoding="utf-8"?&
&LinearLayout xmlns:android="/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:gravity="center_horizontal"
android:paddingTop="13dp" android:paddingBottom="13dp"&
&TextView android:id="@+id/more_id" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="查看更多..."
android:textSize="25dp" android:gravity="center_horizontal"/&
&LinearLayout android:id="@+id/load_id" android:orientation="horizontal"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"&
&ProgressBar android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /&
&TextView android:layout_width="wrap_content" android:layout_height="fill_parent"
android:gravity="center_vertical" android:layout_marginLeft="10dp"
android:text="正在加载..." android:textSize="20dp"/&
&/LinearLayout&
&/LinearLayout&
7. 还有此小xml加有列出,比较简单,此处省略,
希望此文章对朋友有所帮助,谢谢!
本文固定链接:
[上一篇][下一篇]
最新文章随机精彩热门排行
精彩内容获取超时,请稍候...
日志总数:3902 篇
评论总数:13481 评
标签数量:4473 个
链接总数:4 条
建站日期:
运行天数:1200 天今日: 2755|昨日: 5243|帖子: |会员: |欢迎新会员:
主题: 3711, 帖数: <span title="万
主题: 6063, 帖数: <span title="万
主题: 26, 帖数: 929
主题: 64, 帖数: 1673
主题: 1万, 帖数: <span title="万
主题: 9万, 帖数: <span title="3万
主题: 8万, 帖数: <span title="7万
主题: 3659, 帖数: 4万
主题: 7362, 帖数: 9万
主题: 33, 帖数: 414
主题: 3万, 帖数: <span title="3万
主题: <span title="万, 帖数: <span title="9万
主题: 13, 帖数: 1722
主题: 24, 帖数: 1671
主题: 3, 帖数: 685
主题: 12, 帖数: 2605
主题: <span title="万, 帖数: <span title="6万
主题: 4, 帖数: 1万
主题: 1645, 帖数: 4万
主题: <span title="万, 帖数: <span title="5万
主题: <span title="万, 帖数: <span title="83万
主题: <span title="万, 帖数: <span title="1万
主题: <span title="万, 帖数: <span title="8万
主题: 104, 帖数: 7593
主题: 3万, 帖数: <span title="8万
主题: 2869, 帖数: 6万
主题: 4万, 帖数: <span title="万
主题: 8万, 帖数: <span title="0万
主题: <span title="万, 帖数: <span title="5万
主题: 462, 帖数: 1万
主题: 2878, 帖数: 6万
主题: 4761, 帖数: 9万
主题: 2207, 帖数: 3万
主题: 9万, 帖数: <span title="5万
分区版主: ,
主题: 52, 帖数: 1331
主题: 166, 帖数: 5915
主题: 216, 帖数: 7011
主题: 625, 帖数: 1万
主题: 31, 帖数: 231
主题: 2451, 帖数: <span title="万
主题: 76, 帖数: 2958
主题: 58, 帖数: 562
主题: <span title="万, 帖数: <span title="4万
主题: 17, 帖数: 4270
主题: 189, 帖数: 1万
主题: 1031, 帖数: 3万
主题: 21, 帖数: 128
主题: 9765, 帖数: <span title="万
主题: 8690, 帖数: <span title="万
主题: 3408, 帖数: 9万
主题: 3万, 帖数: <span title="9万
主题: 2712, 帖数: 8万
主题: 8551, 帖数: <span title="万
主题: 1万, 帖数: <span title="万
主题: 1647, 帖数: <span title="0万
主题: 9007, 帖数: <span title="万
主题: 7317, 帖数: <span title="万
主题: 1万, 帖数: <span title="万
主题: 1万, 帖数: <span title="万
主题: 1万, 帖数: 4万
主题: 5498, 帖数: <span title="万
主题: 4559, 帖数: 2万
主题: 2475, 帖数: 1万
主题: 1万, 帖数: <span title="万
主题: 406, 帖数: 987
主题: 1901, 帖数: 4636
Powered by

我要回帖

更多关于 大神知道这是谁 的文章

 

随机推荐