• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Blocks类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addBlocks

import com.google.samples.apps.iosched.provider.ScheduleContract.Blocks; //导入依赖的package包/类
protected void addBlocks(long start, long end,
        ArrayList<ScheduleItem> mutableItems, ArrayList<ScheduleItem> immutableItems) {
    Cursor cursor = mContext.getContentResolver().query(
            Blocks.CONTENT_URI,
            BlocksQuery.PROJECTION,

            // filter sessions on the specified day
            Blocks.BLOCK_START + " >= ? and " + Blocks.BLOCK_START + " <= ?",
            new String[]{String.valueOf(start), String.valueOf(end)},

            // order by session start
            Blocks.BLOCK_START);

    while (cursor.moveToNext()) {
        ScheduleItem item = new ScheduleItem();
        item.setTypeFromBlockType(cursor.getString(BlocksQuery.BLOCK_TYPE));
        item.title = cursor.getString(BlocksQuery.BLOCK_TITLE);
        item.subtitle = cursor.getString(BlocksQuery.BLOCK_SUBTITLE);
        item.startTime = cursor.getLong(BlocksQuery.BLOCK_START);
        item.endTime = cursor.getLong(BlocksQuery.BLOCK_END);

        // Hide BREAK blocks to remote attendees (b/14666391):
        if (item.type == ScheduleItem.BREAK && !PrefUtils.isAttendeeAtVenue(mContext)) {
            continue;
        }
        // Currently, only type=FREE is mutable
        if (item.type == ScheduleItem.FREE) {
            mutableItems.add(item);
        } else {
            immutableItems.add(item);
            item.flags |= ScheduleItem.FLAG_NOT_REMOVABLE;
        }
    }
}
 
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:35,代码来源:ScheduleHelper.java


示例2: setTypeFromBlockType

import com.google.samples.apps.iosched.provider.ScheduleContract.Blocks; //导入依赖的package包/类
public void setTypeFromBlockType(String blockType) {
    if (ScheduleContract.Blocks.isValidBlockType(blockType) &&
            ScheduleContract.Blocks.BLOCK_TYPE_BREAK.equals(blockType)) {
        type = BREAK;
    } else {
        type = FREE;
    }
}
 
开发者ID:google,项目名称:iosched,代码行数:9,代码来源:ScheduleItem.java


示例3: getBreakIcon

import com.google.samples.apps.iosched.provider.ScheduleContract.Blocks; //导入依赖的package包/类
public int getBreakIcon() {
    if (blockKind != null) {
        switch (blockKind) {
            case Blocks.BLOCK_KIND_MEAL:
                return R.drawable.ic_food;
            case Blocks.BLOCK_KIND_CONCERT:
                return R.drawable.ic_concert;
            case Blocks.BLOCK_KIND_AFTERHOURS:
                return R.drawable.ic_afterhours;
            case Blocks.BLOCK_KIND_BADGEPICKUP:
                return R.drawable.ic_badge_pickup;
        }
    }
    return 0;
}
 
开发者ID:google,项目名称:iosched,代码行数:16,代码来源:ScheduleItem.java


示例4: addBlocks

import com.google.samples.apps.iosched.provider.ScheduleContract.Blocks; //导入依赖的package包/类
protected void addBlocks(long start, long end,
        ArrayList<ScheduleItem> mutableItems, ArrayList<ScheduleItem> immutableItems) {
    Cursor cursor = null;
    try {
        cursor = mContext.getContentResolver().query(
                Blocks.CONTENT_URI,
                BlocksQuery.PROJECTION,

                // filter sessions on the specified day
                Blocks.BLOCK_START + " >= ? and " + Blocks.BLOCK_START + " <= ?",
                new String[]{String.valueOf(start), String.valueOf(end)},

                // order by session start
                Blocks.BLOCK_START);

        if (cursor.moveToFirst()) {
            do {
                ScheduleItem item = new ScheduleItem();
                item.setTypeFromBlockType(cursor.getString(BlocksQuery.BLOCK_TYPE));
                item.title = cursor.getString(BlocksQuery.BLOCK_TITLE);
                item.room = item.subtitle = cursor.getString(BlocksQuery.BLOCK_SUBTITLE);
                item.startTime = cursor.getLong(BlocksQuery.BLOCK_START);
                item.endTime = cursor.getLong(BlocksQuery.BLOCK_END);

                // Hide BREAK blocks to remote attendees (b/14666391):
                if (item.type == ScheduleItem.BREAK && !SettingsUtils.isAttendeeAtVenue(mContext)) {
                    continue;
                }
                // Currently, only type=FREE is mutable
                if (item.type == ScheduleItem.FREE) {
                    mutableItems.add(item);
                } else {
                    immutableItems.add(item);
                    item.flags |= ScheduleItem.FLAG_NOT_REMOVABLE;
                }
            } while (cursor.moveToNext());
        }
    } finally {
        if (cursor != null) {
            cursor.close();
        }
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:44,代码来源:ScheduleHelper.java


示例5: isFoodBreak

import com.google.samples.apps.iosched.provider.ScheduleContract.Blocks; //导入依赖的package包/类
public boolean isFoodBreak() {
    return Blocks.BLOCK_KIND_MEAL.equals(blockKind);
}
 
开发者ID:google,项目名称:iosched,代码行数:4,代码来源:ScheduleItem.java


示例6: isConcert

import com.google.samples.apps.iosched.provider.ScheduleContract.Blocks; //导入依赖的package包/类
public boolean isConcert() {
    return Blocks.BLOCK_KIND_CONCERT.equals(blockKind);
}
 
开发者ID:google,项目名称:iosched,代码行数:4,代码来源:ScheduleItem.java


示例7: upgradeFrom2017Cto2017D

import com.google.samples.apps.iosched.provider.ScheduleContract.Blocks; //导入依赖的package包/类
private void upgradeFrom2017Cto2017D(SQLiteDatabase db) {
    db.execSQL("ALTER TABLE " + Tables.BLOCKS + " ADD COLUMN " + Blocks.BLOCK_KIND + " TEXT");
}
 
开发者ID:google,项目名称:iosched,代码行数:4,代码来源:ScheduleDatabase.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LanguageEmbedding类代码示例发布时间:2022-05-22
下一篇:
Java SizeT类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap