當前位置: 首頁>>代碼示例>>Java>>正文


Java PhotoViewAttacher.setOnMatrixChangeListener方法代碼示例

本文整理匯總了Java中uk.co.senab.photoview.PhotoViewAttacher.setOnMatrixChangeListener方法的典型用法代碼示例。如果您正苦於以下問題:Java PhotoViewAttacher.setOnMatrixChangeListener方法的具體用法?Java PhotoViewAttacher.setOnMatrixChangeListener怎麽用?Java PhotoViewAttacher.setOnMatrixChangeListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在uk.co.senab.photoview.PhotoViewAttacher的用法示例。


在下文中一共展示了PhotoViewAttacher.setOnMatrixChangeListener方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	mImageView = (ImageView) findViewById(R.id.iv_photo);
	mCurrMatrixTv = (TextView) findViewById(R.id.tv_current_matrix);

	Drawable bitmap = getResources().getDrawable(R.drawable.spine_crescent);
	mImageView.setImageDrawable(bitmap);

	// The MAGIC happens here!
	mAttacher = new PhotoViewAttacher(mImageView);

	// Lets attach some listeners, not required though!
	mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
	mAttacher.setOnPhotoTapListener(new PhotoTapListener());
}
 
開發者ID:netskink,項目名稱:Dust514SkirmishMaps,代碼行數:19,代碼來源:SpineCrescentActivity.java

示例2: onCreate

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	mImageView = (ImageView) findViewById(R.id.iv_photo);
	mCurrMatrixTv = (TextView) findViewById(R.id.tv_current_matrix);

	Drawable bitmap = getResources().getDrawable(R.drawable.ashland);
	mImageView.setImageDrawable(bitmap);

	// The MAGIC happens here!
	mAttacher = new PhotoViewAttacher(mImageView);

	// Lets attach some listeners, not required though!
	mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
	mAttacher.setOnPhotoTapListener(new PhotoTapListener());
}
 
開發者ID:netskink,項目名稱:Dust514SkirmishMaps,代碼行數:19,代碼來源:AshlandActivity.java

示例3: onCreate

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	mImageView = (ImageView) findViewById(R.id.iv_photo);
	mCurrMatrixTv = (TextView) findViewById(R.id.tv_current_matrix);

	Drawable bitmap = getResources().getDrawable(R.drawable.iron_delta);
	mImageView.setImageDrawable(bitmap);

	// The MAGIC happens here!
	mAttacher = new PhotoViewAttacher(mImageView);

	// Lets attach some listeners, not required though!
	mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
	mAttacher.setOnPhotoTapListener(new PhotoTapListener());
}
 
開發者ID:netskink,項目名稱:Dust514SkirmishMaps,代碼行數:19,代碼來源:IronDeltaActivity.java

示例4: onCreate

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	mImageView = (ImageView) findViewById(R.id.iv_photo);
	mCurrMatrixTv = (TextView) findViewById(R.id.tv_current_matrix);

	Drawable bitmap = getResources().getDrawable(R.drawable.manus_peak);
	mImageView.setImageDrawable(bitmap);

	// The MAGIC happens here!
	mAttacher = new PhotoViewAttacher(mImageView);

	// Lets attach some listeners, not required though!
	mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
	mAttacher.setOnPhotoTapListener(new PhotoTapListener());
}
 
開發者ID:netskink,項目名稱:Dust514SkirmishMaps,代碼行數:19,代碼來源:ManusPeakActivity.java

示例5: onCreate

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	mImageView = (ImageView) findViewById(R.id.iv_photo);
	mCurrMatrixTv = (TextView) findViewById(R.id.tv_current_matrix);

	Drawable bitmap = getResources().getDrawable(R.drawable.skim_junction);
	mImageView.setImageDrawable(bitmap);

	// The MAGIC happens here!
	mAttacher = new PhotoViewAttacher(mImageView);

	// Lets attach some listeners, not required though!
	mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
	mAttacher.setOnPhotoTapListener(new PhotoTapListener());
}
 
開發者ID:netskink,項目名稱:Dust514SkirmishMaps,代碼行數:19,代碼來源:SkimJunctionActivity.java

示例6: onCreate

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	mImageView = (ImageView) findViewById(R.id.iv_photo);
	mCurrMatrixTv = (TextView) findViewById(R.id.tv_current_matrix);

	Drawable bitmap = getResources().getDrawable(R.drawable.line_harvest);
	mImageView.setImageDrawable(bitmap);

	// The MAGIC happens here!
	mAttacher = new PhotoViewAttacher(mImageView);

	// Lets attach some listeners, not required though!
	mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
	mAttacher.setOnPhotoTapListener(new PhotoTapListener());
}
 
開發者ID:netskink,項目名稱:Dust514SkirmishMaps,代碼行數:19,代碼來源:LineHarvestActivity.java

示例7: instantiateItem

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
@SuppressWarnings("NewApi")
public Object instantiateItem(ViewGroup container, int position) {
    View v = inflater.inflate(R.layout.view_pdf_page, container, false);
    ImageView iv = (ImageView) v.findViewById(R.id.imageView);

    if (renderer == null || getCount() < position) {
        return v;
    }

    PdfRenderer.Page page = getPDFPage(renderer, position);

    Bitmap bitmap = bitmapContainer.get(position);
    page.render(bitmap, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
    page.close();

    PhotoViewAttacher attacher = new PhotoViewAttacher(iv);
    attacher.setScale(scale.getScale(), scale.getCenterX(), scale.getCenterY(), true);
    attacher.setOnMatrixChangeListener(this);

    attachers.put(position, new WeakReference<PhotoViewAttacher>(attacher));

    iv.setImageBitmap(bitmap);
    attacher.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
        @Override
        public void onPhotoTap(View view, float x, float y) {
            if (pageClickListener != null) {
                pageClickListener.onPageTap(view, x, y);
            }
        }
    });
    attacher.update();
    container.addView(v, 0);

    return v;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:37,代碼來源:PDFPagerAdapter.java

示例8: instantiateItem

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
@SuppressWarnings("NewApi")
public Object instantiateItem(ViewGroup container, int position) {
    View v = inflater.inflate(R.layout.view_pdf_page, container, false);
    ImageView iv = (ImageView) v.findViewById(R.id.imageView);

    if (renderer == null || getCount() < position) {
        return v;
    }

    PdfRenderer.Page page = getPDFPage(renderer, position);

    Bitmap bitmap = bitmapContainer.get(position);
    page.render(bitmap, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
    page.close();

    PhotoViewAttacher attacher = new PhotoViewAttacher(iv);
    attacher.setScale(scale.getScale(), scale.getCenterX(), scale.getCenterY(), true);
    attacher.setOnMatrixChangeListener(this);

    attachers.put(position, new WeakReference<PhotoViewAttacher>(attacher));

    iv.setImageBitmap(bitmap);
    attacher.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
        @Override
        public void onPhotoTap(View view, float x, float y) {
            pageClickListener.onClick(view);
        }
    });
    attacher.update();
    ((ViewPager) container).addView(v, 0);

    return v;
}
 
開發者ID:voghDev,項目名稱:PdfViewPager,代碼行數:35,代碼來源:PDFPagerAdapter.java

示例9: onCreate

import uk.co.senab.photoview.PhotoViewAttacher; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.imageview);
	
	   
       Intent intent = getIntent(); //인텐트  받아오고
       String url = intent.getStringExtra("url"); //인텐트로 부터 데이터 가져오고

	mImageView = (ImageView) findViewById(R.id.iv_photo);
	
	new ImageDownloader()
	.execute(url);


	// The MAGIC happens here!
	mAttacher = new PhotoViewAttacher(mImageView);

	// Lets attach some listeners, not required though!
	mAttacher.setOnMatrixChangeListener(new MatrixChangeListener());
	mAttacher.setOnPhotoTapListener(new PhotoTapListener());
	
	
}
 
開發者ID:tarksgit,項目名稱:SAOSP,代碼行數:25,代碼來源:imageview.java


注:本文中的uk.co.senab.photoview.PhotoViewAttacher.setOnMatrixChangeListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。