AndroidGUI29:获取ImageView中的图像需要注意的问题(3)
public class Compare2Images extends Activity
implements
OnTouchListener
{
private Bitmap obmp;
private ImageView iv_photo;
private Button btn_photo;
@Override
public void onCreate(BundlesavedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
iv_photo =(ImageView)findViewById(R.id.iv_photo);
iv_photo.setOnTouchListener(this);
btn_photo = (Button)findViewById(R.id.btn_photo);
btn_photo.setOnTouchListener(this);
}
public boolean onTouch(View v, MotionEventevent)
{
switch(v.getId())
{
case R.id.iv_photo:
相关新闻>>
- 发表评论
-
- 最新评论 更多>>