@Override
public void onPageScrollStateChanged(int arg0) {
// TODO Auto-generated method stub
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
setCursorPositin(position, positionOffset, positionOffsetPixels);
int width=getWindowManager().getDefaultDisplay().getWidth();
int curson_width = BitmapFactory.decodeResource(getResources(), R.drawable.mingxi_xiazhi).getWidth();
LayoutParams params = new LayoutParams(curson_width, LayoutParams.WRAP_CONTENT);
params.setMargins(position*width/3+positionOffsetPixels/3+(width/3-ico_width)/2, 0, 0, 0);
cursor.setLayoutParams(params );
}
public void onPageScrollStateChanged(int arg0) {
// TODO Auto-generated method stub
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
setCursorPositin(position, positionOffset, positionOffsetPixels);
}
int width=getWindowManager().getDefaultDisplay().getWidth();
int curson_width = BitmapFactory.decodeResource(getResources(), R.drawable.mingxi_xiazhi).getWidth();
LayoutParams params = new LayoutParams(curson_width, LayoutParams.WRAP_CONTENT);
params.setMargins(position*width/3+positionOffsetPixels/3+(width/3-ico_width)/2, 0, 0, 0);
cursor.setLayoutParams(params );
}