color-picker-view
color-picker-view copied to clipboard
Big empty space in the Colorpicker
On phones with bigger screens or higher resolutions, the colorpickers leaves empty spaces. What I have done here, is that I have removed the button and slider and then set the layouts to wrap parents, which works on some phones, but newer phones like Galaxy S6 and tablets have theese big spaces.
Haven't been able to reproduce this bug (ownno samsung devices). If you solve if, please share your solution! :)
Hi @danielnilsson9 . Have you used the files I sent you once on mail?
Else it easy:
- Remove the Button and slider from the default layouet of the colorpicker
- Remove the 2 minitures showing old/new colors
- Run a Emulator on a tablet or phone with big screen resolution
@danielnilsson9 Any idea on how I can edit the protected files? I know where in the code edit to remove these spaces. I removed the preview boxes and hue/alpha sliders from XML but in the code their sizes is still set which makes theese spaces.
Hi Daniel. I just wanted you to know that I solved this irritating problem with big empty spaces when removing alphaslider etc.
Solution:
In the ColorPickerDialogFragment class:
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog d = super.onCreateDialog(savedInstanceState);
d.requestWindowFeature(Window.FEATURE_NO_TITLE);
//This put the dialog/frames size according to the screens DIP
int x = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200, getActivity().getResources().getDisplayMetrics());
int y = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 150, getActivity().getResources().getDisplayMetrics());
d.getWindow().setLayout(x,y);
return d;
}