维基关于Android变焦view.jar变焦、Android、jar、view

由网友(我在梦里看见你)分享简介:有没有维基或就如何落实的Andr​​oid变焦view.jar任何文件。我发现它在 HTTP://$c$c.google.com/ P / Android的缩放视图/ ,然后我想尝试使用它在我的应用程序中实现变焦Android上滚动视图,但它让我很难做到这一点,因为我无法找到任何维基一下吧。Is there any...

有没有维基或就如何落实的Andr​​oid变焦view.jar任何文件。我发现它在 HTTP://$c$c.google.com/ P / Android的缩放视图/ ,然后我想尝试使用它在我的应用程序中实现变焦Android上滚动视图,但它让我很难做到这一点,因为我无法找到任何维基一下吧。

Is there any Wiki or any documents on how to implement android-zoom-view.jar. I found it on http://code.google.com/p/android-zoom-view/ and i wanna try to use it on my application to implement zooming on android scrollview but it's giving me a hard time to do it since i cant find any Wiki about it.

有任何意见或建议都非常AP preciated。

Any comments or suggestions are very much appreciated.

在此先感谢

推荐答案

我想分享我如何使用Android变焦view.jar code。 这是我如何使用它。

I wanna share my code on how to use the android-zoom-view.jar. This is how I use it.

创建一个新的布局(R.layout.zoomable_view)的,我想应用的缩放功能视图。 在里面ZOOMVIEW把它。

然后把ZOOMVIEW到你想要显示的缩放视图中的主容器。 Create a new layout (R.layout.zoomable_view) for Views that i want to apply the zooming functionality. Place it inside ZoomView.

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.zoomable_view, 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);            
}

我希望这将帮助别人。

阅读全文

相关推荐

最新文章