fix image viewer

This commit is contained in:
Page Asgardius 2022-09-12 15:42:54 -07:00
parent b8fabcc1c6
commit 05649822ec

View file

@ -15,14 +15,15 @@ import java.net.URL;
import java.util.stream.Collectors; import java.util.stream.Collectors;
public class ImageViewer extends AppCompatActivity { public class ImageViewer extends AppCompatActivity {
String videoURL;
ImageView iv;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_image_viewer); setContentView(R.layout.activity_image_viewer);
final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar); final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar);
String videoURL = getIntent().getStringExtra("video_url"); iv = (ImageView) findViewById(R.id.imageViewer);
ImageView iv=(ImageView) findViewById(R.id.imageViewer);
//System.out.println(videoURL); //System.out.println(videoURL);
Thread imgread = new Thread(new Runnable() { Thread imgread = new Thread(new Runnable() {
@ -30,6 +31,7 @@ public class ImageViewer extends AppCompatActivity {
public void run() { public void run() {
try { try {
//Your code goes here //Your code goes here
videoURL = getIntent().getStringExtra("video_url");
URL thumb_u = new URL(videoURL); URL thumb_u = new URL(videoURL);
Drawable thumb_d = Drawable.createFromStream(thumb_u.openStream(), "src"); Drawable thumb_d = Drawable.createFromStream(thumb_u.openStream(), "src");