Android浮動按紐:Floating Action Button library for Android

一個浮動按鈕,擁有許多自定義的屬性。浮動的操作按鈕被用于一種特殊類型的促進作用。它們是由一個圓圈圖標漂浮在UI上述區分,并有相關的變形,發射,并轉印錨點特殊運動行為。

//Button type
actionButton.setType(FloatingActionButton.Type.MINI);

//Button colors actionButton.setButtonColor(getResources().getColor(R.color.fab_material_lime_500)); actionButton.setButtonColorPressed(getResources().getColor(R.color.fab_material_lime_900));

//Image actionButton.setImageDrawable(getResources().getDrawable(R.drawable.fab_plus_icon)); actionButton.setImageSize(24.0f);

//Shadow actionButton.setShadowColor(Color.parseColor("#757575")); actionButton.setShadowRadius(1.0f); actionButton.setShadowXOffset(0.5f); actionButton.setShadowYOffset(1.0f);

//Stroke actionButton.setStrokeColor(getResources().getColor(R.color.fab_material_blue_grey_500)); actionButton.setStrokeWidth(1.0f);

//Animations actionButton.setAnimationOnShow(FloatingActionButton.Animations.ROLL_FROM_DOWN); actionButton.setAnimationOnHide(FloatingActionButton.Animations.ROLL_TO_DOWN);</pre>

Animations

The Library has several predefined animations:

Fade In - Fade Out Roll From Down - Roll To Down Jump From Down - Jump To Down
Android浮動按紐:Floating Action Button library for Android Android浮動按紐:Floating Action Button library for Android Jump From Down - Jump To Down

項目主頁:http://www.baiduhome.net/lib/view/home/1423722805311

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!