当前位置:网站首页>ImageView, glide load long picture (glide load picture)
ImageView, glide load long picture (glide load picture)
2022-06-26 18:57:00 【xiyangyang8110】
1
compile ‘com.github.bumptech.glide:glide:3.7.0’
2
activity_privacy_agreement_webview
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".activity.PrivacyAgreementWebviewActivity">
<ScrollView
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center" />
</ScrollView>
</LinearLayout>
3
package com.ruhai.yibei.activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.bumptech.glide.Glide;
import com.github.barteksc.pdfviewer.PDFView;
import com.ruhai.yibei.R;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
public class PrivacyAgreementWebviewActivity extends AppCompatActivity {
private ImageView imageView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_privacy_agreement_webview);
imageView = (ImageView) findViewById(R.id.image_view);
Bundle bundle = getIntent().getExtras();
String urlName = bundle.getString("urlName");
Log.e("wy", "run:--------->urlName: " + urlName);
Glide.with(this).load(urlName).into(imageView);
}
}
the previous activity Pass on url
privacyTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(LoginActivity.this, PrivacyAgreementWebviewActivity.class);
String mXieyi = "https://winkong-frontend.oss-cn-qingdao.aliyuncs.com/file/privacy_terms-cn.jpg";
intent.putExtra("urlName", mXieyi);
startActivity(intent);
}
});
边栏推荐
- (树) 树状数组
- Kubernetes resource topology aware scheduling optimization
- Commodity seckill system
- Using cache in vuex to solve the problem of data loss in refreshing state
- 微服务架构
- When does the mobile phone video roll off?
- 品达通用权限系统(Day 1~Day 2)
- Publish message publishers and subscribe message subscribers of ROS
- ROS query topic specific content common instructions
- Microservice architecture
猜你喜欢

CLion断点单步调试

项目实战四:用户登录及token访问验证(reids+jwt)

Record of user behavior log in SSO microservice Engineering

The cross compilation environment appears So link file not found problem

LeetCode 238 除自身以外数组的乘积

Decompilation of zero time technology smart contract security series articles

(几何) 凸包问题

MySQL recharge

uni-app使用canvas绘制二维码

关于不等式取值转义的思路
随机推荐
Deep learning: numpy
项目实战四:用户登录及token访问验证(reids+jwt)
Insert string B into string A. how many insertion methods can make the new string a palindrome string
成功解决之idea引用Lombok的@Slf4j后无法正常使用log
Refresh the strong pointer assignment problem in the HP-UX system of Sanguan
find_ path、find_ Library memo
LeetCode 128最长连续序列
Nftgamefi chain game system development detailed solution - chain game system development principle analysis
Summary of several common UML diagrams
Summary of alter operation in SQL
商品秒杀系统
Using cache in vuex to solve the problem of data loss in refreshing state
Tag dynamic programming - preliminary knowledge for question brushing -2 0-1 knapsack theory foundation and two-dimensional array solution template
The goal you specified requires a project to execute but there is no POM
The king of Internet of things protocol: mqtt
项目实战六:分布式事务-Seata
SSO微服务工程中用户行为日志的记录
Wechat applet uniapp left slide delete with Delete Icon
转:苹果CEO库克:伟大的想法来自不断拒绝接受现状
Résolution du problème: la machine virtuelle n'a pas pu copier et coller le fichier