我flipperview
在 android 中的动画有问题,我正在使用flipperview
水平视图动画,arraylist
大小为 14,但 getview 调用仅 3 次之后getview()
没有调用。
代码是:
@SuppressLint({ "NewApi", "SetJavaScriptEnabled" })
public class DetailsActivity extends Activity {
private FlipViewController flipView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
flipView = new FlipViewController(this, FlipViewController.HORIZONTAL);
flipView.setAdapter(new BaseAdapter() {
private WebView mWebview;
ProgressDialog progressDialog = null;
List<EventUtil> mEventUtil= GlobalValues.getInstance().eventUtils;
private int repeatCount = 1;
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View layout = convertView;
LayoutInflater inflater= LayoutInflater.from(EventDetailsActivity.this);
if (convertView == null) {
layout = inflater.inflate(R.layout.pf_fragment_event_desc, null);
progressDialog = Constants.getInstance().loadingDialog(getParent());
EventUtil eventDescEntity = mEventUtil.get(position);
Log.d("ARRAYSIZE", mEventUtil.size()+"");
mWebview = (WebView)layout.findViewById(R.id.event_detail_web_view);
mWebview.getSettings().setJavaScriptEnabled(true);
getJsonObject(eventDescEntity.getEvent_id(),mWebview);
Log.d("POSISSION", position+"");
}
return layout;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public int getCount() {
return mEventUtil.size() * repeatCount;
}
});
setContentView(flipView);
}
@Override
protected void onResume() {
super.onResume();
flipView.onResume();
}
@Override
protected void onPause() {
super.onPause();
flipView.onPause();
}
}
它工作正常,问题是当 getView() 方法没有调用之后 getview 计数达到 3
log
position 0
position 1
position 2
计数没有增加请帮帮我。