Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,734,168 Members 51,486 Now Online
XDA Developers Android and Mobile Development Forum

[Library] Floating Action Button from Android L on Kitkat and below

Tip us?
 
EMINEM786
Old
#11  
EMINEM786's Avatar
Senior Member
Thanks Meter 23
Posts: 125
Join Date: Oct 2013
Location: mumbai

 
DONATE TO ME
Quote:
Originally Posted by Quinny899 View Post
Hi @Faiz Malkani

I managed to backport this to 2.1+, sources are here:
https://github.com/Quinny898/Floatin...nButton-Compat

Here's what the sample project looks like (not included, it's the same + AppCompat, which is complicated to add):
great work
 
prithvee
Old
(Last edited by prithvee; 18th July 2014 at 07:01 AM.)
#12  
prithvee's Avatar
Senior Member
Thanks Meter 257
Posts: 212
Join Date: Oct 2012
Location: Mangalore
looks FABULOUS using it in my next app .. thanks
TRY MY NEW GAME: SUM TEN ONLY FOR THOSE WHO HATE AND DONT HATE MATH.


SUM TEN ON XDA

SUM TEN ON AMAZON
SUM TEN ON CHRISTMAS
SUM TEN ON DIWALI
SUM TEN ON EED


SUM TEN ANYTIME
SUM TEN ANYWHERE
SUM TEN ALWAYS



 
Exquisite Apps
Old
#13  
Exquisite Apps's Avatar
Member
Thanks Meter 28
Posts: 43
Join Date: May 2014
Lightbulb Idea

Hey, thank you for your effort. The FAB looks really good.

To further follow the new design guideline I would suggest that you extend your
Code:
setFabDrawable(Drawable fabDrawable)
method by one line.


Code:
public void setFabDrawable(Drawable fabDrawable)
    {
        Drawable myDrawable = fabDrawable;
        mBitmap = ((BitmapDrawable) myDrawable).getBitmap();
        mBitmap = Bitmap.createScaledBitmap(mBitmap, dpToPx(24), dpToPx(24), true);
        invalidate();
    }
This makes the fabIcon as big as it should be regardless the source.


Thanks anyways.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes