【发布时间】:2016-12-05 08:02:54
【问题描述】:
我这里有一个 ListView -:
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/main_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_main">
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/colorGrey"
android:dividerHeight="5dp"
tools:listitem="@layout/item" />
</android.support.v4.widget.SwipeRefreshLayout>
还有一个自定义项-:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/ic_image_black_24dp"
android:contentDescription="@string/description" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/app_name" />
<com.google.android.gms.plus.PlusOneButton xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus"
android:id="@+id/plus_one_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
plus:annotation="inline"
plus:size="standard" />
</LinearLayout>
我推导出一个建议列表。我希望每个提案都有自己的按钮,但是当我添加一个没有键的按钮时,我没有然后就没有了!
dependencies {
...
compile 'com.google.android.gms: play-services: 10.0.0'
compile 'com.google.android.gms: play-services-auth: 10.0.0'
compile 'com.google.android.gms: play-services-plus: 10.0.0'
}
预览给 item.xml 这个 -:
我在谷歌上搜索了这个问题并找到了一条评论,他在评论中写道,如果 juzat 库 com.google.android.gms: play-services 以上 7 版本,就会出现这个问题,所以我不认为谷歌投入了 Prodakshen 不工作的版本并且由于它已经超过 10 次,我怀疑他们更改了 api 密钥或类似的东西,我在此文档的帮助下从 google 集成了按钮:https://developers.google.com/+/mobile/android/recommend 是旧文档并且有新文档?
【问题讨论】:
标签: android android-studio google-api google-play-services google-plus