New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to change the FloatingActionsMenu 's plus icon to other ones? #56
Comments
Already answered in #41:
Right now == forseeable future, unless someone comes up with a great, generic solution and implements it. |
Here's an idea: If the FAM icon is set to anything (ie. not the default plus), then as the action menu expands out, that icon rotates about an axis in the plane of the screen (instead of perpendicular, like the current animation), revealing an "X". The reverse animation happens on collapse. This is hard to convey in words, but imagine you are looking down at a roller which is moving a piece of paper. As the paper slides out, the roller turns, revealing a different side. The direction that the icon rolls would depend on:
If this sounds like a great, generic solution then I can have a stab at implementing it :) |
It is generic indeed, but I wouldn't call it great. I'm leaning towards the Inbox approach, i.e. changing icon and replacing close action with custom action. |
👍 for the option to replace + icon. Really most wanted feature too |
The ability to achieve what Inbox does with the FAM would be excellent. |
Please add it, because + isn't just enough to describe what that FOA is going to do.. Inbox solution is great! ;) Maybe you can start with just static icon (no animation at all, when user defined an icon) |
well i have made some changes in code to be able to change icon inside of the floatingMenu. instead of adding AddFloatingButton i add FloatingButton plus i have made changes and added new attr to make the drawable works. i'll be requesting pull request. |
Joining the request |
@tamiof The proguard issue was fixed in 1.2.0. I just checked the output of |
This is my proguard config. It's an old project that was handed to me so things might be out of date or conflicted -optimizationpasses 5 #When not preverifing in a case-insensitive filing system, such as Windows. Because this tool unpacks your processed jars, you should then use: #Specifies not to ignore non-public library classes. As of version 4.5, this is the default setting #Preverification is irrelevant for the dex compiler and the Dalvik VM, so we can switch it off with the -dontpreverify option. #Specifies to write out some more information during processing. If the program terminates with an exception, this option will print out the entire stack trace, instead of just the exception message. #The -optimizations option disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle. Note that the Dalvik VM also can't handle aggressive overloading (of static fields). #To repackage classes on a single package #Uncomment if using annotations to keep them. -printmapping proguard.map m libraries#-libraryjars /libs/android-query-full.0.26.7.jar -keepclassmembers class * extends com.actionbarsherlock.ActionBarSherlock { #Keep classes that are referenced on the AndroidManifest #To remove debug logs: #To avoid changing names of methods invoked on layout's onClick. #Maintain java native methods #To maintain custom components names that are used on layouts XML. #To maintain custom components names that are used on layouts XML: -keepclasseswithmembers class * { -keepclasseswithmembers class * { #Maintain enums #To keep parcelable classes (to serialize - deserialize objects to sent through Intents) #Keep the R ADDITIONAL OPTIONS NOT USED NORMALLY#To keep callback calls. Uncomment if using any #Uncomment if using Serializable -keepclassmembers class * implements android.os.Parcelable { ##---------------Begin: proguard configuration for Gson ---------- #For using GSON @expose annotation #Gson specific classes #Application classes that will be serialized/deserialized over Gson ##---------------End: proguard configuration for Gson ---------- |
@tamiof Please create a gist with this config, it got completely mangled by github markdown. And one more obvious question, just to confirm - are you using gradle to build your projects? |
@chalup this particular project does not use gradle build. Any chance switching to gradle might fix this issue? I've been postponing it for a while so this might be a good time to switch to gradle |
@tamiof no need to switch to gradle, you just have to add this proguard rules: https://github.com/futuresimple/android-floating-action-button/blob/master/library/consumer-proguard-rules.pro Were you using gradle, the build system would apply these rules to your build automatically. |
Is it possible to change AddFloatingActionButton background color for the FloatingActionsMenu programatically? |
@rubdottocom this issue is tracked in #49 |
Ooops! Sorry, thank you :-) |
@chalup guess I somehow missed on those particular rules. 10x! |
Any new progress for this issue? If approved, I would like to solve it like here: http://eichefam.net/2014/10/27/inbox-fab/ |
Here is how I fixed the problem with adding icon on the menu button: Hope it helps. |
@nasko700 lol, good trick 💃 |
@nasko700 : Thank you. You rock |
Thanks a lot
The text was updated successfully, but these errors were encountered: