在Android的日食浮动操作按钮,在单击将导航到另一个活动 [英] Floating Action Button in android eclipse which on clicking will navigate to another activity
本文介绍了在Android的日食浮动操作按钮,在单击将导航到另一个活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要实现在android系统月食浮动的动作按钮,在单击将导航到另一个活动。我不希望它Android Studio中。
I need to implement a floating action button in android eclipse which on clicking will navigate to another activity . I don't want it in Android Studio.
推荐答案
您可以使用官方Android的设计库来创建FAB。
http://developer.android.com/tools/support-library/features html的设计#
You can use official android design library to create FAB . http://developer.android.com/tools/support-library/features.html#design
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"/>
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginRight="15dp"
android:src="@mipmap/image"
app:fabSize="normal"
app:layout_anchor="@id/coordinatorLayout"
app:layout_anchorGravity="bottom|right|end"
app:rippleColor="#F03333"/>
检查如何在Eclipse中添加设计库这样的回答:
在Eclipse 使用支持设计库
Check this answer on how to add design library in eclipse : Using Support Design Library in Eclipse
这篇关于在Android的日食浮动操作按钮,在单击将导航到另一个活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文