在我的适配器中,当我使用svgloder加载.svg格式的照片时,我有一些错误,请帮忙吗?
TokenResponse tokenResponse;
string request = $"client_id={clientId}&client_secret={clientSecret}&grant_type={grantType}&scope={scope}&username={username}&password={password}";
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
byte[] result = client.UploadData(endpointUrl, "POST", Encoding.UTF8.GetBytes(request));
string resultJson = Encoding.UTF8.GetString(result, 0, result.Length);
tokenResponse = JsonConvert.DeserializeObject<TokenResponse>(resultJson);
}
和错误:
SvgLoader.pluck().with(G.context).load(cats.getImage(),holder.image);
答案 0 :(得分:0)
使用以下代码:
SvgLoader.pluck()
.with(context)
.setPlaceHolder(R.mipmap.ic_launcher, R.mipmap.ic_launcher)
.load(url, image);