本文整理汇总了Java中com.google.samples.apps.iosched.io.model.Tag类的典型用法代码示例。如果您正苦于以下问题:Java Tag类的具体用法?Java Tag怎么用?Java Tag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tag类属于com.google.samples.apps.iosched.io.model包,在下文中一共展示了Tag类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: computeTypeOrder
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
private int computeTypeOrder(Session session) {
int order = Integer.MAX_VALUE;
int keynoteOrder = -1;
if (mTagMap == null) {
throw new IllegalStateException("Attempt to compute type order without tag map.");
}
for (String tagId : session.tags) {
if (Config.Tags.SPECIAL_KEYNOTE.equals(tagId)) {
return keynoteOrder;
}
Tag tag = mTagMap.get(tagId);
if (tag != null && Config.Tags.SESSION_GROUPING_TAG_CATEGORY.equals(tag.category)) {
if (tag.order_in_category < order) {
order = tag.order_in_category;
}
}
}
return order;
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:20,代码来源:SessionsHandler.java
示例2: makeContentProviderOperations
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
@Override
public void makeContentProviderOperations(ArrayList<ContentProviderOperation> list) {
Uri uri = ScheduleContractHelper.setUriAsCalledFromSyncAdapter(
ScheduleContract.Tags.CONTENT_URI);
// since the number of tags is very small, for simplicity we delete them all and reinsert
list.add(ContentProviderOperation.newDelete(uri).build());
for (Tag tag : mTags.values()) {
ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
builder.withValue(ScheduleContract.Tags.TAG_ID, tag.tag);
builder.withValue(ScheduleContract.Tags.TAG_CATEGORY, tag.category);
builder.withValue(ScheduleContract.Tags.TAG_NAME, tag.name);
builder.withValue(ScheduleContract.Tags.TAG_ORDER_IN_CATEGORY, tag.order_in_category);
builder.withValue(ScheduleContract.Tags.TAG_ABSTRACT, tag._abstract);
builder.withValue(ScheduleContract.Tags.TAG_COLOR, tag.color==null ?
Color.LTGRAY : Color.parseColor(tag.color));
list.add(builder.build());
}
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:20,代码来源:TagsHandler.java
示例3: makeContentProviderOperations
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
@Override
public void makeContentProviderOperations(ArrayList<ContentProviderOperation> list) {
Uri uri = ScheduleContract.addCallerIsSyncAdapterParameter(
ScheduleContract.Tags.CONTENT_URI);
// since the number of tags is very small, for simplicity we delete them all and reinsert
list.add(ContentProviderOperation.newDelete(uri).build());
for (Tag tag : mTags.values()) {
ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
builder.withValue(ScheduleContract.Tags.TAG_ID, tag.tag);
builder.withValue(ScheduleContract.Tags.TAG_CATEGORY, tag.category);
builder.withValue(ScheduleContract.Tags.TAG_NAME, tag.name);
builder.withValue(ScheduleContract.Tags.TAG_ORDER_IN_CATEGORY, tag.order_in_category);
builder.withValue(ScheduleContract.Tags.TAG_ABSTRACT, tag._abstract);
builder.withValue(ScheduleContract.Tags.TAG_COLOR, tag.color==null ?
Color.LTGRAY : Color.parseColor(tag.color));
list.add(builder.build());
}
}
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:20,代码来源:TagsHandler.java
示例4: computeTypeOrder
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
private int computeTypeOrder(Session session) {
int order = Integer.MAX_VALUE;
int keynoteOrder = -1;
if (mTagMap == null) {
throw new IllegalStateException("Attempt to compute type order without tag map.");
}
if (session.tags != null) {
for (String tagId : session.tags) {
if (Config.Tags.SPECIAL_KEYNOTE.equals(tagId)) {
return keynoteOrder;
}
Tag tag = mTagMap.get(tagId);
if (tag != null && Config.Tags.SESSION_GROUPING_TAG_CATEGORY.equals(tag.category)) {
if (tag.order_in_category < order) {
order = tag.order_in_category;
}
}
}
}
return order;
}
开发者ID:google,项目名称:iosched,代码行数:23,代码来源:SessionsHandler.java
示例5: makeContentProviderOperations
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
@Override
public void makeContentProviderOperations(ArrayList<ContentProviderOperation> list) {
Uri uri = ScheduleContractHelper.setUriAsCalledFromSyncAdapter(
ScheduleContract.Tags.CONTENT_URI);
// since the number of tags is very small, for simplicity we delete them all and reinsert
list.add(ContentProviderOperation.newDelete(uri).build());
for (Tag tag : mTags.values()) {
ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
builder.withValue(ScheduleContract.Tags.TAG_ID, tag.tag);
builder.withValue(ScheduleContract.Tags.TAG_CATEGORY, tag.category);
builder.withValue(ScheduleContract.Tags.TAG_NAME, tag.name);
builder.withValue(ScheduleContract.Tags.TAG_ORDER_IN_CATEGORY, tag.order_in_category);
builder.withValue(ScheduleContract.Tags.TAG_ABSTRACT, tag._abstract);
builder.withValue(ScheduleContract.Tags.TAG_COLOR, tag.color == null ? 0
: Color.parseColor(tag.color));
builder.withValue(ScheduleContract.Tags.TAG_PHOTO_URL, tag.photoUrl);
list.add(builder.build());
}
}
开发者ID:google,项目名称:iosched,代码行数:21,代码来源:TagsHandler.java
示例6: setTagMap
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
public void setTagMap(HashMap<String, Tag> tagMap) {
mTagMap = tagMap;
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:4,代码来源:SessionsHandler.java
示例7: process
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
@Override
public void process(JsonElement element) {
for (Tag tag : new Gson().fromJson(element, Tag[].class)) {
mTags.put(tag.tag, tag);
}
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:7,代码来源:TagsHandler.java
示例8: getTagMap
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
public HashMap<String, Tag> getTagMap() {
return mTags;
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:4,代码来源:TagsHandler.java
示例9: process
import com.google.samples.apps.iosched.io.model.Tag; //导入依赖的package包/类
@Override
public void process(@NonNull Gson gson, @NonNull JsonElement element) {
for (Tag tag : gson.fromJson(element, Tag[].class)) {
mTags.put(tag.tag, tag);
}
}
开发者ID:google,项目名称:iosched,代码行数:7,代码来源:TagsHandler.java
注:本文中的com.google.samples.apps.iosched.io.model.Tag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论