문제

HI,
I have a problem in dynamically adding horizontal and vertical scrollbar to a view . Basically the application zoom in and zoom out an image. I want to put horizontal and vertical scrollbar dynamically whenever view is out bounds. i.e. when zoom in is click and view is gonna out of bond, then it automatically add scrollbar. I am using these two methods but they didn't work correctly.
        setVerticalScrollBarEnabled(true);
        setHorizontalScrollBarEnabled(true);
Does i have to put these methods inside onDraw(Canvas canvas) method of the view?
Note: I am not creating view using xml file. I am creating view using a class which is inherited from View.
Thank you!!

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top