当前位置: 首页>>代码示例>>Java>>正文


Java CalendarParsedResult类代码示例

本文整理汇总了Java中com.google.zxing.client.result.CalendarParsedResult的典型用法代码示例。如果您正苦于以下问题:Java CalendarParsedResult类的具体用法?Java CalendarParsedResult怎么用?Java CalendarParsedResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CalendarParsedResult类属于com.google.zxing.client.result包,在下文中一共展示了CalendarParsedResult类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleButtonPress

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public void handleButtonPress(int index) {
  if (index == 0) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:25,代码来源:CalendarResultHandler.java

示例2: handleButtonPress

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public void handleButtonPress(int index) {
	if (index == 0) {
		CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

		String description = calendarResult.getDescription();
		String organizer = calendarResult.getOrganizer();
		if (organizer != null) { // No separate Intent key, put in
									// description
			if (description == null) {
				description = organizer;
			} else {
				description = description + '\n' + organizer;
			}
		}

		addCalendarEvent(calendarResult.getSummary(), calendarResult.getStart(), calendarResult.isStartAllDay(),
				calendarResult.getEnd(), calendarResult.getLocation(), description, calendarResult.getAttendees());
	}
}
 
开发者ID:xiong-it,项目名称:PortraitZXing,代码行数:21,代码来源:CalendarResultHandler.java

示例3: handleButtonPress

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public void handleButtonPress(int index) {
    if (index == 0) {
        CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

        String description = calendarResult.getDescription();
        String organizer = calendarResult.getOrganizer();
        if (organizer != null) { // No separate Intent key, put in description
            if (description == null) {
                description = organizer;
            } else {
                description = description + '\n' + organizer;
            }
        }

        addCalendarEvent(calendarResult.getSummary(),
                calendarResult.getStart(),
                calendarResult.isStartAllDay(),
                calendarResult.getEnd(),
                calendarResult.getLocation(),
                description,
                calendarResult.getAttendees());
    }
}
 
开发者ID:areebbeigh,项目名称:QRCodeUtility,代码行数:25,代码来源:CalendarResultHandler.java

示例4: handleClick

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public void handleClick(int buttonID) {
  if (buttonID == R.id.button_add_calendar) {
    CalendarParsedResult calendarResult = (CalendarParsedResult) getResult();

    String description = calendarResult.getDescription();
    String organizer = calendarResult.getOrganizer();
    if (organizer != null) { // No separate Intent key, put in description
      if (description == null) {
        description = organizer;
      } else {
        description = description + '\n' + organizer;
      }
    }

    addCalendarEvent(calendarResult.getSummary(),
                     calendarResult.getStart(),
                     calendarResult.isStartAllDay(),
                     calendarResult.getEnd(),
                     calendarResult.getLocation(),
                     description,
                     calendarResult.getAttendees());
  }
}
 
开发者ID:srowen,项目名称:zxing-bsplus,代码行数:25,代码来源:CalendarResultHandler.java

示例5: getDisplayContents

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@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();
}
 
开发者ID:barterli,项目名称:barterli_android,代码行数:22,代码来源:CalendarResultHandler.java

示例6: getDisplayContents

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public CharSequence getDisplayContents() {
  CalendarParsedResult calResult = (CalendarParsedResult) getResult();
  StringBuffer result = new StringBuffer(100);
  ParsedResult.maybeAppend(calResult.getSummary(), result);
  appendTime(calResult.getStart(), result);

  // The end can be null if the event has no duration, so use the start time.
  String endString = calResult.getEnd();
  if (endString == null) {
    endString = calResult.getStart();
  }
  appendTime(endString, result);

  ParsedResult.maybeAppend(calResult.getLocation(), result);
  ParsedResult.maybeAppend(calResult.getAttendee(), result);
  ParsedResult.maybeAppend(calResult.getDescription(), result);
  return result.toString();
}
 
开发者ID:saqimtiaz,项目名称:BibSearch,代码行数:20,代码来源:CalendarResultHandler.java

示例7: getDisplayContents

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public CharSequence getDisplayContents() {

  CalendarParsedResult calResult = (CalendarParsedResult) getResult();
  StringBuilder result = new StringBuilder(100);

  ParsedResult.maybeAppend(calResult.getSummary(), result);

  Date start = calResult.getStart();
  ParsedResult.maybeAppend(format(calResult.isStartAllDay(), start), result);

  Date end = calResult.getEnd();
  if (end != null) {
    if (calResult.isEndAllDay() && !start.equals(end)) {
      // Show only year/month/day
      // if it's all-day and this is the end date, it's exclusive, so show the user
      // that it ends on the day before to make more intuitive sense.
      // But don't do it if the event already (incorrectly?) specifies the same start/end
      end = new Date(end.getTime() - 24 * 60 * 60 * 1000);
    }
    ParsedResult.maybeAppend(format(calResult.isEndAllDay(), end), result);
  }

  ParsedResult.maybeAppend(calResult.getLocation(), result);
  ParsedResult.maybeAppend(calResult.getOrganizer(), result);
  ParsedResult.maybeAppend(calResult.getAttendees(), result);
  ParsedResult.maybeAppend(calResult.getDescription(), result);
  return result.toString();
}
 
开发者ID:FSteitz,项目名称:KeePass2Android,代码行数:30,代码来源:CalendarResultHandler.java

示例8: getDisplayContents

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public CharSequence getDisplayContents() {

	CalendarParsedResult calResult = (CalendarParsedResult) getResult();
	StringBuilder result = new StringBuilder(100);

	ParsedResult.maybeAppend(calResult.getSummary(), result);

	Date start = calResult.getStart();
	ParsedResult.maybeAppend(format(calResult.isStartAllDay(), start), result);

	Date end = calResult.getEnd();
	if (end != null) {
		if (calResult.isEndAllDay() && !start.equals(end)) {
			// Show only year/month/day
			// if it's all-day and this is the end date, it's exclusive, so
			// show the user
			// that it ends on the day before to make more intuitive sense.
			// But don't do it if the event already (incorrectly?) specifies
			// the same start/end
			end = new Date(end.getTime() - 24 * 60 * 60 * 1000);
		}
		ParsedResult.maybeAppend(format(calResult.isEndAllDay(), end), result);
	}

	ParsedResult.maybeAppend(calResult.getLocation(), result);
	ParsedResult.maybeAppend(calResult.getOrganizer(), result);
	ParsedResult.maybeAppend(calResult.getAttendees(), result);
	ParsedResult.maybeAppend(calResult.getDescription(), result);
	return result.toString();
}
 
开发者ID:xiong-it,项目名称:PortraitZXing,代码行数:32,代码来源:CalendarResultHandler.java

示例9: getDisplayContents

import com.google.zxing.client.result.CalendarParsedResult; //导入依赖的package包/类
@Override
public CharSequence getDisplayContents() {

    CalendarParsedResult calResult = (CalendarParsedResult) getResult();
    StringBuilder result = new StringBuilder(100);

    ParsedResult.maybeAppend(calResult.getSummary(), result);

    Date start = calResult.getStart();
    ParsedResult.maybeAppend(format(calResult.isStartAllDay(), start), result);

    Date end = calResult.getEnd();
    if (end != null) {
        if (calResult.isEndAllDay() && !start.equals(end)) {
            // Show only year/month/day
            // if it's all-day and this is the end date, it's exclusive, so show the user
            // that it ends on the day before to make more intuitive sense.
            // But don't do it if the event already (incorrectly?) specifies the same start/end
            end = new Date(end.getTime() - 24 * 60 * 60 * 1000);
        }
        ParsedResult.maybeAppend(format(calResult.isEndAllDay(), end), result);
    }

    ParsedResult.maybeAppend(calResult.getLocation(), result);
    ParsedResult.maybeAppend(calResult.getOrganizer(), result);
    ParsedResult.maybeAppend(calResult.getAttendees(), result);
    ParsedResult.maybeAppend(calResult.getDescription(), result);
    return result.toString();
}
 
开发者ID:areebbeigh,项目名称:QRCodeUtility,代码行数:30,代码来源:CalendarResultHandler.java


注:本文中的com.google.zxing.client.result.CalendarParsedResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。