Floating Action Button Without Checkable - java

I've been following this code example from Google about the Floating Action Button in the newest Android library http://developer.android.com/samples/FloatingActionButtonBasic/index.html
This works, as a Checkable button. However, I don't want it to be checkable, I just want to be able to click it and animate it as you'd expect (seems strange the Google example is for a checkable button when it seems like it'd be against their design principles, and others have had problems)
I'm reasonably new to Android, and so far my research has come up with a lot of external libraries, but I'm trying to keep it as native as possible
Is there an interface in Android Java that would allow me to essentially use this as a button? The FAB button example is Checkable and obviously the constructors and methods pertain to that.

#jmo : Please check Android Floating Action Button based on Material Design specification And NQH_FloatingActionButton For sample Purpose . I hope this link will help you http://android-developers.blogspot.in/2015/05/android-design-support-library.html

You should instead use FloatingActionButton, part of the official Android Design Support Library.

Related

Custom button with a selection

I don't know if this has been asked before. I am going to be building a calculator for my dad. He asked me if there is any way to have customization with the buttons.
I have not done any code yet. I plan on trying a few things. My research has come up with nothing.
This is what I am trying to accomplish, I have a feeling it breaks the android studio law of coding. This is the concept:
Imagine the calculator. You have 8 blank buttons above the numbers. Those buttons ordinarily have the functions such as percent and sqrt.,..etc.
I have been asked if it's possible can he just hold the button and change those functions at will.
So the question at hand is. Can I do if statements to change the symbol and the code for a particular button when long pressed?
The concept of the calculator would be in portrait mode he can customize the buttons to the functions he uses without having to turn the calculator in landscape mode?
So in theory you have a long press which would bring up a selector. He can select any math function and based on that function the symbol and code would change and the button will work properly to the new selection?
I was going to to build the calculator as a standard. But was also wondering myself if this is possible. I know the buttons serve as a one function but in coding anything is possible.
Any help or advice would be appreciated. If this can be done it opens new possibilities to app features to only show what you want and not a predefined controls.
*******once I try a few codes I will edit question to better see the issue and what I am trying to do.
OnLongPress show a dialog with the option you want and change the button text according to selected option.
On Onclick check the button text and call function according to the text

Extending Buttons (FAB)

I need to create something similar to this. This may be duplicate, I'm not sure how to search for this. If you press plus it will extend more buttons
Best Regards
There is no longer a need for creating your own FAB nor using a third party library, it was included in AppCompat 22.
https://developer.android.com/reference/android/support/design/widget/FloatingActionButton.html
How to create a floating action button (FAB) in android, using AppCompat v21?

How to create some thing like gmail compose in android app

How I can create some thing like this? Has it any specific name or view? Like red cycle image in below link:
You can create that view using a ListView like its explained there: https://developer.android.com/training/material/lists-cards.html.
You can create the floating button using an oval shape with an image inside and set some elevation. Click here for more info How to create a floating action button (FAB) in android, using AppCompat v21?
Have a look at general Android Material Design Guidelines to get some additional insight for these kind of ui. https://developer.android.com/design/material/index.html
This can be useful for you. I made a "dummy" Gmail UI for show a material activity transition. https://github.com/coyarzun89/FabTransitionActivity

How to make a button that draws over any screen?

Apps like Floating Toucher or Link Bubble proves how useful a floating button can be. And no, I'm not talking about FABs as per Material Design guidelines here, I meant a literally 'floating' button that draw over any screen in the system that can be dragged around and clicked.
Take a look at these examples:
(source: boatmob.com)
Now, I tried to Google a way to do this but I'm afraid I'm still at lost here. How can these apps draw over screens outside their own?
I've come across this SO question which more or less asking about a similar question. But to be honest, I wasn't able to gain much information from it. Said question mainly addressed how to intercept a touch for a floating view; Not how to specifically make one.
I really hope that somebody out there could enlighten me on this. Thanks in advance for your time!
If you are talking about an activity's view (not Widgets), 'floating' on screen, like Facebook ChatHeads. Then you should create a background service and attach a view with it. Though it is not recommend by Android.
See below links
What APIs in Android is Facebook using to create Chat Heads?
http://www.piwai.info/chatheads-basics/

How to implement "step-by-step" UI pattern in Android?

I have a task to port some Iphone app to Android. I've faced a problem. App should include step-by-step answering questions. I wonder, how to implement this feature. I thought about FragmentActivity, wich switches between predefined types of Fragments (I have static types of questions and answers, which are received from back-end).
Here is the iPhone screenshot:
Check out the ViewFlipper. It allows you to flip through several views. You could make one view for each question and then iterate through them
I would recommend ViewPager with fragments. You can disable scrolling and select next page on specific action.
here is a tutorial from google
You could just implement a state diagram and inflate layouts according to your diagram if you have a finite count of state with static information.

Categories

Resources