Re: How to set width and height of a View in DP through code not in XML ?

by Xu Jiyong » Thu, 27 Jan 2011 14:54:32 GMT

Sponsored Links 

search 'Converting dp units to pixel units' on above page.


Other Threads

1. How to test if app is shown on Market for all screensizes

As if it's not enough to have to manage the manifest, but HTC has a bit of a
habit of releasing phones that cannot see some apps. Examples include the
HTC Hero when it was released in Europe, and the HTC Eris recently released
in the USA.

I'd like to know if those phones you mention can see our app (PhoneMyPC) as
well. Anybody have an idea how to check that?

Makers of PhoneMyPC


2. Map Application works in 1.5 but not working in 2.0

Yeah, I realize that.  However, according to Google...

        If your application absolutely need maps, you could add the
        <uses-library> tag (even though you don't use the Maps API). This
        make sure your app only install on devices with Maps.
        <uses-library android:name=""/>



3. Given a TextView of a specific height, how many lines of text can be displayed?

4. Why Broadcast receiver can't receive UMS_CONNECTED, UMS_DISCONNECTED msg dynamically in activity ?

5. "On Android nobody is making s ignificant revenue.鈥???

6. Has anyone got SEQUENCE_INVARIANT to work with a GestureLibrary?

7. How to Build a Framework Library(JAR) and Use it in Eclipse.