<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pull_to_refresh_header"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F3F3F3">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="23dp">
<LinearLayout
android:id="@+id/pull_to_refresh_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_centerHorizontal="true">
<TextView
android:id="@+id/pull_to_refresh_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/pull_to_refresh_text"
android:textColor="#777777"
android:textSize="16sp"/>
<TextView
android:id="@+id/pull_to_refresh_update_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/pull_to_refresh_update_text"
android:textColor="#999999"
android:textSize="14sp"/>
</LinearLayout>
<ProgressBar
android:id="@+id/pull_to_refresh_progress"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_toLeftOf="@id/pull_to_refresh_view"
android:layout_marginRight="22dp"
android:layout_marginTop="5dp"
android:indeterminate="true"
android:indeterminateDrawable="@drawable/ic_loading_refresh"
android:visibility="gone"/>
<ImageView
android:id="@+id/pull_to_refresh_image"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_toLeftOf="@id/pull_to_refresh_view"
android:layout_marginRight="20dp"
android:layout_marginTop="5dp"
android:src="@drawable/ic_refresh_down"
android:scaleType="centerInside"
android:contentDescription="@string/app_name"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="15dp"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@drawable/ic_loading" android:fromDegrees="0" android:toDegrees="360" android:pivotX="50%" android:pivotY="50%" />
private ImageView mPull_to_refresh_image;
private RotateAnimation mFlipAnimation;
...
mFlipAnimation = new RotateAnimation(0, -180, RotateAnimation.RELATIVE_TO_SELF, 0.5f,
RotateAnimation.RELATIVE_TO_SELF, 0.5f);
mFlipAnimation.setInterpolator(new LinearInterpolator());
mFlipAnimation.setDuration(250);
mFlipAnimation.setFillAfter(true);
...
mPull_to_refresh_image.startAnimation(mFlipAnimation);
public RotateAnimation(float fromDegrees, float toDegrees, int pivotXType, float pivotXValue, int pivotYType, float pivotYValue)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有