我正在构建Android计算器应用程序的键盘。 我正在使用unicode,但应用程序没有显示“擦除到左边”按钮
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"}};
感谢
答案 0 :(得分:3)
所有字体都不支持Unicode字符。点击此处查看\u232B
支持的字体不要使用角色,而是制作角色的图像并将其设置为按钮背景。可以提供帮助的帖子已在此处得到解答:How to make button with custom background image...
另外,至于在java中使用字符串在GUI中打印,最好使用xml。按钮各个值将存储到应用程序,而不必在每次运行应用程序时分配它们。我会写出如何完成此操作的说明,但Android开发人员指南that can be found here提供了比我更好的指令。