Java Code Examples for com.google.zxing.client.result.CalendarParsedResult#getStart()

The following examples show how to use com.google.zxing.client.result.CalendarParsedResult#getStart() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CalendarResultHandler.java    From android-apps with MIT License 6 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
  CalendarParsedResult calResult = (CalendarParsedResult) getResult();
  StringBuilder result = new StringBuilder(100);
  ParsedResult.maybeAppend(calResult.getSummary(), result);
  String startString = calResult.getStart();
  appendTime(startString, result, false, false);

  String endString = calResult.getEnd();
  if (endString != null) {
    boolean sameStartEnd = startString.equals(endString);
    appendTime(endString, result, true, sameStartEnd);
  }

  ParsedResult.maybeAppend(calResult.getLocation(), result);
  ParsedResult.maybeAppend(calResult.getAttendee(), result);
  ParsedResult.maybeAppend(calResult.getDescription(), result);
  return result.toString();
}
 
Example 2
Source File: CalendarResultHandler.java    From barterli_android with Apache License 2.0 6 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
    CalendarParsedResult calResult = (CalendarParsedResult) getResult();
    StringBuilder result = new StringBuilder(100);
    ParsedResult.maybeAppend(calResult.getSummary(), result);
    Date start = calResult.getStart();
    String startString = start.toGMTString();
    appendTime(startString, result, false, false);

    Date end = calResult.getEnd();
    String endString = end.toGMTString();
    if (endString != null) {
        boolean sameStartEnd = startString.equals(endString);
        appendTime(endString, result, true, sameStartEnd);
    }

    ParsedResult.maybeAppend(calResult.getLocation(), result);
    ParsedResult.maybeAppend(calResult.getAttendees(), result);
    ParsedResult.maybeAppend(calResult.getDescription(), result);
    return result.toString();
}
 
Example 3
Source File: CalendarResultHandler.java    From android-quick-response-code with Apache License 2.0 6 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
    CalendarParsedResult calResult = (CalendarParsedResult) getResult();
    StringBuilder result = new StringBuilder(100);
    ParsedResult.maybeAppend(calResult.getSummary(), result);
    Date start = calResult.getStart();
    String startString = start.toGMTString();
    appendTime(startString, result, false, false);

    Date end = calResult.getEnd();
    String endString = end.toGMTString();
    if (endString != null) {
        boolean sameStartEnd = startString.equals(endString);
        appendTime(endString, result, true, sameStartEnd);
    }

    ParsedResult.maybeAppend(calResult.getLocation(), result);
    ParsedResult.maybeAppend(calResult.getAttendees(), result);
    ParsedResult.maybeAppend(calResult.getDescription(), result);
    return result.toString();
}