image = (ImageView)findViewById(R.id.iv);
Bitmap bmp = BitmapFactory.decodeResource(getResources(),R.drawable.ico_star_blue_full);
image.setBackgroundResource(R.drawable.ico_star_blue_empty);
float percent = 0.3f;
int height = (int)(bmp.getHeight() * percent);
Bitmap bmpProgress = bmp.createBitmap(bmp,0,bmp.getHeight()-height,bmp.getWidth(),height);
image.setImageBitmap(bmpProgress);
image.setScaleType(ImageView.ScaleType.FIT_END);
bmp.getHeight()-height is calculate the start point of the pixel,the top of the start point is 0