我正在使用Google plus api在我的应用程序上显示+1按钮。我正在构建最新版本的Google play服务(8.3),并在Nexus 9上进行测试(更新为棉花糖和8.3.01 Google play服务)
但它仍然显示了+1按钮的旧设计。

如何显示新设计。

我在布局文件中使用的代码:
<com.google.android.gms.plus.PlusOneButton android:id="@+id/plus_one_button"
xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:focusable="true"
android:minHeight="24dp"
plus:annotation="inline"
plus:size="medium" />发布于 2015-11-20 04:34:51
您是否可以检查您的activity,以确保您以这种方式初始化了它:
private static final int PLUS_ONE_REQUEST_CODE = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mPlusClient = new PlusClient(this, this, this);
mPlusOneButton = (PlusOneButton) findViewById(R.id.plus_one_button);
}
protected void onResume() {
super.onResume();
// Refresh the state of the +1 button each time the activity receives focus.
mPlusOneButton.initialize(URL, PLUS_ONE_REQUEST_CODE);
}其中:- URL是要+1'd的Google页面的地址
另外,我假设您在到达这里之前已经完成了所有这些https://developers.google.com/+/mobile/android/getting-started,因为您正在看到所需的结果。
https://stackoverflow.com/questions/33813378
复制相似问题