本文整理汇总了Java中com.google.samples.apps.iosched.io.model.Hashtag类的典型用法代码示例。如果您正苦于以下问题:Java Hashtag类的具体用法?Java Hashtag怎么用?Java Hashtag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Hashtag类属于com.google.samples.apps.iosched.io.model包,在下文中一共展示了Hashtag类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: makeContentProviderOperations
import com.google.samples.apps.iosched.io.model.Hashtag; //导入依赖的package包/类
@Override
public void makeContentProviderOperations(ArrayList<ContentProviderOperation> list) {
LOGD(TAG, "makeContentProviderOperations");
Uri uri = ScheduleContractHelper.setUriAsCalledFromSyncAdapter(
ScheduleContract.Hashtags.CONTENT_URI);
// Remove all the current entries
list.add(ContentProviderOperation.newDelete(uri).build());
// Insert hashtags
for (Hashtag hashtag : mHashtags.values()) {
ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
builder.withValue(ScheduleContract.Hashtags.HASHTAG_NAME, hashtag.name);
builder.withValue(ScheduleContract.Hashtags.HASHTAG_DESCRIPTION, hashtag.description);
try {
builder.withValue(ScheduleContract.Hashtags.HASHTAG_COLOR,
Color.parseColor(hashtag.color));
} catch (IllegalArgumentException e) {
builder.withValue(ScheduleContract.Hashtags.HASHTAG_COLOR, Color.BLACK);
}
builder.withValue(ScheduleContract.Hashtags.HASHTAG_ORDER, hashtag.order);
list.add(builder.build());
}
LOGD(TAG, "Hashtags: " + mHashtags.size());
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:24,代码来源:HashtagsHandler.java
示例2: makeContentProviderOperations
import com.google.samples.apps.iosched.io.model.Hashtag; //导入依赖的package包/类
@Override
public void makeContentProviderOperations(ArrayList<ContentProviderOperation> list) {
LOGD(TAG, "makeContentProviderOperations");
Uri uri = ScheduleContract.addCallerIsSyncAdapterParameter(
ScheduleContract.Hashtags.CONTENT_URI);
// Remove all the current entries
list.add(ContentProviderOperation.newDelete(uri).build());
// Insert hashtags
for (Hashtag hashtag : mHashtags.values()) {
ContentProviderOperation.Builder builder = ContentProviderOperation.newInsert(uri);
builder.withValue(ScheduleContract.Hashtags.HASHTAG_NAME, hashtag.name);
builder.withValue(ScheduleContract.Hashtags.HASHTAG_DESCRIPTION, hashtag.description);
try {
builder.withValue(ScheduleContract.Hashtags.HASHTAG_COLOR,
Color.parseColor(hashtag.color));
} catch (IllegalArgumentException e) {
builder.withValue(ScheduleContract.Hashtags.HASHTAG_COLOR, Color.BLACK);
}
builder.withValue(ScheduleContract.Hashtags.HASHTAG_ORDER, hashtag.order);
list.add(builder.build());
}
LOGD(TAG, "Hashtags: " + mHashtags.size());
}
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:24,代码来源:HashtagsHandler.java
示例3: process
import com.google.samples.apps.iosched.io.model.Hashtag; //导入依赖的package包/类
@Override
public void process(JsonElement element) {
LOGD(TAG, "process");
for (Hashtag hashtag : new Gson().fromJson(element, Hashtag[].class)) {
mHashtags.put(hashtag.name, hashtag);
}
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:8,代码来源:HashtagsHandler.java
示例4: process
import com.google.samples.apps.iosched.io.model.Hashtag; //导入依赖的package包/类
@Override
public void process(@NonNull Gson gson, @NonNull JsonElement element) {
for (Hashtag hashtag : gson.fromJson(element, Hashtag[].class)) {
mHashtags.put(hashtag.name, hashtag);
}
}
开发者ID:google,项目名称:iosched,代码行数:7,代码来源:HashtagsHandler.java
注:本文中的com.google.samples.apps.iosched.io.model.Hashtag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论