ASP源码.NET源码PHP源码JSP源码JAVA源码DELPHI源码PB源码VC源码VB源码Android源码
当前位置:首页 >> 低调看直播体育app软件下载 >> Android开发 >> Android 50新控件——FloatingActionButton(悬浮按钮)

Android 50新控件——FloatingActionButton(悬浮按钮)

来源:网络整理     时间:2015-12-30     关键词:

本篇文章主要介绍了"Android 50新控件——FloatingActionButton(悬浮按钮)",主要涉及到方面的内容,对于Android开发感兴趣的同学可以参考一下: Android 5.0新控件——FloatingActionButton(悬浮按钮)FloatingActionButton是5.0以后的新控件,一个悬浮按钮,...

Android 5.0新控件——FloatingActionButton(悬浮按钮)

FloatingActionButton是5.0以后的新控件,一个悬浮按钮,之所以叫做悬浮按钮,主要是因为自带阴影属性,看上去像是悬浮的而已,其实就可以简单理解成一个带有阴影效果的Button。

效果图

Android 50新控件——FloatingActionButton(悬浮按钮)

使用

使用方法和Button一样
有的文章说FloatingActionButton在5.x版本上有Bug,没有阴影效果,我个人理解是因为SDK版本不同,对应效果也有所不同,而不是Bug,如果非想要5.x的系统显示4.x效果,可以看下相关的文章。

导入SDK

用前先导入依赖

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

布局

<>.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@android:drawable/ic_dialog_email" />
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了Android 50新控件——FloatingActionButton(悬浮按钮),包括了方面的内容,希望对Android开发有兴趣的朋友有所帮助。

    本文网址链接:http://www.codes51.com/article/detail_267327.html

    相关图片

    相关文章