0 支持手勢拉大和拉小的Android ImageView:GestureImageView jopen 10年前發布 | 39K 次閱讀 Android開發 移動開發 GestureImageView GestureImageView實現了一個支持手勢縮放,旋轉,平移的Android ImageView。 配置成layout.xml中的一個view <LinearLayout xmlns:android=" <com.polites.android.GestureImageView android:id="@+id/image" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/image" gesture-image:min-scale="0.1" gesture-image:max-scale="10.0" gesture-image:strict="false"/> </LinearLayout></pre> 編程的方式配置 import com.polites.android.GestureImageView; import android.app.Activity; import android.os.Bundle; import android.view.ViewGroup; import android.widget.LinearLayout.LayoutParams; public class SampleActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); GestureImageView view = new GestureImageView(this); view.setImageResource(R.drawable.image); view.setLayoutParams(params); ViewGroup layout = (ViewGroup) findViewById(R.id.layout); layout.addView(view); } }</pre> 特性: Pinch zoom in place (i.e. zoom occurs from point of touch) Panning with fling gesture Double tap zoom Configurable zoom boundaries (min/max) </ol> 項目主頁:http://www.baiduhome.net/lib/view/home/1389766177289 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享! 本文地址:http://www.baiduhome.net/lib/view/open1389766177289.html Android開發 移動開發 GestureImageView 相關經驗 支持手勢拉大和拉小的Android ImageView:GestureImageView Android中圖片的放大和縮小源碼 通過手勢實現Android ImageView 縮放 Android Gusture 手勢識別小案例 Android上拉刷新列表數據 相關資訊 Linux驅動凱迪拉克 納德拉時代下的微軟開源之路 納德拉:Windows 10將無所不在 從.NET的開源到納徳拉時代的「新微軟」 Google Blink 團隊已從 Webkit 中拉取 880 萬行代碼 相關文檔 歐拉圖回路Java Android 手勢識別 Android開發中ImageButton與ImageView的使用 02 Java 小程序 小機培訓-01 小機培訓-02 Android 常用控件大全 目錄