本文實例為大家分享了android Matrix圖片隨意放大縮小和拖動的具體代碼,供大家參考,具體內(nèi)容如下
step1:新建一個項目DragAndZoom,并準備一張照片放在res/drawable-hdpi目錄下,如下圖所示:
step2: 設置應用的UI界面,在main.xml中設置:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/wall" android:id="@+id/imageView" android:scaleType="matrix" /> <!-- 指定為matrix類型 --> </LinearLayout>
網(wǎng)站欄目:androidMatrix實現(xiàn)圖片隨意放大縮小或拖動-創(chuàng)新互聯(lián)
轉(zhuǎn)載來于:http://aaarwkj.com/article44/dspshe.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站建設、網(wǎng)站營銷、手機網(wǎng)站建設、云服務器、網(wǎng)站設計公司、服務器托管
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容