I 'm starting with Xposed module and gives me an error I do not understand .
Use a ColorPicker to choose a color and then use the module, colorPicker works perfect
I then apply the code
if I put the color in the code,Color.Black
works...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity);
btn = (Button) findViewById(R.id.ybutton);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
colorPickerDialog = new ColorPickerDialog(Ver.this, color);
colorPickerDialog.setAlphaSliderVisible(true);
colorPickerDialog.setHexValueEnabled(true);
colorPickerDialog.setTitle("Color Bar");
colorPickerDialog.setOnColorChangedListener(new ColorPickerDialog.OnColorChangedListener() {
@Override
public void onColorChanged(int i) {
color = i;
//change the color of the button to confirm it works
btn.setBackgroundColor(color);
}
});
colorPickerDialog.show();
}
});
}
public void handleInitPackageResources(final XC_InitPackageResources.InitPackageResourcesParam resparam) throws Throwable {
if (!resparam.packageName.equals("com.run.appBar"))
return;
XposedBridge.log("Conexion hecha");
resparam.res.setReplacement("com.run.appBar", "color", "color_primary", color);//appBar
XposedBridge.log("color cambiado");
}