當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。