飘屏和loading图加载
BIN
app/src/main/assets/svga/loading.svga
Normal file
@@ -49,7 +49,6 @@ public class DialogManager {
|
||||
private boolean mCanceledOnClickBackKey = true;
|
||||
private boolean mCanceledOnClickOutside = true;
|
||||
private boolean mReCreate = true;
|
||||
private TextView mCancel;
|
||||
/**
|
||||
* 新增的一種彈框類型,支持只彈一次
|
||||
*/
|
||||
@@ -941,7 +940,6 @@ public class DialogManager {
|
||||
mDialog.show();
|
||||
}
|
||||
mDialog.setContentView(R.layout.layout_progress_dialog);
|
||||
((AnimationDrawable) ((ImageView) mDialog.findViewById(R.id.iv_loading_icon)).getDrawable()).start();
|
||||
TextView tvTip = mDialog.findViewById(R.id.tv_tip);
|
||||
tvTip.setText(R.string.common_loading_tips);
|
||||
|
||||
|
@@ -15,12 +15,9 @@ import com.yizhuan.erban.R;
|
||||
*/
|
||||
|
||||
public class LoadingDialog extends AppCompatDialog {
|
||||
private Context context;
|
||||
private ImageView ivLoading;
|
||||
|
||||
public LoadingDialog(Context context) {
|
||||
super(context, R.style.ErbanUserInfoDialog);
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,7 +26,5 @@ public class LoadingDialog extends AppCompatDialog {
|
||||
setContentView(R.layout.dialog_loading);
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
ivLoading = findViewById(R.id.iv_loading);
|
||||
((AnimationDrawable) ivLoading.getDrawable()).start();
|
||||
}
|
||||
}
|
||||
|
@@ -7,6 +7,9 @@ import android.view.Window;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
@@ -20,7 +23,7 @@ public class CommonLoadingDialog extends BaseDialog {
|
||||
private String msg = ResUtil.getString(R.string.widget_dialog_commonloadingdialog_01);
|
||||
|
||||
private TextView tvTip;
|
||||
private ImageView ivLoading;
|
||||
private SVGAImageView loading;
|
||||
|
||||
public CommonLoadingDialog(Context context, String tip) {
|
||||
super(context, R.style.dialog);
|
||||
@@ -37,8 +40,7 @@ public class CommonLoadingDialog extends BaseDialog {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.layout_progress_dialog);
|
||||
ivLoading = findViewById(R.id.iv_loading);
|
||||
((AnimationDrawable) ivLoading.getDrawable()).start();
|
||||
loading = (SVGAImageView) findViewById(R.id.dialog_loading) ;
|
||||
tvTip = (TextView) findViewById(R.id.tv_tip);
|
||||
tvTip.setText(msg);
|
||||
}
|
||||
@@ -61,4 +63,11 @@ public class CommonLoadingDialog extends BaseDialog {
|
||||
super.show();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
loading.stopAnimation();
|
||||
loading.clear();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.9 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_close_all_server_one.webp
Normal file
After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 174 KiB |
@@ -94,7 +94,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="56dp"
|
||||
android:layout_marginTop="75dp"
|
||||
android:layout_marginEnd="13dp"
|
||||
android:layout_toEndOf="@id/benefactor_container"
|
||||
android:src="@drawable/all_service_gift_give_level_1" />
|
||||
|
@@ -2,20 +2,20 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_loading"
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/dialog_loading"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="180dp"
|
||||
android:visibility="gone"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/anim_loading" />
|
||||
android:layout_height="160dp"
|
||||
app:autoPlay="true"
|
||||
app:source="svga/loading.svga" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
<!-- <ProgressBar-->
|
||||
<!-- android:layout_width="240dp"-->
|
||||
<!-- android:layout_height="wrap_content"/>-->
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -8,19 +9,18 @@
|
||||
android:orientation="vertical"
|
||||
tools:background="@color/black_transparent_10">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_loading_icon"
|
||||
android:visibility="gone"
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/dialog_loading"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="160dp"
|
||||
android:src="@drawable/anim_loading" />
|
||||
app:autoPlay="true"
|
||||
app:source="svga/loading.svga" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
<!-- <ProgressBar-->
|
||||
<!-- android:layout_width="240dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_10"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_10" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tip"
|
||||
@@ -31,7 +31,7 @@
|
||||
android:singleLine="true"
|
||||
android:text="@string/common_loading_tips"
|
||||
android:textColor="#C9BCF2"
|
||||
android:textSize="14dp" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|