How to add the superscript affect to the string?

by Christoph Studer » Tue, 10 Feb 2009 19:15:19 GMT


Sponsored Links
 Actually, styled text supports superscript. A string resource like
<string name="E_mc2">E=mc<sup><small>2</small></sup></string>

will display as expected.

Christoph






--~--~---------~--~----~------------~-------~--~----~



How to add the superscript affect to the string?

by Mark Murphy » Tue, 10 Feb 2009 19:28:45 GMT


 


Is there a definitive list floating around somewhere of the HTML tags
that string resources support?

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 

Android Training on the Ranch! -- Mar 16-20, 2009
 http://www.bignerdranch.com/schedule.shtml 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to add the superscript affect to the string?

by Christoph Studer » Tue, 10 Feb 2009 19:59:31 GMT


 Not that I know of.

One can find some clues here:
 http://code.google.com/android/reference/android/text/Spannable.html #setSpan(java.lang.Object,
int, int, int)
 http://code.google.com/android/reference/android/text/style/CharacterStyle.html 

Christoph






--~--~---------~--~----~------------~-------~--~----~



How to add the superscript affect to the string?

by Mark Murphy » Tue, 10 Feb 2009 20:11:57 GMT


 


Sometime when I have spare time (bwahahahahahaha!) I'll have to sit down
and try to work up a reasonably-definitive list.

Thanks for pointing it out!

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android Training in Sweden --  http://www.sotrium.com/training.php 

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Handling touch events for dragging content when changing the orientation of the screen

I have a map application using an in-house map engine on Android. I'm
working on a rotating Map view that rotates the map based on the
phone's orientation using the Sensor Service. All works fine with the
exception of dragging the map when the phone is pointing other than
North. For example, if the phone is facing West, dragging the Map up
still moves the Map to the South versus East as would be expected.  I
assume translating the canvas is one possible solution but I'm
honestly not sure the correct way to do this to swap the axes without
disrupting the coordinate system needed by the map tiles.

Here is the code I'm using to rotate the Canvas:

public void dispatchDraw(Canvas canvas)
{
    canvas.save(Canvas.MATRIX_SAVE_FLAG);
    // mHeading is the orientation from the Sensor
    canvas.rotate(-mHeading, origin[X],origin[Y]);


    mCanvas.delegate = canvas;
    super.dispatchDraw(mCanvas);
    canvas.restore();
}

What is the best approach to make dragging the map consistent
regardless of the phones orientation? The sensormanager has a
"remapcoordinates()" method but it's not clear to me exactly how to
use it.  I've searched the web and posted to StackOverflow to try and
figure this out...no luck so far.  Any pointers would be greatly
appreciated!  Thanks.

-- 

2. Honeycomb surprising result for WallpaperManager.getDesiredMinimumHeight()

Hi,

In the new Android 3.0 Honeycomb Preview emulator
WallpaperManager.getDesiredMinimumHeight()  returns 1408.

getDesiredMinimumHeight=1408
getDesiredMinimumWidth=1920

The 1408 result is a bit surprising, is this planned ? is there any
special reason the desired Height is 1408 and not just 1400 ?

Thanks,
Shai Levy

-- 

3. Absolute path for an asset file

4. app doesn't install anymore!

5. How to Read Device Properties

6. Motorola Camera issue

7. gldfish kernel and goldfish kernel