61 lines
1.8 KiB
Java
61 lines
1.8 KiB
Java
package com.recyclelib;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Color;
|
|
import android.view.animation.LinearInterpolator;
|
|
import android.view.animation.RotateAnimation;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class LoadingMoreFootView extends LinearLayout {
|
|
private TextView a;
|
|
private RotateAnimation b;
|
|
private ImageView c;
|
|
private Context d;
|
|
|
|
public LoadingMoreFootView(Context context) {
|
|
super(context);
|
|
a(context);
|
|
}
|
|
|
|
private void a(Context context) {
|
|
this.d = context;
|
|
setGravity(17);
|
|
setOrientation(0);
|
|
setLayoutParams(new RecyclerView.LayoutParams(-1, -2));
|
|
this.c = new ImageView(context);
|
|
this.c.setVisibility(8);
|
|
addView(this.c);
|
|
this.c.setImageResource(R$drawable.ic_loading);
|
|
this.b = new RotateAnimation(0.0f, 720.0f, 1, 0.5f, 1, 0.5f);
|
|
this.b.setInterpolator(new LinearInterpolator());
|
|
this.b.setDuration(1200L);
|
|
this.b.setRepeatCount(-1);
|
|
this.b.setRepeatMode(1);
|
|
this.a = new TextView(context);
|
|
this.a.setText("--------------");
|
|
int a = (int) Utils.a(context, 20);
|
|
this.a.setPadding(a, a, a, a);
|
|
this.a.setTextSize(2, 14.0f);
|
|
this.a.setTextColor(Color.parseColor("#98A5B6"));
|
|
this.a.setGravity(17);
|
|
addView(this.a);
|
|
}
|
|
|
|
public void setNoMore(boolean z) {
|
|
this.c.clearAnimation();
|
|
this.c.setVisibility(8);
|
|
this.a.setVisibility(0);
|
|
this.a.setText(this.d.getString(R$string.recycler_no_more));
|
|
}
|
|
|
|
public void a() {
|
|
this.c.setVisibility(0);
|
|
this.c.startAnimation(this.b);
|
|
this.a.setVisibility(8);
|
|
}
|
|
}
|