1
我想将Google +按钮添加到我的应用中。我跟着这个指令: https://developers.google.com/+/mobile/android/recommend向布局添加Android Google PlusOneButton会导致编译错误
我既无法实现类PlusOneButton,也不是将XML标签:<com.google.android.gms.plus.PlusOneButton/>
二进制XML文件行#31:二进制XML文件行#31:错误充气类com.google.android.gms.plus.PlusOneButton
XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingStart="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:background="@color/primary_light"
android:paddingTop="@dimen/custom_margin_top_bottom"
android:paddingBottom="@dimen/custom_margin_top_bottom">
<TextView
android:id="@+id/nachrichtTv"
android:layout_width="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:singleLine="true"
android:ellipsize="marquee"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.gms.plus.PlusOneButton
android:id="@+id/plus_one_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
</LinearLayout>
如果我不喜欢按钮的设计并想使用常规的按钮。我如何添加行为? – XxGoliathusxX