Zoomable pictures are only supported in Webview and Mapview. So first we have to create a Webview layout with zoom controls in it.
First copy the picture in to the assets folder
Then, Copy the following code in to activity_main.xml file
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapActivity" >
<ZoomControls
android:id="@+id/zoomControls1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="52dp"
android:layout_marginRight="20dp" />
<WebView
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
/>
</RelativeLayout>
Now vopy the following code in the oncreate method,in ActivityMain.Java file
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
// Show the Up button in the action bar.
//getActionBar().setDisplayHomeAsUpEnabled(true);
WebView WV = (WebView)findViewById (R.id.webView1);
WV.loadUrl("file:///android_asset/kerala.jpg");
WV.getSettings().setBuiltInZoomControls(true);
WV.getSettings().setSupportZoom(true);
}
You are done.Dont forget to replace the kerala.jpg file name with your filename of picture. Just run the application yoiu will find the picture as zoomable.
This blog is created to help you in Android Development.This will be helpful to Beginners as well as Experiencing Developers. For easy understanding screen shots and graphics are widely used.To further help you, links to useful Android resources and an Exclusive search in best Android forums is given. In contrast to other Android sites many shortcuts and very useful tips are also given. You may post your feedback, syntax, tips and shortcuts as comments.
Thursday, March 21, 2013
e. How to give a zoomable picture in an Application
Android Development Help
e. How to give a zoomable picture in an Application
Subscribe to:
Post Comments (Atom)
Zoomable picture is good fun and android application developers can develop this according to the requirement. This xml file help for the same one. Great one.
ReplyDeleteThis page is insightful and helpful. Lots of people will assert that everything in your site is great. asp.net training in jalandhar
ReplyDeleteThis is very interesting post, keep more sharing. Website Designing Company Bangalore | Web Designing Company Bangalore
ReplyDeleteThanks for sharing this information. your blog is good and I got so much knowledge. Please visit https://goo.gl/Za2Qf4
ReplyDeleteNice Blog
ReplyDeleteMobile app Development Company in Dubai at
http://www.appslure.online
Mobile app development company in Kuwait at
http://www.appslure.online/mobile-app-development-company-kuwait.html
Mobile App Development Company in Abu Dhabi at
http://www.appslure.online/mobile-app-development-company-abu-dhabi-uae.html
hello,
ReplyDeletei just want to say that you have clearly mention the process very clearly and i also found it is very much easy
to understand. keep sharing.
ios app development company in chennai
Great post. I was checking continuously this blog and I am impressed! I enjoyed reading your post. Please continue publishing helpful information like this. I like this type of information and share my opinion with you.Digital Marketing Company in India | Travel Technology Software | Software Development Solutions in India | Web Design Services in India | Mobile App Developer Noida
ReplyDeleteThe using this method cheap essay does not require any special skills for a successful completion. The scalable image easily becomes noticeable thanks to this.
ReplyDeleteHello sir,
ReplyDeleteThank you very much for sharing this huge explosion with us. It's really helpful and informative.
Keep blogging for new updates.
DedicatedHosting4u.com
This is a fantastic idea! I like it a lot because it's super easy for the audience to see the value of opting in. wonderful and amazing post very use full your post thanks for sharing your article
ReplyDeleteBest training institute in Noida
Best Python django training institute in Noida
Best Artificial Intelligence training institute in Noida
Best Machine Learning training institute in Noida
Best Business Analyst training institute in Noida
Best Data Science training institute in Noida
Best Software Testing training institute in Noida
Best Data Analyst training institute in Noida
This is most informative and also this post most user-friendly and super navigation to all posts.
ReplyDeleteOnline Data Science Classes
Selenium Training in Pune
AWS Online Classes
Python Online Classes
Wow Very Nice Post I really like This Post. Please share more post.
ReplyDeletePlant Engineering Services
Offshore Engineering Services India
Iwrite India, is one of the leading Web Presence Management Services In Delhi, Content Writing Company in India offers Content Writing services, helps you promote & engage business on Google search engines and social platforms. Enhance your online digital presence through our best Web Presence Management.
ReplyDeleteWeb Presence Management In Delhi
Web Presence Management Services
Web Presence Management Services In Delhi
Web Presence Management
Digital Branding Company In Delhi
Digital Branding
Content Marketing Services
Social Media Marketing Agency Delhi
Social Media Marketing Company In Delhi
Social Media Marketing Company
Website Content Writing Services In Delhi
Content Development
Website Content Writing Services
Website Content Development
Content Writing Services In Delhi
Content Writing Services In India
Content Writing Agency In Delhi
Hey Nice Blog!! Thanks for Sharing!!!Wonderful blog & good post. It’s really helpful for me, waiting for a newer post. Keep Blogging!
ReplyDeleteBest Online Bookstore in Patna
You have shared some amazing ideas!
ReplyDeleteGood work and thank you for sharing this information.
I congratulate your effort to do this.
Online Book Shopping Application
Online Book Shopping App
Great share! Thanks for the information. Keep going1
ReplyDelete