Not show remote SVG
alexei-28 opened this issue · 3 comments
alexei-28 commented
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
i have this problem too!. Did with Picasso but didn't work! @alexei-28 did you find any solution?
alexei-28 commented
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
Unrelated to the library.