Android :: Default Measuring Units Pixels / Density Independent

Aug 13, 2009

in xml file we can define measuring units along with the values. If I want to set some property through code it only takes "int" value. What is the default unit for this int? px(pixels) or dp(density independent pixels) ?

Android :: Default measuring units pixels / density independent


Android :: Use Device Independent Pixels Dip And Sip In Droid?

Nov 20, 2010

Cn anyone suggest me how to use device independent pixels(dip),sip and convert px to dip with a sample code..

View 1 Replies View Related

Android :: Use DrawBitmap With Display Independent Pixels On Droid / Need Suitable Alternative

Nov 10, 2010

Can I use DrawBitmap with display independent pixels on android?

If not, is there a suitable alternative?

View 1 Replies View Related

Android : How To Support Devices With Normal Screen - High Density Or Low Density?

Nov 15, 2010

I read the official document about supporting multiple screens http://developer.android.com/guide/practices/screens_support.html

According to that document, I should just create different directories for different resolultion.

Now the question. How to support devices with normal screen and high density or low density?

I ask it because, there are two posibilities (WVGA800 (480x800) and WVGA854 (480x854)) and (WQVGA400 (240x400) and WQVGA432 (240x432)) and I don't know where to store some background images for them.

I would take drawable-normal-hdpi or drawable-normal-ldpi, but how to make difference between 480x800 and 480x854 or between 240x400 and 240x432?!

View 1 Replies View Related

Android :: Relationship Between Pixels And Scaled Pixels?

Jan 4, 2010

I used the layout editor in eclipse to mock up my ui layout and then I created the code to populate it dynamically and things are showing up as different sizes. The XML I use to add the star images looks like this:

<ImageView
android:src="@drawable/star_gold"
android:layout_height="22sp"
android:layout_width="22sp"
android:adjustViewBounds="true"
android:layout_marginLeft="2sp"
android:layout_marginRight="2sp" />...............

View 4 Replies View Related

Android :: Measuring A View Before Rendering It

May 13, 2010

I need to find out how big a view will be after attaching it to its parent.I have overridden this method: Do you think there is a way to get this information before rendering the view itself? Basically I need to know the actually size before attaching it and not attach the view at all if it would take more certain amount of space. Code...

View 2 Replies View Related

Android :: Measuring Text Width To Be Drawn On Canvas

Jul 15, 2010

Is there a method which returns the width ( in pixels ) of a text to be drawn on an Android canvas using the drawText() method according to the Paint used to draw it.

View 1 Replies View Related

Android :: Measuring Text Height To Be Drawn On Canvas

Sep 6, 2010

Any straight forward way to measure the height of text? The way I am doing it now is by using Paint's measureText() to get the width, then by trial and error finding a value to get an approximate height. I've also been messing around with FontMetrics, but all these seem like approximate methods that suck. I am trying to scale things for different resolutions. I can do it, but I end up with incredibly verbose code with lots of calculations to determine relative sizes. I hate it! There has to be a better way.

View 1 Replies View Related

Android :: Measuring Real Phone Signal Strength On Mobil?

Dec 4, 2009

I want to programmatically measure the phone signal strength in a mobile phone. I don't actually care about the mobile phone or the programming environment: It can be based on android or windows mobile or even J2ME and can be from any manufacturer (please no iPhone). However, it needs to be a real, commercial mobile phone and not a special measurement device. This problem is not as easy as it seems with a first look. I am aware that there already exist a number of methods that claim to return the phone signal strength. Some of these are:

SystemState.PhoneSignalStrength for WM6 RIL_GetCellTowerInfo for WinCe (dwRxLevel member of returned RILCELLTOWERINFO struct) android.telephony.NeighboringCellInfo.getRssi() for android

The problem with the above is that they only return a few (under 10) discrete values, meaning that, for instance, the return values of SystemState.PhoneSignalStrength can only be translated to (for instance) -100 dbm, -90 dbm, -80 dbm, -70 dbm and -60 dbm, something that is not useful for my application, since I'd like to have as much precision as possible. It doesn't matter if there is an undocumented solution that only works on only one phone

View 4 Replies View Related

General :: Measuring Battery By MV?

Mar 13, 2012

I have a 3500 mAH battery that refuses to calibrate.... Anyways when I use Battery Calibrate, its says my current mV is 3643, I know that isn't full, but my battery percent says 23% and that is much to low for 3643mV! My co-worker said to divide 3643 by 4200 (Full charge IIRC) and that is my battery percent. I think there has to be a better way...

View 1 Replies View Related

HTC Incredible :: Measuring Battery Life

May 24, 2010

Just tested my battery (stock) vs my new battery (1750). I got about 4.5 hours running my stock battery down to 25% or so and I'm now at about 6.5 hours running the 1750 down to 27%. When people talk about measuring battery life are they talking about 100%-0% or are they just talking about just 100%-20% or so. This is really the only usable battery range because the radio turns off somewhere under the 20% point. I'm also thinking that my Seidio battery isn't working properly. It was kind of bent out of shape when I got it and felt pretty filmsy. I decided to give it a try but now I'm kind of thinking about returning it in the hopes of getting better life out of a new one.So two questions here what range are you all measuring your battery life through? and any chance that Il' get more life out of a new battery?

View 16 Replies View Related

Android :: Independent Program

Feb 16, 2010

I need to install a program on the Droid. I can get it onto the memory chip. I can't get the droid to find it.

View 3 Replies View Related

Android :: How To Retrieve Locale Independent App?

Jan 21, 2010

I'm using PackageManager.getApplicationLabel(ApplicationInfo) to retrieve application labels. It looks like the label that is returned depends on the Locale set for the phone. For instance with the music app I get "Music" in English, vs. "Musica" if I have my locale set to Spanish. Is there a way to get the default application label (perhaps as defined in strings.xml)? I want to be able to retrieve an application label for each app that is independent of locale.

View 1 Replies View Related

Android :: How To Get Maps In Metric Units?

Jul 8, 2009

This may be in the wrong forum, but I can't figure out where else to post it.
The maps app (the one from google your phone comes with by default) only shows routes in feet and miles. Is there no way to get it in meters? I can't find any settings for this!

View 1 Replies View Related

Android :: How Do I Define / Standardize Units In My 3D App?

Mar 20, 2010

I'm starting to design my object graph for an OpenGL ES 1.1 app on Android. What's advisable when it comes to actually drawing my triangles and controlling their size? Should I store all the vertices in units relative to each other and then multiply them by a value I pass during a draw(GL10 gl)? Would this approach have any impact when it comes time to do frustum culling?

View 1 Replies View Related

Android :: What Are Units Of Event.values?

Aug 23, 2009

I am experimenting with orientation sensor, register it like this: SesnorManager sensor_manager = (SensorManager)getSystemService (Context.SENSOR_SERVICE); Sensor sensor_orientation = sensor_manager.getSensorList (SensorManager.SENSOR_ORIENTATION).get(0); sensor_manager.register Listener(sensor_listener, sensor_orientation, SensorManager.SENSOR_DELAY_UI); and then read the orientation values in the sensor event listener: private final SensorEventListener sensor_listener = new SensorEventListener() { ... float sensor_data_x = event.values[SensorManager.DATA_X];}

View 4 Replies View Related

General :: How Many Storage Units Android OS Have

Nov 2, 2012

How many storage units Android OS have? Including a possible microSD external Card.

Internal Storage, internal memory?! Whats the difference and location in file system folders?

When an app is installed from market where does it go?

In application manager, in most apps there is an option "Move to SD card"...

If I have an external micro SD Card and choose this apps option "Move to SD card" where the heck is suppose to going the app or some part of it? (Data? Apk? Cache?) It's not in external microSD Card! So what is "Move to SD Card".

View 4 Replies View Related

Android :: Independent Application Volume Control

Feb 14, 2010

I was just wondering if there was a way to control the volume for each application independently. For example I was using my droid for GPS navigation and music in my car the other day and kept getting shouted at by the navigation since the volume was turned up for the music. Needless to say it gets really annoying fast. This problem stems from the fact that all the apps have their volume control handled by the media volume control.

View 5 Replies View Related

Android :: Build Resolution Independent Layout Xml?

Mar 5, 2009

I am working on a screen that needs to look fine at HVGA-L resolution as well as 640x480 resolution. Lets say I have a button that is 200 pixels wide and 50 pixels high on HVGA-L skin. When the same layout xml is shown at 640x480 skin, I want my button size increase proportionately. The hardware the app runs on supports both the resolutions.

None of the units that the android framework provides seems to have this facility. If I use px, then the button size will stay same. dip doesn't matter because it is the same hardware. sp is meant for fonts, not for button width/heights.

View 8 Replies View Related

Android :: What Units Does Location.get Altitude Return In?

May 4, 2009

I live in an area which is 9 feet above sea level, and when I call getAltitude I get back a value less than -10. Am I doing something wrong, is my device a failure, or is there some nifty scale that I don't know about?

View 2 Replies View Related

Android :: Isolating Units / Writing Tests

Jul 23, 2010

My project has the run-of-the-mill HTTP calls to fetch XML files, parsing the XML files, and creating domain objects. Those objects are later used in the actions and services of the Android app, I'd like to isolate that code. I also want to write tests for it. What are some good ways of doing this? Creating an Android Library doesn't seem appropriate. The tests would have to be in a separate project. And there are no services or activities in the extracted HTTP and XML related code. So the test suite doesn't have to be an Android test suite, it could be regular JUnit tests.

View 2 Replies View Related

Android :: Location Distance Between Units / Emulator

Feb 24, 2010

1) I have not been able to find out in which units Location.distance Between receives the latitude and longitude. Is it degrees or micro degrees? Whats the unit for the distance returned? 2) In windows XP using Eclipse 3.3.2. Emulator does not send coordinates properly. Either it by hand or by loading a gpx file the location Listener is not invoked. This same code I have tried it in Ubuntu and works fine. Does someone know how can I solve this? In the office there is no linux installed and I can take my personal laptop.

View 2 Replies View Related

Android :: How To Create Custom View With Two Independent Sections?

Aug 28, 2010

How to create custom view with two independent sections, each slideable? Example would be iPad Zillow -> http://www.zillow.com/ipad/I was wondering if this can also be done on the home screen and not only in new app.

View 1 Replies View Related

Android :: All Applications / Widgets Phone Model Independent?

Oct 19, 2009

I'm interesting in buying a Samsung Galaxy but first I'd like to know if all Android apps are phone model independent? I know that all the cool custom ROM stuff from XDA Devs is HTC only but apps are not? Mostly, I mean Open Home, Unlock 2.0 and Better Keyboard with their skins.
Same question goes about widgets.

View 2 Replies View Related

Android :: Get Device And User Independent Time In Droid?

Sep 1, 2010

In my android application i would like to use time which do not come from device but a standard time that the user cannot change.
Is there any way to do this.

View 4 Replies View Related

Android :: App-independent Storage Of Shared Resources/Media

May 7, 2009

I'm in a situation where I have to share some resources (i.e. images) between several of my apps and I'd like to know if there's a standardized and convenient way to do this besides the system-wide Media Store. The reason I don't want to use the MediaStore is that the resources are rather low-level (e.g. icons) and thus the user wouldn't be interested in them cluttering the MediaStore.

As I see it there are three ways to share the resources:

1) Store them in the global MediaStore. 2) Put them on the SD card. 3) Implement a custom ContentProvider for this kind of shared resources.

I like how a custom ContentProvider would encapsulate the way the data is stored, but it seems to be a bit of unnecessary overhead to achieve this. Writing to the SD card is convenient, but rather low-level. Are there any other options suited for this problem?

View 3 Replies View Related

Android : Independent Wallpapers On Multiple Screens While Scrolling?

Oct 29, 2010

Could it be possible to make each screen have a different wallpaper while scrolling? I mean, taking as an example a case with three screens, it will be necessary to set a x3 screen width wallpaper to fit 1/3 on each screen, or directly setting different images for each screen. so the scrolling make it visually a different wallpaper on each screen rather than sliding the wallpaper a 50% each side.

View 2 Replies View Related

Android :: Maximum Texture Units - Emulator Setup

Apr 30, 2010

this is just an issue with how the emulator is setup, but I'm not sure.

I'm (natively) calling this:

int maxt = 0;
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &maxt);
__android_log_print(ANDROID_LOG_VERBOSE, "Native", "Max textures %d", maxt);

This only outputs 2... could it be possible that I'm going to be allowed only 2 textures? That seems impossible... GL_MAX_TEXTURE_SIZE reports 4096 which is more than enough. I suppose you could lay everything out on a couple of 4096x 4096 images (seems a bit crazy) but anyway... Am I just running into one of things that will be different per phone processor?

View 9 Replies View Related

Android :: OpenGL Frame Time Independent Object Move

Jul 5, 2009

i'm doing some experiments with OpenGL using the GLSurfaceView introduced in 1.5 In my Renderer I keep track of the time spent to render the last frame and pass this value to the method that update my model. The goal is to keep objects movements on the screen independent from the rendering time. Now this seems to work perfectly in the emulator, but on the real device is at least 4/5 times slower! Has anyone experienced the same problem? Or, anyone has a clue of what I'm doing wrong? Here's pieces of the code I'm using

View 3 Replies View Related

Android :: Hard-coding Button's Width In Dimension Units

Aug 1, 2010

I've got the hard-coded layout, consisting of buttons, and need to enlarge some of them. I found Button's method setWidth(int value), accepting width in pixels, but I need to set value in dp. So, how can I set dp value in program code?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved