今天我已经将我的 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);
有人在 android 4.4 kit-kat 中有这些问题吗?