当前位置: 首页>>代码示例>>Java>>正文


Java PlusOptions类代码示例

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


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

示例1: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
public void onCreate(Bundle paramBundle)
{
  super.onCreate(paramBundle);
  setContentView(2130903060);
  ς.ˊ(this);
  if (paramBundle != null)
    this.mShouldConnectPlusClient = paramBundle.getBoolean("plus_client_connection_state");
  this.uiHelper = new UiLifecycleHelper(this, this.callback);
  this.uiHelper.onCreate(paramBundle);
  Plus.PlusOptions localPlusOptions = new Plus.PlusOptions.Builder().addActivityTypes(new String[] { "http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity" }).build();
  this.mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(Plus.API, localPlusOptions).addScope(Plus.SCOPE_PLUS_LOGIN).build();
  this.animationHelper = new LoginActivityAnimationHelper();
  this.animationHelper.onCreate(this, paramBundle);
  if (paramBundle == null)
    hideLoadingLayer();
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:17,代码来源:LoginActivity.java

示例2: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.person_list_activity);

    PlusOptions options = PlusOptions.builder().addActivityTypes(MomentUtil.ACTIONS).build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(Plus.API, options)
            .addScope(Plus.SCOPE_PLUS_LOGIN)
            .build();

    mListItems = new ArrayList<String>();
    mListAdapter = new ArrayAdapter<String>(this,
            android.R.layout.simple_list_item_1, mListItems);
    mPersonListView = (ListView) findViewById(R.id.person_list);
    mResolvingError = savedInstanceState != null
            && savedInstanceState.getBoolean(STATE_RESOLVING_ERROR, false);

    int available = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (available != CommonStatusCodes.SUCCESS) {
        showDialog(DIALOG_GET_GOOGLE_PLAY_SERVICES);
    }
}
 
开发者ID:TerribleDev,项目名称:XamarinAdmobTutorial,代码行数:26,代码来源:ListVisiblePeopleActivity.java

示例3: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.list_moments_activity);
    PlusOptions options = PlusOptions.builder().addActivityTypes(MomentUtil.ACTIONS).build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(Plus.API, options)
            .addScope(Plus.SCOPE_PLUS_LOGIN)
            .build();

    mListItems = new ArrayList<Moment>();
    mMomentListAdapter = new MomentListAdapter(this, android.R.layout.simple_list_item_1,
            mListItems);
    mMomentListView = (ListView) findViewById(R.id.moment_list);
    mMomentListView.setOnItemClickListener(this);
    mResolvingError = savedInstanceState != null
            && savedInstanceState.getBoolean(STATE_RESOLVING_ERROR, false);

    int available = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (available != CommonStatusCodes.SUCCESS) {
        showDialog(DIALOG_GET_GOOGLE_PLAY_SERVICES);
    }
}
 
开发者ID:TerribleDev,项目名称:XamarinAdmobTutorial,代码行数:26,代码来源:ListMomentsActivity.java

示例4: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.multi_moment_activity);
    PlusOptions options = PlusOptions.builder().addActivityTypes(MomentUtil.ACTIONS).build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(Plus.API, options)
            .addScope(Plus.SCOPE_PLUS_LOGIN)
            .build();

    mListAdapter = new ArrayAdapter<String>(
            this, android.R.layout.simple_list_item_1, MomentUtil.MOMENT_LIST);
    mMomentListView = (ListView) findViewById(R.id.moment_list);
    mMomentListView.setOnItemClickListener(this);
    mResolvingError = savedInstanceState != null
            && savedInstanceState.getBoolean(STATE_RESOLVING_ERROR, false);

    int available = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (available != CommonStatusCodes.SUCCESS) {
        showDialog(DIALOG_GET_GOOGLE_PLAY_SERVICES);
    }
}
 
开发者ID:TerribleDev,项目名称:XamarinAdmobTutorial,代码行数:25,代码来源:MomentActivity.java

示例5: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (savedInstanceState != null) {
        mSignInButtonClicked = savedInstanceState.getBoolean(KEY_SIGNIN_BUTTON_CLICKED);
    }
    Bundle args = getArguments();
    if (args != null) {
        mLoginAction = args.getInt(LoginActivity.EXTRA_ACTION);
    }
    PlusOptions options = PlusOptions.builder().build();
    mGoogleApiClient = new GoogleApiClient.Builder(getActivity())
            .addApi(Plus.API, options)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addScope(Plus.SCOPE_PLUS_PROFILE)
            .addScope(new Scope(WALLET_SANDBOX_SCOPE))
            .build();
}
 
开发者ID:benbek,项目名称:HereAStory-Android,代码行数:21,代码来源:LoginFragment.java

示例6: onCreateView

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
{
  View localView = LayoutInflater.from(getActivity()).inflate(2130903121, paramViewGroup, false);
  this.refreshLoader = ((LoaderAnimationWidget)localView.findViewById(2131296657));
  initEmptyView(localView);
  boolean bool;
  if (!TextUtils.isEmpty(QuizApplication.ˊ.ˋ.ʹ))
    bool = true;
  else
    bool = false;
  this.shouldConnectPlusClient = bool;
  Plus.PlusOptions localPlusOptions = new Plus.PlusOptions.Builder().addActivityTypes(new String[] { "http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity" }).build();
  this.mGoogleApiClient = new GoogleApiClient.Builder(getActivity()).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(Plus.API, localPlusOptions).addScope(Plus.SCOPE_PLUS_LOGIN).build();
  return localView;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:16,代码来源:GooglePlusFriendsFragment.java

示例7: signInWithGplus

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
public void signInWithGplus(Activity activity) {
	this.activity = activity;
	setmGoogleApiClient(new GoogleApiClient.Builder(activity)
	.addConnectionCallbacks(this)
	.addOnConnectionFailedListener(this).addApi(Plus.API, PlusOptions.builder().build())
	.addScope(Plus.SCOPE_PLUS_LOGIN).build());
	if (!getmGoogleApiClient().isConnecting()) {
		mSignInClicked = true;
		getmGoogleApiClient().connect();
	}
}
 
开发者ID:sirolf2009,项目名称:speedFix,代码行数:12,代码来源:GooglePlus.java

示例8: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.person_list_activity);

    PlusOptions options = PlusOptions.builder().addActivityTypes(MomentUtil.ACTIONS).build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(Plus.API, options)
            .addScope(Plus.SCOPE_PLUS_LOGIN)
            .build();

    mListItems = new ArrayList<String>();
    mListAdapter = new ArrayAdapter<String>(this,
            android.R.layout.simple_list_item_1, mListItems);
    mPersonListView = (ListView) findViewById(R.id.person_list);
    mResolvingError = savedInstanceState != null
            && savedInstanceState.getBoolean(STATE_RESOLVING_ERROR, false);

    int available = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (available != CommonStatusCodes.SUCCESS) {
        showDialog(DIALOG_GET_GOOGLE_PLAY_SERVICES);
    }

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getActionBar().setDisplayHomeAsUpEnabled(true);
    }
}
 
开发者ID:benbek,项目名称:HereAStory-Android,代码行数:30,代码来源:ListVisiblePeopleActivity.java

示例9: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.list_moments_activity);
    PlusOptions options = PlusOptions.builder().addActivityTypes(MomentUtil.ACTIONS).build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(Plus.API, options)
            .addScope(Plus.SCOPE_PLUS_LOGIN)
            .build();

    mListItems = new ArrayList<Moment>();
    mMomentListAdapter = new MomentListAdapter(this, android.R.layout.simple_list_item_1,
            mListItems);
    mMomentListView = (ListView) findViewById(R.id.moment_list);
    mMomentListView.setOnItemClickListener(this);
    mResolvingError = savedInstanceState != null
            && savedInstanceState.getBoolean(STATE_RESOLVING_ERROR, false);

    int available = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (available != CommonStatusCodes.SUCCESS) {
        showDialog(DIALOG_GET_GOOGLE_PLAY_SERVICES);
    }

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getActionBar().setDisplayHomeAsUpEnabled(true);
    }
}
 
开发者ID:benbek,项目名称:HereAStory-Android,代码行数:30,代码来源:ListMomentsActivity.java

示例10: onCreate

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.multi_moment_activity);
    PlusOptions options = PlusOptions.builder().addActivityTypes(MomentUtil.ACTIONS).build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(Plus.API, options)
            .addScope(Plus.SCOPE_PLUS_LOGIN)
            .build();

    mListAdapter = new ArrayAdapter<String>(
            this, android.R.layout.simple_list_item_1, MomentUtil.MOMENT_LIST);
    mMomentListView = (ListView) findViewById(R.id.moment_list);
    mMomentListView.setOnItemClickListener(this);
    mResolvingError = savedInstanceState != null
            && savedInstanceState.getBoolean(STATE_RESOLVING_ERROR, false);

    int available = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (available != CommonStatusCodes.SUCCESS) {
        showDialog(DIALOG_GET_GOOGLE_PLAY_SERVICES);
    }

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        getActionBar().setDisplayHomeAsUpEnabled(true);
    }
}
 
开发者ID:benbek,项目名称:HereAStory-Android,代码行数:29,代码来源:MomentActivity.java

示例11: setPlusApiOptions

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
/**
 * Sets the options to pass when setting up the Plus API. Call before
 * setup().
 */
public void setPlusApiOptions(PlusOptions options) {
    doApiOptionsPreCheck();
    mPlusApiOptions = options;
}
 
开发者ID:AndreFCruz,项目名称:feup-lpoo-armadillo,代码行数:9,代码来源:GameHelper.java

示例12: setPlusApiOptions

import com.google.android.gms.plus.Plus.PlusOptions; //导入依赖的package包/类
/**
 * Sets the options to pass when setting up the Plus API. Call before
 * setup().
 */
public void setPlusApiOptions(PlusOptions options)
{
    doApiOptionsPreCheck();
    this.mPlusApiOptions = options;
}
 
开发者ID:overengineering,项目名称:space-travels-3,代码行数:10,代码来源:GameHelper.java


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