Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior different on earlier devices (4.4.2) #3

Open
benzabill opened this issue Jan 16, 2017 · 5 comments
Open

Behavior different on earlier devices (4.4.2) #3

benzabill opened this issue Jan 16, 2017 · 5 comments

Comments

@benzabill
Copy link

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)

@Taishi-Y
Copy link
Owner

Taishi-Y commented Jan 17, 2017

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!🎉

@benzabill
Copy link
Author

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
Copy link
Author

Hi Taishi! Any word on fixing this?

@tank777
Copy link

tank777 commented Feb 14, 2017

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

add this to FlipProgressDialog.java

@benzabill
Copy link
Author

Could you add this to the library/update dependency?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants