Question: I am trying to use the return value(response) from the callback outside the jQuery.post API..how can that be done?

```
jQuery.post( ajaxurl, 'action', function( response ) 
{
console.log(response); // this comes back with "working"

// i tried this responseVal = response;  but didn't work            

}); 

alert(response); // this will be undefined.

```

So I want the alert to have access to response....Yes I know I could easily alerted it inside the callback but my application needs to access this outside.

Thanks in advance.

Answer: 
There is nothing wrong with their bitmap strategy. Just change the 'size' parameter based on the screen density.

```
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);

```

Now muliply your `size`, `width`, `height`, `widthText`, and `heightText` values by `metrics.density`.

That will treat them as dp values to produce the correct px value for the screen you are on.

From the docs:

> 
> The DisplayMetrics.density field specifies the scale factor you must
>  use to convert dp units to pixels, according to the current screen
>  density. On a medium-density screen, DisplayMetrics.density equals
>  1.0; on a high-density screen it equals 1.5; on an extra high-density screen, it equals 2.0; and on a low-density screen, it equals 0.75.
>  This figure is the factor by which you should multiply the dp units on
>  order to get the actual pixel count for the current screen.
> 
> 
> 

You'll have more control over the font rendering if you stick with the bitmaps.
The short answer to your question is, use density resources. If you are using a high density screen, but your bitmap in:

`res/drawable-hdpi/`

The long answer is, that screen density does not have a "silver bullet" so to speak and to have a successful app, you need to make sure your app works across all screens. Getting your image to render on one screen is easy, keeping that the same across multiple resolutions is a little trickier. 

This article does a great job of talking about some of the different methods and techniques you can use to make sure that your bitmap displays properly across all screens, and not just one. This article has some best practices and other information that you should be aware of, and that will make things easier for you:

<http://developer.android.com/guide/practices/screens_support.html>

Best of luck!