我正在尝试调整android中的文本大小以使其更大;
Paint paint = new Paint();
paint.setTextSize(30);
canvas.drawText("Text goes here" , x, y,paint);
Run Code Online (Sandbox Code Playgroud)
然而,文本变得像素化.
有没有其他方法可以在android中调整文本大小而不是丑陋和像素化?
当我运行我的应用程序时,我可以通过运行以下选择在我的viewFlipper中显示哪个视图:
viewFlipper.setDisplayedChild(1);
Run Code Online (Sandbox Code Playgroud)
在onCreate中,我可以在我的onClick()中切换视图
viewFlipper.setDisplayedChild(0);
Run Code Online (Sandbox Code Playgroud)
当我想从我的代码(而不是我的主应用程序)切换孩子时,我得到以下问题!
02-02 12:17:08.620: ERROR/AndroidRuntime(1005): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏.