Closed GoogleCodeExporter closed 8 years ago
Please attach the complete stack trace from the logcat.
Possible reason is you need to pass in a "windowed" context, such as an
Activity, instead of "non-windowed" context, such as Application
(getApplicationContext() is one of them).
Original comment by yukuku
on 1 Mar 2011 at 12:17
At the moment I cant run the program to log anything in the trace
im using the code as follows
// initialColor is the initially-selected color to be shown in the rectangle on
the left of the arrow.
// for example, 0xff000000 is black, 0xff0000ff is blue. Please be aware of the initial 0xff which is the alpha.
AmbilWarnaDialog dialog = new AmbilWarnaDialog(designmode_createcards.this, 0xff0000ff, new OnAmbilWarnaListener()
{
@Override
public void onCancel(AmbilWarnaDialog dialog) {
}
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
}
});
dialog.show();
Original comment by danma...@gmail.com
on 1 Mar 2011 at 12:24
and im importing the color picker with
import yuku.ambilwarna.AmbilWarnaDialog;
import yuku.ambilwarna.AmbilWarnaKotak;
Original comment by danma...@gmail.com
on 1 Mar 2011 at 12:25
Sorry, without a stack trace I can't help you with this.
Original comment by yukuku
on 1 Mar 2011 at 12:26
ok thank you! I think i figured out what it was...
lol
i didn't import it right.
Original comment by danma...@gmail.com
on 1 Mar 2011 at 12:31
well I imported it right this time. still have an error on the dialog.show.
im calling it from a regular activity.
so its a context issue .. hmm
Original comment by danma...@gmail.com
on 1 Mar 2011 at 12:33
You have to put it inside a function like this. Thats what fixed my problem
with the same issue.
public void colorpicker()
{
// initialColor is the initially-selected color to be shown in the rectangle on
the left of the arrow.
// for example, 0xff000000 is black, 0xff0000ff is blue. Please be aware of the initial 0xff which is the alpha.
AmbilWarnaDialog dialog = new AmbilWarnaDialog(designmode_createcards.this, 0xff0000ff, new OnAmbilWarnaListener()
{
@Override
public void onCancel(AmbilWarnaDialog dialog) {
}
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
}
});
dialog.show();
}
Original comment by JustinCo...@gmail.com
on 22 Apr 2011 at 1:11
Original comment by yukuku
on 3 Nov 2011 at 7:59
Original issue reported on code.google.com by
danma...@gmail.com
on 1 Mar 2011 at 12:02