DroidFish: Fixed lint warning.

This commit is contained in:
Peter Osterlund
2015-12-20 11:42:55 +01:00
parent 69fdab79d4
commit 9aa5acc03a

View File

@@ -24,6 +24,7 @@ import android.graphics.PixelFormat;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout; import android.widget.LinearLayout;
public class ColorPickerDialog public class ColorPickerDialog
@@ -62,20 +63,15 @@ public class ColorPickerDialog
} }
private void setUp(int color) { private void setUp(int color) {
setContentView(R.layout.dialog_color_picker);
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.dialog_color_picker, null);
setContentView(layout);
setTitle(getContext().getText(R.string.prefs_colors_title) + " '" setTitle(getContext().getText(R.string.prefs_colors_title) + " '"
+ additionalInfo + "'"); + additionalInfo + "'");
mColorPicker = (ColorPickerView) layout.findViewById(R.id.color_picker_view); mColorPicker = (ColorPickerView) findViewById(R.id.color_picker_view);
mOldColor = (ColorPickerPanelView) layout.findViewById(R.id.old_color_panel); mOldColor = (ColorPickerPanelView) findViewById(R.id.old_color_panel);
mNewColor = (ColorPickerPanelView) layout.findViewById(R.id.new_color_panel); mNewColor = (ColorPickerPanelView) findViewById(R.id.new_color_panel);
((LinearLayout) mOldColor.getParent()).setPadding( ((LinearLayout) mOldColor.getParent()).setPadding(
Math.round(mColorPicker.getDrawingOffset()), Math.round(mColorPicker.getDrawingOffset()),
0, 0,