本文整理汇总了Java中com.google.zxing.client.result.CalendarParsedResult.getEnd方法的典型用法代码示例。如果您正苦于以下问题:Java CalendarParsedResult.getEnd方法的具体用法?Java CalendarParsedResult.getEnd怎么用?Java CalendarParsedResult.getEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.client.result.CalendarParsedResult
的用法示例。
在下文中一共展示了CalendarParsedResult.getEnd方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: 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();
}
示例4: 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();
}
示例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();
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();
}