yarolegovich / DiscreteScrollView

A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
5.78k stars 782 forks source link

Not show remote SVG #180

Closed alexei-28 closed 4 years ago

alexei-28 commented 5 years ago

In my android app/build.gradle:

implementation 'com.github.qoqa:glide-svg:2.0.4'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.yarolegovich:discrete-scrollview:1.4.9'

in my activity:

import com.yarolegovich.discretescrollview.DiscreteScrollView;
import com.yarolegovich.discretescrollview.InfiniteScrollAdapter;

    serviceUrls = new ArrayList<String>();
        serviceUrls.add("https://www.some_host.md/frontend/images/map/services/service-wi_fi.svg");
        serviceUrls.add("http://www.gravatar.com/avatar/44444?s=48x48&d=identicon");
        discreteScrollView = findViewById(R.id.picker);
        InfiniteScrollAdapter wrapper = InfiniteScrollAdapter.wrap(new AgentServiceAdapter(serviceUrls));
        discreteScrollView.setAdapter(wrapper);

in xml

 <com.yarolegovich.discretescrollview.DiscreteScrollView
                        android:id="@+id/picker"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:dsv_orientation="horizontal" />

here adapter:

  @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        String serivceURL =data.get(position);
        Glide.with(holder.itemView.getContext())
                .load(serivceURL)
                .into(holder.image);
    }

as result success show only second image, but first (SVG) not show

aminPial commented 4 years ago

i have this problem too!. Did with Picasso but didn't work! @alexei-28 did you find any solution?

alexei-28 commented 4 years ago

i have this problem too!. Did with Picasso but didn't work! @alexei-28 did you find any solution? : try this https://stackoverflow.com/questions/35507893/does-glide-have-a-method-for-loading-both-png-and-svg

yarolegovich commented 4 years ago

Unrelated to the library.