FlipProgressDialog icon indicating copy to clipboard operation
FlipProgressDialog copied to clipboard

Behavior different on earlier devices (4.4.2)

Open benzabill opened this issue 8 years ago • 5 comments

Hello! Great library.

Tested my app on a 4.4.2 device, and the dimensions of the dialog were wrong.

On recent device, showed up as a circle in the middle of screen.

On older device, showed up as an oval, with the icons showing off center.

image (ignore the red marks, had to obscure the text)

benzabill avatar Jan 16 '17 17:01 benzabill

Thank you for reporting this issue! I'll figure out why it occurred..

I'm glad if you give me the code which you write for this screen shot.

Cheers!🎉

Taishi-Y avatar Jan 17 '17 09:01 Taishi-Y

I wrote the following helper class that wraps a flip progress button helper. I call show when i want to show. Hide when i want to hide.

import android.app.FragmentManager;
import android.graphics.Color;
import android.util.Log;

import com.taishi.flipprogressdialog.FlipProgressDialog;

import java.util.ArrayList;
import java.util.List;

class FlipProgressButtonHelper {

private static final String TAG = "FlipProgressBttnHelper";
FlipProgressDialog fpd;

public void showProgressButton(FragmentManager fragmentManager) {

    List<Integer> imageList = new ArrayList<Integer>();
    imageList.add(R.drawable.image1);
    imageList.add(R.drawable.image2);
    imageList.add(R.drawable.image3);
    try {

        fpd = new FlipProgressDialog();
        fpd.setImageList(imageList);

        fpd.setBackgroundColor(Color.parseColor("#FF1744"));
        fpd.setCornerRadius(200);
        fpd.setCanceledOnTouchOutside(false);
        fpd.setOrientation("rotationY");

        fpd.setDuration(600);

        fpd.show(fragmentManager, "");
    } catch (Exception e) {
        Log.i(TAG, "flip progress helper exception");
        e.printStackTrace();
    }
}

public void dismissFlipProgressButton() {
    if (fpd == null) {
        Log.i(TAG, "tried to dismiss null flip progress button helper");
        return;
    }
    try {
        fpd.dismiss();
    } catch (Exception e) {
        Log.i(TAG, "flip progress helper exception");
        e.printStackTrace();
    }
}

} `

benzabill avatar Jan 17 '17 15:01 benzabill

Hi Taishi! Any word on fixing this?

benzabill avatar Feb 08 '17 21:02 benzabill

@Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); return dialog; }

add this to FlipProgressDialog.java

tank777 avatar Feb 14 '17 15:02 tank777

Could you add this to the library/update dependency?

benzabill avatar Mar 01 '17 17:03 benzabill