Skip to main content

Android - Zoom Image Using Intent





create Activity add this code :


 package com.zoomimage;  
 import java.io.File;  
 import android.app.Activity;  
 import android.content.Intent;  
 import android.net.Uri;  
 import android.os.Bundle;  
 import android.view.View;  
 import android.view.View.OnClickListener;  
 import android.widget.Button;  
 import android.widget.ImageView;  
 import android.widget.Toast;  
 public class ZoomimageActivity extends Activity {  
      private ImageView imagev;  
      private Uri uri_img;  
      private Button btnZ;  
      private String mimetype;  
      /** Called when the activity is first created. */  
      @Override  
      public void onCreate(Bundle savedInstanceState) {  
           super.onCreate(savedInstanceState);  
           setContentView(R.layout.main);  
           imagev = (ImageView) findViewById(R.id.imageView1);  
           // imagev.setImageUri(Uri.fromFile(new File("/sdcard/test.jpg")));  
           // imagev.setImageUri(Uri.parse(new File("/sdcard/cats.jpg").toString()));  
           uri_img = Uri.fromFile(new File("/sdcard/test.jpg"));  
           imagev.setImageURI(uri_img);  
           String extension = android.webkit.MimeTypeMap  
                     .getFileExtensionFromUrl(uri_img.toString());  
           mimetype = android.webkit.MimeTypeMap.getSingleton()  
                     .getMimeTypeFromExtension(extension);  
           btnZ = (Button) findViewById(R.id.button1);  
           btnZ.setOnClickListener(new OnClickListener() {  
                @Override  
                public void onClick(View v) {  
                     // TODO Auto-generated method stub  
                     Toast.makeText(ZoomimageActivity.this, "Please wait..",  
                               Toast.LENGTH_SHORT).show();  
                     Intent i = new Intent(android.content.Intent.ACTION_VIEW);  
                     i.setDataAndType(uri_img, mimetype);  
                     startActivity(i);  
                }  
           });  
      }  
 }  

Enjoy Coding....

Comments

Popular posts from this blog

Stop Babysitting your AI Coding Agent Every Single Session

  Watched a video by DSquaredLabs on " No more re-explaining: Give your AI agent a memory graph " — here's what stuck with me and why I think this three-tool system is worth your attention If you work on a large codebase with AI coding tools, you already know the ritual. Open a new chat, paste your file structure, explain your stack, describe how the modules connect — and repeat the whole thing tomorrow. It is not a minor inconvenience. It is a compounding productivity tax that gets worse as your project grows. This article breaks down a three-tool system designed to fix exactly that. If you want the full walkthrough with a live demo on a real monorepo, the video at the bottom covers everything in depth — but the core concepts are worth understanding before you dive in. The Problem With How Most Developers Use AI Today Most AI-assisted coding workflows are missing three things that every good engineering team actually has: A map of the codebase A process for how w...

Android - Notifications - 3 (Applying a big view style to a notification)

Big picture style Bitmap icon1 = BitmapFactory.decodeResource(getResources(), R.drawable.dhaval1); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder( this).setAutoCancel(true) .setContentTitle("DJ-Android notification") .setSmallIcon(R.drawable.ic_launcher).setLargeIcon(icon1) .setContentText("Hello World!"); NotificationCompat.BigPictureStyle bigPicStyle = new NotificationCompat.BigPictureStyle(); bigPicStyle.bigPicture(icon1); bigPicStyle.setBigContentTitle("Dhaval Sodha Parmar"); mBuilder.setStyle(bigPicStyle); // Creates an explicit intent for an Activity in your app Intent resultIntent = new Intent(this, testActivity.class); // The stack builder object will contain an artificial ba...

Don't Ship AI Agent Skills Without Evals

At the AI Engineer World's Fair on July 1, 2026, Philipp Schmid, a Staff Engineer on the Gemini API and agents team at Google DeepMind, asked a room full of engineers a simple question: who uses skills with their coding agents? Every hand went up. Who has evals for those skills? Almost none. That gap is the entire talk, which Schmid also wrote up on his own blog, philschmid.de/testing-skills . His team indexed the skills ecosystem through SkillsBench and found the same pattern everywhere: people ship a SKILL.md file after two manual test runs and move on. It looks fine in a demo. It quietly corrupts outputs in production, because bad skills don't crash. They just make the agent confidently wrong. If you've already read our breakdown of Matt Pocock's Claude Code skills library , think of this as the other half of that story: what happens once you've installed a skill and it's actually running against real prompts. Key Takeaways SkillsBench indexed 47,000+ un...