Floating Action Button for lower version

前端 未结 6 1676
灰色年华
灰色年华 2020-12-03 04:06

Is there a way I can Achieve the floating button to work on 4.0 and later android??

I\'ve seen it on google plus but I haven\'t found any tutorial. Only for android

相关标签:
6条回答
  • 2020-12-03 04:19

    Try this library, https://github.com/navasmdc/MaterialDesignLibrary

    It can be easily to adapt to your project using Android Studio

    0 讨论(0)
  • 2020-12-03 04:26

    You can use this demo FloatingView. This demo work from API 11.

    Here put all the parts necessary to implement by code. FloatingView by steps

    0 讨论(0)
  • 2020-12-03 04:28

    You can now use the FloatingActionButton from the support-design library. Add this dependency to your gradle build file:

    compile 'com.android.support:design:22.2.0'
    

    And then add the FloatingActionButton to your layout file:

     <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end|bottom"
            android:layout_margin="@dimen/fab_margin"
            android:src="@drawable/ic_done" />
    

    Example project from Chris Banes: https://github.com/chrisbanes/cheesesquare.

    0 讨论(0)
  • 2020-12-03 04:29

    Here is one aditional free Floating Action Button library for Android It has many customizations and requires SDK version 9 and higher

    enter image description here

    Full Demo Video

    dependencies {
        compile 'com.scalified:fab:1.1.2'
    }
    
    0 讨论(0)
  • 2020-12-03 04:32

    Original post is here.

    You can use this library, it works well from the Android 2.1, API level 7.

    It's so easy to include it in your project:

    build.gradle

    dependencies {
        compile 'com.shamanland:fab:0.0.6'
    }
    

    layout.xml

    <com.shamanland.fab.FloatingActionButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/your_image"
        />
    

    image

    0 讨论(0)
  • 2020-12-03 04:33

    I created an open-source library called FloatingActionButton. It's a Google+ like floating action button which reacts on the list view scrolling events. Becomes visible when the list view is scrolled up and invisible when scrolled down. API level 14+.

    Demo

    0 讨论(0)
提交回复
热议问题