use of com.google.api.ads.admanager.axis.v202111.User in project openstack4j by ContainX.
the class KeystoneUserServiceTests method getUser_byName_byDomainId_Test.
/**
* returns the user specified by name and domain.
*
* @throws Exception
*/
public void getUser_byName_byDomainId_Test() throws Exception {
respondWith(JSON_USER_GET_BYNAME_BYDOMAINID);
User user = osv3().identity().users().getByName(USER_NAME, USER_DOMAIN_ID);
assertEquals(user.getName(), USER_NAME);
assertEquals(user.getId(), USER_ID);
assertEquals(user.getDomainId(), USER_DOMAIN_ID);
}
use of com.google.api.ads.admanager.axis.v202111.User in project Douya by DreaminginCodeZH.
the class UserResource method get.
@Override
public User get() {
User user = super.get();
if (user == null) {
// Can be called before onCreate() is called.
ensureArguments();
user = mExtraUser;
}
return user;
}
use of com.google.api.ads.admanager.axis.v202111.User in project Douya by DreaminginCodeZH.
the class NavigationHeaderLayout method bindActiveUser.
private void bindActiveUser() {
mActiveAccount = AccountUtils.getActiveAccount();
User user = mAdapter.getUser(mActiveAccount);
if (user != null) {
bindAvatarImage(mAvatarImage, user.getLargeAvatarOrAvatar());
mNameText.setText(user.name);
if (!TextUtils.isEmpty(user.signature)) {
mDescriptionText.setText(user.signature);
} else {
// noinspection deprecation
mDescriptionText.setText(user.uid);
}
} else {
SimpleUser partialUser = mAdapter.getPartialUser(mActiveAccount);
bindAvatarImage(mAvatarImage, null);
mNameText.setText(partialUser.name);
// noinspection deprecation
mDescriptionText.setText(partialUser.uid);
}
mAvatarImage.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if (mAccountTransitionRunning) {
return;
}
if (mListener != null) {
mListener.openProfile(mActiveAccount);
}
}
});
mAvatarImage.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
if (mAccountTransitionRunning) {
return false;
}
if (mListener != null) {
mListener.openProfile(mActiveAccount);
}
return true;
}
});
// mBackdropImage.setImageResource();
}
use of com.google.api.ads.admanager.axis.v202111.User in project Douya by DreaminginCodeZH.
the class NavigationHeaderLayout method bindRecentUser.
private void bindRecentUser(ImageView avatarImage, final Account account) {
if (account == null) {
avatarImage.setVisibility(GONE);
return;
}
avatarImage.setVisibility(VISIBLE);
User user = mAdapter.getUser(account);
if (user != null) {
bindAvatarImage(avatarImage, user.getLargeAvatarOrAvatar());
} else {
bindAvatarImage(avatarImage, null);
}
avatarImage.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
switchToAccountWithTransitionIfNotRunning(account);
}
});
avatarImage.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
if (mAccountTransitionRunning) {
return false;
}
if (mListener != null) {
mListener.openProfile(account);
}
return true;
}
});
}
use of com.google.api.ads.admanager.axis.v202111.User in project Village_Defense by Plajer.
the class ArenaUtils method bringDeathPlayersBack.
public static void bringDeathPlayersBack(Arena arena) {
for (Player player : arena.getPlayers()) {
if (!arena.getPlayersLeft().contains(player)) {
User user = UserManager.getUser(player.getUniqueId());
user.setFakeDead(false);
user.setSpectator(false);
arena.teleportToStartLocation(player);
player.setFlying(false);
player.setAllowFlight(false);
player.setGameMode(GameMode.SURVIVAL);
arena.showPlayers();
player.getInventory().clear();
user.getKit().giveKitItems(player);
player.sendMessage(ChatManager.colorMessage("In-Game.Back-In-Game"));
}
}
}
Aggregations