今天我升级了Android SDK到19 API,并在测试我的应用程序时,在19 API中遇到了一些错误:文本视图中掉落了一些字体,或者它的大小存在问题。
第一个屏幕,一个视图的代码:
tvBalance = new TextView(getContext());
rlParams = new LayoutParams(frame.width, (int) (frame.heigth * zoneExtetn));
rlParams.setMargins(frame.left, (int) (frame.top - frame.heigth * (zoneUp-0.1f)), 0, 0);
tvBalance.setLayoutParams(rlParams);
tvBalance.setGravity(Gravity.CENTER);
tvBalance.setPadding(0, 0, 0, 0);
tvBalance.setTextColor(0xffffd008);
tvBalance.setTextSize(PokerTextSize.scaleFont(getContext(), 28));
tvBalance.setText("$ 0 000 000 000");
tvBalance.setTypeface(TypefaceBase.getCalibri((Activity) getContext()));
rlMoney.addView(tvBalance);
和第二屏幕代码:
TextView tvText = new TextView(llContent.getContext());
llParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
llParams.setMargins(0, 0, 0, marg*2);
tvText.setLayoutParams(llParams);
tvText.setTextSize(fonts[0]);
tvText.setTextColor(articleColor);
tvText.setText(Html.fromHtml(articleItem.getString()));
tvText.setTypeface(TypefaceBase.getCalibri((Activity) this.getContext()));
llContent.addView(tvText);
有人在安卓4.4 Kit-Kat系统中遇到这些问题吗?