Skip to content Skip to sidebar Skip to footer

Floating Action Button In Android Eclipse Which On Clicking Will Navigate To Another Activity

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.

Solution 1:

You can use official android design library to create FAB . http://developer.android.com/tools/support-library/features.html#design

<android.support.design.widget.CoordinatorLayoutandroid: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"><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"><android.support.v7.widget.RecyclerViewandroid:id="@+id/recycler_view"android:layout_width="match_parent"android:layout_height="match_parent"android:scrollbars="vertical"/></RelativeLayout><android.support.design.widget.FloatingActionButtonandroid: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"/>

Check this answer on how to add design library in eclipse : Using Support Design Library in Eclipse

Solution 2:

I think I found a work around for your problem:

Here is a link http://www.truiton.com/2015/04/floating-action-buttons-android/

Now here instead of actually compiling the gradle, you will have to download the jar files and add them to eclipse.

Then follow the instructions on the developer website: http://developer.android.com/tools/support-library/setup.html#libs-with-res

Look at the tab under eclipse.

If that does not work for you check this out : https://github.com/alopix/Android-FloatingActionButton-Eclipse (But check the first solution first)

Post a Comment for "Floating Action Button In Android Eclipse Which On Clicking Will Navigate To Another Activity"