title: ACTION_VIEW for opening url not working
body: <p>/
  /
  I am using ACTION_VIEW to open a image URL. Below is the code</p>
  
  <pre><code>ImageView _presImage1= (ImageView) view_local.findViewById(R.id.img_prescription1);
      Picasso.with(this.getContext()).load(img_url).placeholder(R.mipmap.ic_launcher).into(_presImage1);
  
      _presImage1.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent=new Intent();
              intent.setAction(Intent.ACTION_VIEW);
              Log.i("ABHINAY","Image is clicked:" + img_url);
              intent.setDataAndType(Uri.parse(img_url),"image/*");
              startActivity(intent);
          }
      });
  </code></pre>
  
  <p>But the image is not opening on clicking. The url passed is valid and is opening properly in browser. </p>
  
  <p>Below is the xml file i am using 
      
      </p>
  
  <pre><code>    &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal"
          android:baselineAligned="false"&gt;
  
          &lt;android.support.v7.widget.CardView
              xmlns:card_view="http://schemas.android.com/apk/res-auto"
              android:layout_gravity="top"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight = "1"
              card_view:cardCornerRadius="4dp"
              android:layout_margin="5dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical"
                  android:background="@color/primary"&gt;
  
                  &lt;ImageView android:id="@+id/img_prescription1"
                      android:layout_width="wrap_content"
                      android:layout_height="200dp"
                      android:layout_gravity="top"
                      android:src = "@drawable/bg_nav"/&gt;
  
                  &lt;com.medquil.medquil.views.MyTextView android:padding = "4dp"
                      android:id="@+id/doctor_name"
                      android:layout_height = "wrap_content"
                      android:layout_width = "wrap_content"
                      android:textColor = "@color/white"
                      android:textSize="16dp"
                      android:layout_gravity="center"
                      android:gravity="center_horizontal"
                      android:text="Dr. Abhishek Ekbote"
                      android:layout_centerHorizontal="true"/&gt;
  
                  &lt;com.medquil.medquil.views.MyTextView android:padding = "4dp"
                      android:id="@+id/prescription_date"
                      android:layout_height = "wrap_content"
                      android:layout_width = "wrap_content"
                      android:layout_gravity="center"
                      android:textColor="@color/black"
                      android:text="12th March 2016"
                      android:layout_centerHorizontal="true"/&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              xmlns:card_view="http://schemas.android.com/apk/res-auto"
              android:layout_gravity="top"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight = "1"
              card_view:cardCornerRadius="4dp"
              android:layout_margin="5dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical"
                  android:background="@color/primary"&gt;
  
                  &lt;ImageView android:id="@+id/img_prescription2"
                      android:layout_width="wrap_content"
                      android:layout_height="200dp"
                      android:layout_gravity="top"
                      android:src = "@drawable/bg_nav"/&gt;
  
                  &lt;com.medquil.medquil.views.MyTextView android:padding = "4dp"
                      android:id="@+id/doctor_name1"
                      android:layout_height = "wrap_content"
                      android:layout_width = "wrap_content"
                      android:textColor = "@color/white"
                      android:textSize="16dp"
                      android:layout_gravity="center"
                      android:gravity="center_horizontal"
                      android:text="Dr. Abhishek Ekbote"
                      android:layout_centerHorizontal="true"/&gt;
  
                  &lt;com.medquil.medquil.views.MyTextView android:padding = "4dp"
                      android:id="@+id/prescription_date1"
                      android:layout_height = "wrap_content"
                      android:layout_width = "wrap_content"
                      android:layout_gravity="center"
                      android:textColor="@color/black"
                      android:text="12th March 2016"
                      android:layout_centerHorizontal="true"/&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
  
      &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>Below is the Java Function</p>
  
  <pre><code>private void addPrescriptionChilddouble(final String img_url, String name, String created_date, final String img_url1, String name1, String created_date1) {
      LayoutInflater li= (LayoutInflater)getActivity().getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      LinearLayout ll= (LinearLayout)view.findViewById(R.id.parentMedicalHistory);
      final View view_local=li.inflate(R.layout.fragment_medical_history_child_double, null);
  
      //FIRST
      TextView doctor_name=(TextView) view_local.findViewById(R.id.doctor_name);
      TextView date_created=(TextView) view_local.findViewById(R.id.prescription_date);
  
      int count=ll.getChildCount();count++;
      doctor_name.setText(name);
      date_created.setText(created_date);
      ImageView _presImage1= (ImageView) view_local.findViewById(R.id.img_prescription1);
      Picasso.with(this.getContext()).load(img_url).placeholder(R.mipmap.ic_launcher).into(_presImage1);
  
      _presImage1.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent=new Intent();
              intent.setAction(Intent.ACTION_VIEW);
              Log.i("ABHINAY","Image is clicked:" + img_url);
              intent.setDataAndType(Uri.parse(img_url),"image/*");
              startActivity(intent);
          }
      });
  
      //SECOND
      TextView doctor_name1=(TextView) view_local.findViewById(R.id.doctor_name1);
      TextView date_created1=(TextView) view_local.findViewById(R.id.prescription_date1);
  
      doctor_name1.setText(name1);
      date_created1.setText(created_date1);
      ImageView _presImage2= (ImageView) view_local.findViewById(R.id.img_prescription2);
      Picasso.with(this.getContext()).load(img_url1).placeholder(R.mipmap.ic_launcher).into(_presImage2);
  
      _presImage2.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent=new Intent();
              intent.setAction(Intent.ACTION_VIEW);
              Log.i("ABHINAY", "Image is clicked:" + img_url1);
              intent.setDataAndType(Uri.parse(img_url1),"image/*");
              startActivity(intent);
          }
      });
  
      ll.addView(view_local);
  }
  </code></pre>