File tree Expand file tree Collapse file tree
example-android/src/main/java/com/seatgeek/sixpack/android
example-java/src/main/java/com/seatgeek/sixpack/examplejava Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ public class SixpackActivity extends ActionBarActivity {
3838
3939 buttonColor .participate (
4040 new OnParticipationSuccess () {
41- @ Override public void onParticipation (final ParticipatingExperiment experiment , Alternative selectedAlternative ) {
42- if (SixpackModule .BUTTON_COLOR_RED .equals (selectedAlternative .getName ())) {
41+ @ Override public void onParticipation (final ParticipatingExperiment experiment ) {
42+ if (SixpackModule .BUTTON_COLOR_RED .equals (experiment . getSelectedAlternative () .getName ())) {
4343 colorfulButton .setBackgroundColor (Color .RED );
44- } else if (SixpackModule .BUTTON_COLOR_BLUE .equals (selectedAlternative .getName ())) {
44+ } else if (SixpackModule .BUTTON_COLOR_BLUE .equals (experiment . getSelectedAlternative () .getName ())) {
4545 colorfulButton .setBackgroundColor (Color .BLUE );
4646 }
4747
Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ public static void main(String[] args) {
2929
3030 // participate in the new experiment
3131 pillColor .participate (
32- (participatingExperiment , selectedAlternative ) -> {
32+ (participatingExperiment ) -> {
3333 // We successfully participated, now we can use the alternative specified by Sixpack
34- System .out .println ("Will you take a " + selectedAlternative .getName () + " pill? [y/n]" );
34+ System .out .println ("Will you take a " + participatingExperiment . getSelectedAlternative () .getName () + " pill? [y/n]" );
3535 String answer = new Scanner (System .in ).nextLine ();
3636
3737 if ("y" .equalsIgnoreCase (answer )) {
You can’t perform that action at this time.
0 commit comments