How to make scrollable layout and scalable layout in Android app?

I am creating an Android application and I need one of my layouts to control scaling and it can be scrolled vertically, but I do not know how to do this successfully?

+4
source share
1 answer

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); } 
0
source

Source: https://habr.com/ru/post/1336651/


All Articles