当前位置: 首页>>代码示例>>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;未经允许,请勿转载。