IT月光

导航

自定义ImageView的MainActivity

package com.baidu.lianximyview;

import com.example.myimageview.MyImageView;

import android.os.Bundle;
import android.app.Activity;


public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        MyImageView myImageView = (MyImageView)findViewById(R.id.imageview);  
        myImageView.setImageDrawable(getResources().getDrawable(R.drawable.p));
    }

   
    
}

posted on 2016-04-10 18:44  IT月光  阅读(177)  评论(0编辑  收藏  举报