X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=android%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fclient%2Fandroid%2Fresult%2FResultHandler.java;fp=android%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fclient%2Fandroid%2Fresult%2FResultHandler.java;h=3020dc55346a5565708bc45e70b2cd7acc4bf356;hb=8e5e364d8848cca6cccdb6845482d3602c03f016;hp=db9e2352696114508bb288891204d87d4ed4c89e;hpb=4f18dbe27f591f6818e43396aea66393e87314a7;p=zxing.git diff --git a/android/src/com/google/zxing/client/android/result/ResultHandler.java b/android/src/com/google/zxing/client/android/result/ResultHandler.java index db9e2352..3020dc55 100644 --- a/android/src/com/google/zxing/client/android/result/ResultHandler.java +++ b/android/src/com/google/zxing/client/android/result/ResultHandler.java @@ -39,6 +39,8 @@ import android.content.pm.PackageManager; import android.net.Uri; import android.preference.PreferenceManager; import android.provider.Contacts; +import android.view.View; +import android.widget.Button; import java.text.DateFormat; import java.text.ParsePosition; @@ -125,6 +127,17 @@ public abstract class ResultHandler { */ public abstract void handleButtonPress(int index); + /** + * The Google Shopper button is special and is not handled by the abstract button methods above. + * + * @param listener The on click listener to install for this button. + */ + protected void showGoogleShopperButton(View.OnClickListener listener) { + Button shopperButton = (Button) activity.findViewById(R.id.shopper_button); + shopperButton.setVisibility(View.VISIBLE); + shopperButton.setOnClickListener(listener); + } + /** * Create a possibly styled string for the contents of the current barcode. * @@ -161,7 +174,7 @@ public abstract class ResultHandler { * @param location a text description of the event location * @param description a text description of the event itself */ - final void addCalendarEvent(String summary, + final void addCalendarEvent(String summary, String start, String end, String location,