• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java OverviewSessionLoader类的典型用法和代码示例

java 1次浏览

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

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

示例1: onCreateLoader

点赞 3

import com.google.samples.apps.iosched.map.util.OverviewSessionLoader; //导入依赖的package包/类
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    if (id != QUERY_TOKEN_SESSION_ROOM && id != QUERY_TOKEN_SUBTITLE) {
        return null;
    }

    final long time = UIUtils.getCurrentTime(getActivity());
    final String roomId = args.getString(QUERY_ARG_ROOMID);
    final String roomTitle = args.getString(QUERY_ARG_ROOMTITLE);
    final int roomType = args.getInt(QUERY_ARG_ROOMTYPE);

    if (id == QUERY_TOKEN_SESSION_ROOM) {
        return new OverviewSessionLoader(getActivity(), roomId, roomTitle, roomType, time);
    } else if (id == QUERY_TOKEN_SUBTITLE) {
        return new SingleSessionLoader(getActivity(), roomId, roomTitle, roomType);
    }
    return null;
}
 

开发者ID:dreaminglion,
项目名称:iosched-reader,
代码行数:19,
代码来源:MapInfoFragment.java

示例2: onCreateLoader

点赞 3

import com.google.samples.apps.iosched.map.util.OverviewSessionLoader; //导入依赖的package包/类
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
    if (id != QUERY_TOKEN_SESSION_ROOM && id != QUERY_TOKEN_SUBTITLE) {
        return null;
    }

    final long time = TimeUtils.getCurrentTime(getActivity());
    final String roomId = args.getString(QUERY_ARG_ROOMID);
    final String roomTitle = args.getString(QUERY_ARG_ROOMTITLE);
    final int roomType = args.getInt(QUERY_ARG_ROOMTYPE);
    final String iconType = args.getString(QUERY_ARG_ICONTYPE);

    if (id == QUERY_TOKEN_SESSION_ROOM) {
        return new OverviewSessionLoader(getActivity(), roomId, roomTitle, roomType, iconType,
                time);
    } else if (id == QUERY_TOKEN_SUBTITLE) {
        return new SingleSessionLoader(getActivity(), roomId, roomTitle, roomType, iconType);
    }
    return null;
}
 

开发者ID:google,
项目名称:iosched,
代码行数:21,
代码来源:MapInfoFragment.java

示例3: onBindViewHolder

点赞 3

import com.google.samples.apps.iosched.map.util.OverviewSessionLoader; //导入依赖的package包/类
@Override
public void onBindViewHolder(final ItemHolder holder, final int position) {
    mCursor.moveToPosition(position);
    final String title = mCursor.getString(OverviewSessionLoader.Query.SESSION_TITLE);
    final String sessionId = mCursor.getString(OverviewSessionLoader.Query.SESSION_ID);
    final long blockStart = mCursor.getLong(OverviewSessionLoader.Query.SESSION_START);
    final long blockEnd = mCursor.getLong(OverviewSessionLoader.Query.SESSION_END);
    final String sessionTag = mCursor.getString(OverviewSessionLoader.Query.SESSION_TAGS);
    final int sessionType = ScheduleItem.detectSessionType(sessionTag);
    final String text = UIUtils.formatIntervalTimeString(blockStart, blockEnd,
            mStringBuilder, mContext);

    holder.itemView.setTag(R.id.tag_session_id, sessionId);
    holder.title.setText(title);
    holder.text.setText(text);
    if (mDisplayIcons) {
        holder.image.setImageResource(UIUtils.getSessionIcon(sessionType));
    }
}
 

开发者ID:google,
项目名称:iosched,
代码行数:20,
代码来源:MapInfoFragment.java

示例4: bindView

点赞 2

import com.google.samples.apps.iosched.map.util.OverviewSessionLoader; //导入依赖的package包/类
@Override
public void bindView(View view, Context context, Cursor cursor) {
    ItemHolder holder = (ItemHolder) view.getTag();
    if (holder == null) {
        holder = initialiseHolder(view);
        view.setTag(holder);
    }
    final String title = cursor
            .getString(OverviewSessionLoader.Query.SESSION_TITLE);
    final String sessionId = cursor
            .getString(OverviewSessionLoader.Query.SESSION_ID);
    final long blockStart = cursor
            .getLong(OverviewSessionLoader.Query.SESSION_START);
    final long blockEnd = cursor
            .getLong(OverviewSessionLoader.Query.SESSION_END);
    final String sessionTag = cursor
            .getString(OverviewSessionLoader.Query.SESSION_TAGS);

    final int sessionType = ScheduleHelper.detectSessionType(sessionTag);
    final String text = UIUtils.formatIntervalTimeString(blockStart, blockEnd,
            mStringBuilder, context);

    holder.title.setText(title);
    holder.title.setTag(sessionId);
    holder.text.setText(text);
    if (mDisplayIcons) {
        holder.image.setImageResource(UIUtils.getSessionIcon(sessionType));
    }
}
 

开发者ID:dreaminglion,
项目名称:iosched-reader,
代码行数:30,
代码来源:MapInfoFragment.java

示例5: getSessionIdAtPosition

点赞 2

import com.google.samples.apps.iosched.map.util.OverviewSessionLoader; //导入依赖的package包/类
public String getSessionIdAtPosition(int position) {
    if (mCursor.moveToPosition(position)) {
        return  mCursor.getString(OverviewSessionLoader.Query.SESSION_ID);
    } else {
        return null;
    }
}
 

开发者ID:google,
项目名称:iosched,
代码行数:8,
代码来源:MapInfoFragment.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)