yukuku / ambilwarna

Android Color Picker aka AmbilWarna library ("Pick a Color" in Indonesian)
Other
222 stars 88 forks source link

Dialog Window appears clipped when setting alpa parameter to true #15

Closed Yasserkhayyal closed 8 years ago

Yasserkhayyal commented 8 years ago

I have a problem with the dialog window size in the portrait mode when running my app against S5 phone. here is a snapshot: screenshot_2016-01-24-13-42-40 1 How to solve this issue?

shobhitic commented 8 years ago

I know this is a closed issue but I would really like to know the solution to this. Facing the same problem.

Yasserkhayyal commented 8 years ago

Add this snippet after dialog.show() :

View view = dialog.getDialog().findViewById(yuku.ambilwarna.R.id.ambilwarna_viewSatBri);
        ViewGroup.LayoutParams params = view.getLayoutParams();

        //reduces the size of the color picker view to show the hue picker bar
        params.width -= (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48,
                getResources().getDisplayMetrics());
        ;
view.setLayoutParams(params);
shobhitic commented 8 years ago

Thanks!

Yasserkhayyal commented 8 years ago

Glad it could help. Happy Coding :)