Questions tagged [floating]

This tag is related to GUI elements that either should be or appear to be floating above a panel or background, or in case of certain types of general layout.

This tag is related to GUI elements that either should be or appear to be floating above a panel or background, or in case of certain types of general layout.

800 questions
103
votes
10 answers

Convert double to float in Java

I am facing an issue related to converting double to float. Actually, I store a float type, 23423424666767, in a database, but when we get data from the database in the below code, getInfoValueNumeric(), it's of double type. The value we get is in…
Sitansu
  • 3,225
  • 8
  • 34
  • 61
102
votes
1 answer

Set precision of std::to_string when converting floating point values

In C++11, std::to_string defaults to 6 decimal places when given an input value of type float or double. What is the recommended, or most elegant, method for changing this precision?
learnvst
  • 15,455
  • 16
  • 74
  • 121
39
votes
5 answers

Moving Floating Action Button up and down to avoid getting blocked by a snackbar

I'm using this library to implement a floating action bar and I can't seem to find a way to move the button when a snackbar appears on screen. Is it even possible with that library?
naja
  • 571
  • 1
  • 4
  • 13
37
votes
2 answers

Floating images in Github Readme

How would I go about doing this? Putting the following code into the Markdown generator gives me the desired output
I'm trying not to, kid. Don't act so surprised,…
yttrium
  • 405
  • 4
  • 8
29
votes
2 answers

How to float an element left with full height of the wrapper?

HTML:
Foo
Text row 1
Foo Bar
Text row…
Martin
  • 2,007
  • 6
  • 28
  • 44
26
votes
1 answer

Check empty float or integer value in golang

I'm trying to check if my integer or float value is empty. But type error is thrown. Tried: if foo == nil //Error: cannot convert nil to type float32 //all other methods I Tried also throw type errors too
Alishan Khan
  • 522
  • 1
  • 4
  • 13
23
votes
4 answers

How do I get a float value when dividing two integers? (PHP)

Hi I am trying to divide two integers ex: 12/13 but I always get a whole integer 1 not a decimal number. I tried type casting the values to float before hand with no success. Basically all I want is a decimal result like: 0.923... $x = 12; $y =…
user1869257
  • 505
  • 2
  • 6
  • 16
20
votes
6 answers

View can not be anchored to the the parent CoordinatorLayout

this is not my app, this is nordic app that put its source on github and I am trying to run the soutce on my machine. but i keep having this error : 03-07 07:12:13.641 12622-12622/com.noxel.apppaneladmintry2 E/AndroidRuntime﹕ FATAL EXCEPTION:…
15
votes
6 answers

Make only one widget float above the keyboard in Flutter

I want to display a "Close keyboard" button above the keyboard when it is visible. I know that the resizeToAvoidBottomInset can impact how the keyboard interact with the rest of the application, however it doesn't do exactly what I want. I have a…
leb1755
  • 1,386
  • 2
  • 14
  • 29
15
votes
3 answers

Floating view on Android screen

I was trying to make a floating view which user can drag around on the screen. The idea is to launch a service and then inflate a view on the screen. But there's a problem, instead of taking the event belongs to itself, it takes all the user input…
shanwu
  • 1,493
  • 6
  • 35
  • 45
13
votes
5 answers

Draggable drawer with a handle (instead of action bar) on top of other apps

Background We all know we can use a navigation drawer as a new way to navigate in an app (even with a library, like this one) . We also know that some apps can float above others (as shown on AirCalc, and done like so) ,using a SYSTEM_ALERT_WINDOW…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
13
votes
1 answer

Why does float.parse return wrong value?

I have a problem. when I parse a string like "0.005" to float or double, it works fine on my computer, but when i install my program to my client's computer, it returns 5. (both my computer and my client's computer are using Windows 7 x64). Here are…
Victor
  • 192
  • 1
  • 2
  • 7
11
votes
2 answers

Flutter: How to make a Card overlap the AppBar?

How can I make a Card in Flutter that overlaps the AppBar? Negative margins are not possible as far as I know. See the image for clarity.
hendra
  • 2,531
  • 5
  • 22
  • 34
11
votes
2 answers

Set printf() value in a PHP variable

I have a php script that show a time like: 9.08374786377E-5 , but i need plain floating value as a time like : 0.00009083747..... Thats why i just print it with float like that:
Rontdu
  • 223
  • 1
  • 2
  • 10
10
votes
1 answer

How facebook app implements draggable floating Button

I´m trying to get some information about how I could implement such a Button like Facebook does in the new version of the app. Actually I am not sure if this button comes from Facebook or from Facebook messenge app but it was the easiest way to have…
Carlos Morera
  • 377
  • 4
  • 12
1
2 3
53 54