This commit is contained in:
18142669586
2022-08-26 15:58:31 +08:00
parent 3b8f0466a0
commit 49ef55bfee
6 changed files with 45 additions and 14 deletions

View File

@@ -36,7 +36,7 @@ public class LoadingView extends FrameLayout {
private void init(Context context) {
this.mContext = context;
View view = LayoutInflater.from(mContext).inflate(R.layout.layout_portrait_live_item, this, true);
View view = LayoutInflater.from(mContext).inflate(R.layout.layout_portrait_comm_item, this, true);
mIvLoading = view.findViewById(R.id.iv_loading);
}
@@ -46,7 +46,6 @@ public class LoadingView extends FrameLayout {
ImageView ivLoading = mIvLoading.findViewById(R.id.iv_loading);
AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
frameAnimation.start();
setVisibility(VISIBLE);
}

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"/>
<ImageView
android:id="@+id/iv_loading"
android:layout_width="150dp"
android:layout_height="188dp"
android:layout_centerInParent="true"
android:background="@drawable/loading_animation" />
</RelativeLayout>