我正在制作一个Android应用程序,我需要一个我的布局来进行缩放控制并将其设置为Scrollable Vertical,但我不知道如何成功执行此操作?
答案 0 :(得分:0)
use this jar in your application
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); }