浮动动作按钮问题
我正在尝试在我的应用程序中启动另一个活动。它将打开地图API。 我是新来的,不断收到错误或我的应用程序崩溃。
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_launcher_foreground"
android:contentDescription="@string/title_activity_maps"
android:contextClickable="true"
android:onClick="activity_maps"/>
而且我似乎也无法弄清楚如何使地图活动打开地图。它显示了底角的Google图标,但这就是我所得到的。
谢谢!
I'm trying to make a FAB launch another activity in my Application. It'll open the Maps API.
I'm new at this an keep getting errors or my app crashes.
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_launcher_foreground"
android:contentDescription="@string/title_activity_maps"
android:contextClickable="true"
android:onClick="activity_maps"/>
And I also can't seem to figure out how to make the Maps activity open the map. It shows the Google Icon in the bottom corner but that's all I get.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论