如何在 ProgressDialog 中更改可绘制动画列表的大小

How change size drawable animation-list in ProgressDialog

我有两帧分辨率为 800x600 的动画 original, but i take this result2。我的问题是如何更改可绘制大小或 ProgressDialog 的问题?
bulb_anim.xml

<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
                android:oneshot="false">
    <item android:drawable="@drawable/bulb1"
          android:duration="350"/>
    <item android:drawable="@drawable/bulb2"
          android:duration="350"/>
</animation-list>



styles.xml

<style name="MyThemeProgress" parent="ThemeOverlay.AppCompat.Dialog">
        <item name="android:alertDialogStyle">@style/CustomAlertDialogStyle</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:title">false</item>>
        <item name="android:textColorPrimary">#FFFFFF</item>
        <item name="android:backgroundDimEnabled">true</item>
        <item name="android:textColor">#FFFFFF</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textSize">12sp</item>
    </style>
    <style name="CustomAlertDialogStyle">
        <item name="android:bottomBright">@android:color/transparent</item>
        <item name="android:bottomDark">@android:color/transparent</item>
        <item name="android:bottomMedium">@android:color/transparent</item>
        <item name="android:centerBright">@android:color/transparent</item>
        <item name="android:centerDark">@android:color/transparent</item>
        <item name="android:centerMedium">@android:color/transparent</item>
        <item name="android:fullBright">@android:color/transparent</item>
        <item name="android:fullDark">@android:color/transparent</item>
        <item name="android:topBright">@android:color/transparent</item>
        <item name="android:topDark">@android:color/transparent</item>
    </style><br><br>

activity

dialog = new ProgressDialog(this,R.style.MyThemeProgress);
                dialog.setCancelable(false);
                dialog.setProgressStyle(android.R.style.Animation_Activity);
                dialog.setIndeterminate(true);
                dialog.setIndeterminateDrawable(this.getResources().getDrawable(R.drawable.bulb_anim));
                dialog.show();

我修复了它,更改对话框上的 ProgressDialog 和上面看到的 styles.xml,将其删除。我的 gif 结果:bulb_anim
transparant_color.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >

    <item android:drawable="@color/transparent"></item>

</selector>

my_activity.java

dialog = new Dialog(this, android.R.style.Theme_Dialog);
                dialog.setCancelable(false);
                ImageView imageView = new ImageView(this);
                imageView.setBackgroundResource(R.drawable.bulb_anim);
                int width = WRAP_CONTENT;
                int height = WRAP_CONTENT;
                LinearLayout.LayoutParams parms = new LinearLayout.LayoutParams(width,height);
                dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
                dialog.setContentView(imageView);
                dialog.setCanceledOnTouchOutside(false);
                dialog.getWindow().setBackgroundDrawable(getResources().getDrawable(R.drawable.transparent_color));
                dialog.show();
                animationDrawable = (AnimationDrawable) imageView.getBackground();
                animationDrawable.start();

bulb_anim