gpt4 book ai didi

android Google plus登录自定义

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:38:06 25 4
gpt4 key购买 nike

我正在创建一个 Android 应用程序,现在我正在实现社交网络登录。

Facebook 按钮没问题,但 google+ 按钮使用的语言与 facebook 不同。另外,它只说“登录”,我想让它说“用谷歌登录”

我是 android 程序的新手,看到我需要制作一个自定义按钮,但不知道该怎么做(从哪里开始,如何调用它)并使其看起来像 google plus one。

谁能给我一点帮助?

谢谢

最佳答案

尝试使用此功能更改 google plus 按钮文本。

protected void setGooglePlusButtonText(SignInButton signInButton,
String buttonText) {
for (int i = 0; i < signInButton.getChildCount(); i++) {
View v = signInButton.getChildAt(i);

if (v instanceof TextView) {
TextView tv = (TextView) v;
tv.setTextSize(15);
tv.setTypeface(null, Typeface.NORMAL);
tv.setText(buttonText);
return;
}
}
}

关于android Google plus登录自定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24719269/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com