1

I am new to android development, i tried using picasso and circularimageview combination, the problem is, the combo wont work whenever i refer to an image which is not from a secured url(HTTP)

    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_userdataupdate);
    getSupportActionBar().setBackgroundDrawable(
            getResources().getDrawable(R.drawable.actionbargradient));

    CircularImageView civ = findViewById(R.id.profileImg);
    Picasso.get().load("http://chandra.harvard.edu/photo/2018/kes75/kes75_w11.jpg").transform(new CircleTransform()).into(civ);
    ImageView imgv = findViewById(R.id.imageView2);
    Picasso.get().load("http://chandra.harvard.edu/photo/2018/kes75/kes75_w11.jpg").transform(new CircleTransform()).into(imgv);

}

Just to make sure its not a problem with circularimageview i tried imageview too.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/trialimage"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".userdataupdate">


<com.mikhaellopez.circularimageview.CircularImageView
    android:id="@+id/profileImg"
    android:layout_width="157dp"
    android:layout_height="144dp"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="122dp"
    app:civ_border_color="#EEEEEE"
    app:civ_border_width="4dp"
    app:civ_shadow="true"
    app:civ_shadow_color="#8BC34A"
    app:civ_shadow_radius="10" />

<ImageView
    android:id="@+id/imageView2"
    android:layout_width="wrap_content"
    android:layout_height="139dp"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="124dp"
    tools:srcCompat="@tools:sample/avatars[1]" />

if i replace the src to any https image it works just fine.

siva
  • 63
  • 1
  • 16

1 Answers1

1

Hi Guys appreciate your quick help and answers, figured out the issue is related to this post

How to allow all Network connection types HTTP and HTTPS in Android (9) Pie?

Now it works fine.

Thanks

siva
  • 63
  • 1
  • 16