Android - Set ImageView to URL

前端 未结 3 750
难免孤独
难免孤独 2020-12-09 07:02

I am trying to set an Imageview to a URL.

Below is my code

protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stu         


        
3条回答
  •  猫巷女王i
    2020-12-09 07:48

    android.app.Activity.findViewById(Activity.java:1794)
    

    => It says you haven't initialized your ImageView i.e. "i" in your code.

    ImageView i = (ImageView) findViewById(R.id.myImageViewInXML);
    

提交回复
热议问题