com.google.zxing.client.android.result
Class ProductResultHandler
java.lang.Object
com.google.zxing.client.android.result.ResultHandler
com.google.zxing.client.android.result.ProductResultHandler
public final class ProductResultHandler
- extends ResultHandler
Handles generic products which are not books.
- Author:
- dswitkin@google.com (Daniel Switkin)
Method Summary |
int |
getButtonCount()
Indicates how many buttons the derived class wants shown. |
int |
getButtonText(int index)
The text of the nth action button. |
int |
getDisplayTitle()
A string describing the kind of barcode that was found, e.g. |
void |
handleButtonPress(int index)
Execute the action which corresponds to the nth button. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProductResultHandler
public ProductResultHandler(android.app.Activity activity,
ParsedResult result,
Result rawResult)
getButtonCount
public int getButtonCount()
- Description copied from class:
ResultHandler
- Indicates how many buttons the derived class wants shown.
- Specified by:
getButtonCount
in class ResultHandler
- Returns:
- The integer button count.
getButtonText
public int getButtonText(int index)
- Description copied from class:
ResultHandler
- The text of the nth action button.
- Specified by:
getButtonText
in class ResultHandler
- Parameters:
index
- From 0 to getButtonCount() - 1
- Returns:
- The button text as a resource ID
handleButtonPress
public void handleButtonPress(int index)
- Description copied from class:
ResultHandler
- Execute the action which corresponds to the nth button.
- Specified by:
handleButtonPress
in class ResultHandler
- Parameters:
index
- The button that was clicked.
getDisplayTitle
public int getDisplayTitle()
- Description copied from class:
ResultHandler
- A string describing the kind of barcode that was found, e.g. "Found contact info".
- Specified by:
getDisplayTitle
in class ResultHandler
- Returns:
- The resource ID of the string.