listView自定义footerView

网上找了许多自定义footerView相关的,但是没找到自己想要的,感觉推酷做的很不错,但是这样的没找到开源的T_T

但是我做了一个简单的demo

无非就是三大点:
1.列表——获取列表,添加数据适配器
2.数据适配器——列表项的数据提供者。为每一个列表项设置数据
3.数据——列表项数据的封装(bean)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
    android:id="@+id/linearLayout_dialog_view"   
    android:orientation="vertical"  
    android:layout_width="fill_parent"   
    android:layout_height="fill_parent"  
    android:gravity="center_horizontal"  
    android:background="@color/white">  


  <ProgressBar
      android:id="@+id/imgView_listbottom_loading"
      style="@style/style_progressbar"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@drawable/loading"
      android:indeterminateDuration="600" />//转速

    <TextView   
        android:id="@+id/textView_listbottom"  
        android:layout_width="wrap_content"   
        android:layout_height="wrap_content"  
        android:layout_marginLeft="10dp"  
        android:text="数据加载中……" />  
        
</LinearLayout>
<style name="style_progressbar">
        <item name="android:indeterminateDrawable">@drawable/rotate_progressbar</item>
          <item name="android:minWidth">60dip</item>
          <item name="android:maxWidth">60dip</item>
         <item name="android:minHeight">60dip</item>
         <item name="android:maxHeight">60dip</item>
    </style>
这style加在res目录下的values下

在drawable目录下,新建rotate_progressbar.xml

<rotate xmlns:android="http://schemas.android.com/apk/res/android" 
    android:drawable="@drawable/progressbar3"           //自取的图片
    android:fromDegrees="0"
    android:toDegrees="360"
    android:pivotX="50%"
    android:pivotY="50%">
</rotate>
自定义Progressbar有三种方式实现:动画,自定义颜色,图片。本文是以图片的方式实现




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值