我有一个Observables列表(RxJava 1).
List<Observable> observableList = new ArrayList<>();
Run Code Online (Sandbox Code Playgroud)
它可以包含至少1个Observable.每个都有相同类型的结果.
如何压缩所有Observable的结果?
我想到了zip-operator但它不支持List,我不知道可观察量的数量(可以是1,2,3,4 ....)
我的 Android 应用程序用于广播信标,这些信标作为带有 URL 链接的通知传送到附近的设备。
谷歌宣布他们将关闭这项服务。
他们推荐使用Proximity Beacons API
阅读文档后,我知道我需要通过 REST-API 注册每个信标,使用 OAuth 和 API 进行身份验证(同时),他们还说了一些关于 Google Places 的内容等等。
看起来很复杂。
我不明白:这些信标会通过我的 URL 链接通过 Nearby 传送给附近的用户吗?以前是怎么工作的。
也许有一个Android库?我找到了这个。但它仅用于“扫描”。我不明白是为了什么。像以前那样向附近的其他设备广播信标是不可能的吗?
谢谢
android google-beacon-platform beacon google-nearby google-proximity-api
我希望ImageView位于我的工具栏和内容之间(带有内容的布局).工具栏无法展开.
我怎样才能做到这一点?
我是这样做的:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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="wrap_content">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleTextAppearance="@style/AppTheme.ToolbarText" />
</android.support.design.widget.AppBarLayout>
<android.support.percent.PercentRelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical">
<android.support.percent.PercentRelativeLayout
android:id="@+id/viewB"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/advantages_background"
app:layout_heightPercent="100%">
....
</android.support.percent.PercentRelativeLayout>
</android.support.percent.PercentRelativeLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_anchor="@id/appBarLayout"
app:layout_anchorGravity="bottom|center">
<ImageView
android:id="@+id/fab"
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/advantages_circle" />
...
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)
我得到了这个(工具栏与我的圆圈重叠):
我该如何解决?
我想ImageView(我的FrameLayout)重叠工具栏(锚)