本文整理汇总了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();
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
示例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;
}
示例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();
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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;
}