I am having an xml file which I want to make zoomable.
Asked
Active
Viewed 1.6k times
4
-
Change font size...... – Marcin Orlowski Apr 06 '13 at 09:29
-
http://myandroidnote.blogspot.ch/2011/03/zooming-view-completely.html see this link – Venkat Apr 06 '13 at 09:33
1 Answers
28
use this jar in your application
1.Create a new layout (R.layout.zoomableview) for Views that i want to apply the zooming functionality.
2.Place it inside ZoomView.
3.Then place the ZoomView to the main container where you want to show the zoomable view.
private ZoomView zoomView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_zoomable);
View v = ((LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.zoomableview, null, false);
v.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
zoomView = new ZoomView(this);
zoomView.addView(v);
main_container = (LinearLayout) findViewById(R.id.main_container);
main_container.addView(zoomView); }

Venkat
- 3,447
- 6
- 42
- 61
-
@BlackTiger which layout we can declare in inflate layout ....... – NagarjunaReddy Mar 18 '14 at 11:58
-
-
-
-
-
@JibranKhan How to I set the dynamic image from gallery in the zoomView? Can you help me please? – reegan29 Jun 02 '15 at 07:32
-
@reegan29 add imageview in zoomview and change the source of image dynamically from gallery – Jibran Khan Jun 02 '15 at 08:05
-
-
-
great at last its working. R.layout.activity_zoomable has the only one root layout named main_container, and your real xml file should be another the zoomable layout which inflated. – Noor Hossain Apr 23 '21 at 21:43
-
for complete implementation refer to : https://github.com/mosayeb-masoumi/zoom_whole_recyclerview – Mosayeb Masoumi Sep 06 '21 at 11:52