Use the following command to get the views.TextView textView = (TextView) ((Activity) context).findViewById(R.id.textView1);