德州学院学报
德州學院學報
덕주학원학보
JOURNAL OF DEZHOU UNIVERSITY
2015年
2期
62-65
,共4页
安卓%自定义控件%手势%缩放
安卓%自定義控件%手勢%縮放
안탁%자정의공건%수세%축방
Android%customized control%gesture%zoom
为满足一个 Android 平板应用的需求,提出了一种可自由缩放的自定义控件的设计。该自定义控件可以响应双击、单点划动、双点划动等手势操作,并且可以通过手势来编辑控件的位置和宽高。控件不仅实现了缩放,还可以在缩放中改变控件的宽高比例。介绍了基于 Android 的自定义控件的设计原理和多种手势的识别和处理方法,详细讨论了可改变宽高比例的缩放的实现算法。
為滿足一箇 Android 平闆應用的需求,提齣瞭一種可自由縮放的自定義控件的設計。該自定義控件可以響應雙擊、單點劃動、雙點劃動等手勢操作,併且可以通過手勢來編輯控件的位置和寬高。控件不僅實現瞭縮放,還可以在縮放中改變控件的寬高比例。介紹瞭基于 Android 的自定義控件的設計原理和多種手勢的識彆和處理方法,詳細討論瞭可改變寬高比例的縮放的實現算法。
위만족일개 Android 평판응용적수구,제출료일충가자유축방적자정의공건적설계。해자정의공건가이향응쌍격、단점화동、쌍점화동등수세조작,병차가이통과수세래편집공건적위치화관고。공건불부실현료축방,환가이재축방중개변공건적관고비례。개소료기우 Android 적자정의공건적설계원리화다충수세적식별화처리방법,상세토론료가개변관고비례적축방적실현산법。
In order to meet the needs of an Android application,this paper puts forward a customized control derived from ImageView.The customized control can response to gestures such as double-click, single-fling,double-fling.It can also be edited with the location and size by gestures.Due to the specific requirements of the application,the customized control can not only be zoomed,but also be changed by the ratio of width and height.The paper mainly introduces the principle to design a control and the recognition and processing method of some gestures.And it also introduces the algorithm implementation with which the control can be changed by the ratio of width and height.