Android :: Add Floating Point Value To Resources / Values
Jul 19, 2010I'm trying to add a little space between lines to my Text Views using android:lineSpacingMultiplier
from the documentation: Code...
I'm trying to add a little space between lines to my Text Views using android:lineSpacingMultiplier
from the documentation: Code...
I've begun playing with the android NDK. One of the things I've just learnt is about creating an application.mk file to specify the armv7 abi. I'm building the san-Angeles example with the following parameters. Code...
View 1 Replies View RelatedI've started developing an OpenGL ES app and I would like to get the best possible performace (as everybody, I guess).
As far as I know, HTC Magic (myTouch, G2) doesn't have floating point unit, so I think every calculation is done internally with fixed point math. That beign the case, altough I fed OpenGL with floating point vertex positions and normals, there would not be any permormace penalty since it would be using integer math instead of floating point emulation.
I have been searching about the floating point support on G1 phone (aka the HTC Dream phone) for a few hours.
So far, my conclusion is that the ARM-based Qualcomm MSM7201 CPU does not have VFP (floating point coprocessor) and therefore floating point calculations have to be done via software-float.
This is quite disappointing as I am interested in developing applications with heavy math.
However, I also notice that the Qualcomm CPU has QDSP4000™ and QDSP5000™ high-performance digital signal processors (DSP), according to http://www.qctconnect.com/products/msm_7201.html
Therefore, here is my question: would it be possible to leverage the DSP modules in the MSM7201 CPU to do the floating point math?
Also, I would like to develop the heavy-math modules in C/C++ and call it via JNI, and so I just want to double-check whether this is a feasible approach.
I'm currently developing a application on a HTC Dream aka T-mobile G1. afaik the processor has a FPU coprocessor, called VFP (Vector Floating Point) in ARM terms. So far I couldn't find any information about if the FPU is used for floating point calculations or if those are emulated in software. does anyone have any information about that? the opengl implementation supports both fixed point and floating point. will my applications be slower when I'm using floating point, because they get transformed into fixed point internally? or is floating point implemented in hardware?
View 5 Replies View RelatedOpenGL ES allows values to be specified in either fixed point or floating point format, but I haven't been able to find any information about how this is actually implemented on Android devices. Are there actually two different pipelines, one for fixed point and one for floating point? If so, what happens if you mix and match them, such as specifying your matrix in floating point but your vertices in fixed point? Alternatively, does it implement everything with just one format internally, and convert the other format to it as necessary? If so, then you presumably get the best performance if you always specify values in the internal format so as to avoid conversions. How then can I determine which format is used internally?
View 9 Replies View RelatedI need maths for my game physics and lots of them, so I use the. Math library. And guess what? I never casted so much to floats in my entire life. And i know how costly it is to use doubles on an embedded device because I read the performance optimization page in the google android sdk docs. So I am wondering if we couldn't get a Math package with functions taking and returning floats instead of the default doubles. e.g. Math.sinf Math.cosf.
View 3 Replies View RelatedIs there a way to determine if the system supports floating point? That way, I could choose between two algorithms to use.
View 4 Replies View RelatedI'm trying to decide on whether to primarily use floats or ints for all 3D-related elements in my app (which is C++ for the most part). I understand that most ARM-based devices have no hardware floating point support, so I figure that any heavy lifting with floats would be noticeably slower. However, I'm planning to prep all data for the most part (i.e. have vertex buffers where applicable and transform using matrices that don't change a lot), so I'm just stuffing data down OpenGL's throat. Can I assume that this goes more or less straight to the GPU and will as such be reasonably fast? (Btw, the minimum requirement is OpenGL ES 2.0, so that presumably excludes older 1.x-based phones.)Also - how is the penalty when I mix and match ints and floats? Assuming that all my geometry is just pre-built float buffers, but I use ints for matrices since those do require expensive operations like matrix multiplications, how much wrath will I incur here. By the way, I know that I should keep my expectations low (sounds like even asking for floats on the CPU is asking for too much), but is there anything remotely like 128-bit VMX registers?
View 2 Replies View RelatedI want to have some static numeric and text values as an application resource. For example my data is like this:
Levels 5 First_Level 500 60 1 Second_Level 500 80 1 Third_Level 200 60 1 Fourth_Level 130 30 2 Final_Level 100 30 3... and another 300 lines...
The format and order of the data is predefined and guaranteed to be valid.
I could read it with java.util.Scanner, but it's extremely slow in Android, reading a 10 KB file takes minutes. It's slow because of the regular-expression-based pattern matching inside (when I traceview'ed it).
I apologize if this code looks a bit like a mess (considering the length); I figured I'd just include everything that goes on in my program at the moment.
I'm attempting to create a fairly simple Tic Tac Toe app for Android. I've set up my UI nicely so far so that there are a "grid" of TextViews. As a sort of "debug" right now, I have it so that when one clicks on a TextView, it should display the value of buttonId in a message box. Right now, it displays the correct assigned value for the first element I click, but no matter what I click afterwards, it always just displays the first value buttonID had. I attempted to debug it but couldn't exactly find a point where it would pull the old value (to the best of my knowledge, it reassigned the value).
There's a good possibility I'm missing something small, because this is my first Android project (of any note). Can someone help get different values of buttonId to appear or point out the error in my logic? The code...
If there's anyway way I to access the String values of String resources statically? e.g. a static equivalent of Context.getString(...)?
View 5 Replies View RelatedI want to ask where does the defaults values of memory min-free values of a Rom reside? I mean what file I would have to edit to edit those values?
View 1 Replies View RelatedIn my Android project, I want to loop through the entire collection of Drawable resources. Normally, you can only retrieve a specific resource via its ID using something like:
InputStream is = Resources.getSystem().openRawResource(resourceId)
However, I want to get all Drawable resources where I won't know their ID's beforehand. Is there a collection I can loop through or perhaps a way to get the list of resource ID's given the resources in my project?
Or, is there a way for me in Java to extract all property values from the R.drawable static class?
When the AVD screen is in an Eclipse frame there is a button on the frame to rotate orientation. How do I cause the same action when the AVD screen is floating outside Eclipse?
View 4 Replies View RelatedHow to add a floating bar that will stay at the top of a layout page, even when a user is scrolling through the contents of that layout?
View 1 Replies View RelatedWhat is this widget called (the one with the three buttons).
View 4 Replies View RelatedI wonder how to make floating buttons, like the zoom button in the build-in web browsee?
Actually there are 2 things i'd like to know:
1. How to make a view(button) floating above other views? 2. How to make the fade in/fade out effect regarding to touch screen?
I am a developer and recently completed the implementation of my keyboard MessagEase. It's available on the Market (with its very- different features, making it quite unlike QWERTY).
This keyboard works fine as a replacement of the standard keyboard on an Android Phone. But for a An Android Tablet, it would work best if it's implemented as a floating, movable keyboard.
(the footprint of this keyboard is mostly dependable on the size of a human's finger; it remains the same even if the tablet's display is much larger than a phone's. Therefore it'll take a relatively smaller area on a tablet.)
If I use the current SDK hooks, it will have to take a significant portion of the screen, defeating the purpose.
It's kind of hard to explain, but an example of what I'm wanting to accomplish is like this: thought about generating the layout in html and using a web view, but I need to be able to perform an action when the user clicks on the image. Does anyone have any ideas?
View 1 Replies View RelatedI want to create layout like this on facebook app. Тo appear with effect from bottom to top.I don't know where to find example (xml and code) for this.
View 2 Replies View RelatedI love Android, coming over from the Iphone i have Tmobile Pulse!
I love how Android had "Floating Apps" Apps which run on there own in the background, like facebook?
Is there anymore apps like this, which can do the same, a Gmail one would be awesome or news feed (RSS)
Also on my Android i have a big cluttered messy list off apps on one page, looks like this, comes with some games i don't want. How can i get rid of them ?
I would like to have the following screen in my application: button at the bottom of the screen; when user presses the button, a list with a number of items will appear and user should be able to click one of those to start another activity. The number of items can be different (depending on some other conditions); the popup is to be adjusted to the button. How would you suggest implementing this?
View 3 Replies View RelatedI've got a ListActivity using the Theme.Dialog theme and windowNoTitle set to true.
Unfortunately, when I do this, the header rows (just normal rows in the list but they look like sub headers) refuse to fill_parent width (instead, they wrap_content - the header text).
I noticed this was not a problem when using the Theme theme so I started narrowing everything down to what was causing the problem.
The answer: windowIsFloating. Theme.Dialog sets this to true, and if I override this to false, then the headers happily fill the parent width.
Is there a way around this (because I would like to set windowIsFloating to true)?
I'm having a problem with floating windows. My activity has an AutoCompleteTextView text in a floating window positioned at the top of the display. If enough text is entered to make the drop down appear it will be initially clipped to the bottom edge of the window. If you click on the drop down it appears unclipped.
I've stripped my activity down to a test program and put a copy here:
http://www.invisibility.org.uk/adaptertest.tgz
In summary, the main activity just inflates a view and positions it at the top of the display: Code...
I want to show a menu similar in look and feel to the sub-menus. I want the menu to come up when we tap on the screen. Is it possible to have sub-menus displayed without creating the main options menu? I do not want to use context menus for this.
View 3 Replies View RelatedI want to show a list of items when the user clicks an overlay item on a map. The user should be able to select any of these items and edit them. The list can have many items (more than that can fit in one active screen) therefore it needs to be scrollable
View 1 Replies View RelatedI bought Beautiful Widgets, installed them and removed them from my screen. I am deciding how I want my little Zio to look. And no, I am not upset at my little problem. I love and would recommend the program. However, this AM I noticed clouds floating across my email screen after the phone sat idle for an hour or so. I took a look at all running apps (Task Killer, sorry) and nothing seems to be running that would account for the animation. I asked Mr. Google about this and he is as clueless as I am.
View 4 Replies View RelatedFor those that have seen the HTC EVO 4G ROM floating around first announced on Engadget... or the technologically savvy... Can Sprint HTC Hero users/owners install this on their devices? What are the best and worst case scenarios if one were to attempt such a task? Would it actually work, what is this ROM essentially, what makes it different than the 2.1 update Sprint Hero owners just received?
View 3 Replies View RelatedJust recently gone to 2.1 (orange uk) and noticed the way the weather works now. If it's cloudy for example clouds will fill my screen and float across.
My question... what activates it? As it seems to be random when I open my home screen?