Unicode character ("\u232B") does not display on button
I'm building the keyboard of a calculator application for Android. I'm using the unicode but the application did not display the button "erase to left"
static String[][] screen2L ={{"sin","asin","sinh","asinh","sind","asind","u232B","AC"},
{"cos","acos","cosh","acosh","cosd","acosd","log2","gamma"},
{"tan","atan","tanh","atanh","tand","atand","log10","ln"}};
thanks
Unicode characters are not supported in all fonts. Check here to see the supported fonts for u232B
Instead of using the character, make an image of the character and set it as the buttons background. A post that can help with that has already been answered here: How to make button with custom background image...
Also, as for using strings in java to print in your GUI, it's better practice to use xml for this. The buttons individual values would be stored to the app instead of having to assign them every time the app is run. I would write out instructions on how this is done, but the android developers guide that can be found here gives much better instructions than I could.
链接地址: http://www.djcxy.com/p/17394.html