我有一个评级栏类如下。
class Rating extends FieldAndroid {
@Override
public String register() {
return register("rating");
}
@Override
protected Object createControl() {
LinearLayout layout = new LinearLayout(getContext());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
final RatingBar ratingBar = new android.widget.RatingBar(getContext());
ratingBar.setStepSize((float) 1.0);
if (getEditable())
ratingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
public void onRatingChanged(RatingBar ratingBar, float rating,
boolean fromUser) {
ratingBar.setRating(rating);
}
});
layout.addView(ratingBar, params);
return layout;
}
当我通过在任何模拟器中运行安装 apk 时,它运行良好。但是当我使用我的密钥库生成签名的 apk 时,我的评级栏没有出现。
你知道可能是什么问题吗?