2013-11-26 1 views
0

XML로 상대적인 레이아웃이 있습니다. 버튼을 눌러에 나는 조회수를 TI 추가 오전 :팬 및 줌 구현

LayoutInflater inflater = 
    (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
    View iv = inflater.inflate(R.layout.motor_block, null); 
    //LinearLayout iv = (LinearLayout) findViewById(R.id.motor_block); 
    RelativeLayout rl = (RelativeLayout) findViewById(R.id.layout); 

    rl.addView(iv); 

을 그때 개별적으로 각보기를 끌어 OnTouch를 사용하고 있습니다. 모든 뷰에 팬 및 확대/축소를 그룹으로 추가 할 수 있습니까?

+0

여기에 내 대답을 참조하십시오 : [http://stackoverflow.com/questions/20225265/pinch-zoom-and-pan/20226476#20226476][1] [1] : HTTP : // stackoverflow.com/questions/20225265/pinch-zoom-and-pan/20226476#20226476 – beplaya

답변

0

예, 기본 레이아웃에서 onTouchListener를 설정하고 ScaleGestureDetector를 추가해야하며 onScale 메서드 내부에 원하는대로보기를 조작 할 수 있습니다.