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

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

java 2次浏览

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

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

示例1: onMomentsLoaded

点赞 3

import com.google.android.gms.plus.model.moments.MomentBuffer; //导入依赖的package包/类
/**
 * Callback to notify that the currently authenticated users activities have been retrieved.
 * 
 * @param status the status returned from the request to fetch moments.
 * @param moments an immutable buffer containing the activities of the user.
 * @param nextPageToken a token to retrieve older user activities.
 * @param updated the time at which this collection of moments was last updated. Formatted as an RFC 3339 timestamp.
 */
@Override
public void onMomentsLoaded(ConnectionResult status, MomentBuffer moments,
        String nextPageToken, String updated) {
    if (status.getErrorCode() == ConnectionResult.SUCCESS) {
        try {
            for (Moment moment : moments) {
                // Make the activities available to our adapter.
                // Each moment must be frozen in order to persist it outside of the
                // MomentBuffer.
                mListItems.add(moment.freeze());
            }
        } finally {
            moments.close();
        }

        mMomentListAdapter.notifyDataSetChanged();
    } else {
        Log.e(TAG, "Error when loading moments: " + status.getErrorCode());
    }
}
 

开发者ID:vicfryzel,
项目名称:gplus-photohunt-client-android,
代码行数:29,
代码来源:ProfileActivity.java

示例2: K

点赞 2

import com.google.android.gms.plus.model.moments.MomentBuffer; //导入依赖的package包/类
public Moments.LoadMomentsResult K(final Status paramStatus)
{
  return new Moments.LoadMomentsResult()
  {
    public MomentBuffer getMomentBuffer()
    {
      return null;
    }

    public String getNextPageToken()
    {
      return null;
    }

    public Status getStatus()
    {
      return paramStatus;
    }

    public String getUpdated()
    {
      return null;
    }

    public void release()
    {
    }
  };
}
 

开发者ID:mmmsplay10,
项目名称:QuizUpWinner,
代码行数:30,
代码来源:hz.java

示例3: onResult

点赞 2

import com.google.android.gms.plus.model.moments.MomentBuffer; //导入依赖的package包/类
@Override
public void onResult(LoadMomentsResult momentData) {
    switch (momentData.getStatus().getStatusCode()) {
        case CommonStatusCodes.SUCCESS:
            MomentBuffer momentBuffer = momentData.getMomentBuffer();
            mListItems.clear();
            try {
                int count = momentBuffer.getCount();
                for (int i = 0; i < count; i++) {
                    mListItems.add(momentBuffer.get(i).freeze());
                }
            } finally {
                momentBuffer.close();
            }

            mMomentListAdapter.notifyDataSetChanged();
            break;

        case CommonStatusCodes.SIGN_IN_REQUIRED:
            mGoogleApiClient.disconnect();
            mGoogleApiClient.connect();
            break;

        default:
            Log.e(TAG, "Error when listing moments: " + momentData.getStatus());
            break;
    }
}
 

开发者ID:TerribleDev,
项目名称:XamarinAdmobTutorial,
代码行数:29,
代码来源:ListMomentsActivity.java

示例4: onMomentsLoaded

点赞 2

import com.google.android.gms.plus.model.moments.MomentBuffer; //导入依赖的package包/类
@Override
public void onMomentsLoaded(ConnectionResult status, MomentBuffer momentBuffer,
        String nextPageToken, String updated) {
    switch (status.getErrorCode()) {
        case ConnectionResult.SUCCESS:
            mListItems.clear();
            try {
                int count = momentBuffer.getCount();
                for (int i = 0; i < count; i++) {
                    mListItems.add(momentBuffer.get(i).freeze());
                }
            } finally {
                momentBuffer.close();
            }

            mMomentListAdapter.notifyDataSetChanged();
            break;

        case ConnectionResult.SIGN_IN_REQUIRED:
            mPlusClient.disconnect();
            mPlusClient.connect();
            break;

        default:
            Log.e(TAG, "Error when listing people: " + status);
            break;
    }
}
 

开发者ID:laurion,
项目名称:wabbit-client,
代码行数:29,
代码来源:ListMomentsActivity.java

示例5: onMomentsLoaded

点赞 2

import com.google.android.gms.plus.model.moments.MomentBuffer; //导入依赖的package包/类
@Deprecated
public abstract void onMomentsLoaded(ConnectionResult paramConnectionResult, MomentBuffer paramMomentBuffer, String paramString1, String paramString2);
 

开发者ID:mmmsplay10,
项目名称:QuizUpWinner,
代码行数:3,
代码来源:PlusClient.java

示例6: getMomentBuffer

点赞 2

import com.google.android.gms.plus.model.moments.MomentBuffer; //导入依赖的package包/类
public final MomentBuffer getMomentBuffer()
{
  return this.DO;
}
 

开发者ID:mmmsplay10,
项目名称:QuizUpWinner,
代码行数:5,
代码来源:hs.java

示例7: getMomentBuffer

点赞 1

import com.google.android.gms.plus.model.moments.MomentBuffer; //导入依赖的package包/类
public abstract MomentBuffer getMomentBuffer(); 

开发者ID:mmmsplay10,
项目名称:QuizUpWinner,
代码行数:2,
代码来源:Moments.java


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