Image Scaling plug-in GestureImageView-recommended for common Android plug-ins (1)

Source: Internet
Author: User

In the Android development process, the interaction effect is a very tedious process, and even more complex than JS special effects in the Web development process. After years of development, common interaction methods have developed quite mature and there are many excellent plug-ins. To avoid repeated wheel creation and some common special effects, we can use them directly to save our development time. Leave time to develop things with more characteristics. Here we will introduce some commonly used Android plug-ins, which are simple to use.

The first entry -- GestureImageView

Overview: the single-chart browser plug-in supports multi-point scaling of images, image dragging, opening, and double-click events. Click events do not conflict with touch events (you can understand similar programs you have written, the touch and click operations are easy to conflict and complicated to process)

Home: https://github.com/jasonpolites/gesture-imageview

Usage:

1. Download Code from Github

The example is used to teach you how to use it. It does not matter in actual use.

Main is the plug-in source code and needs to be put into your own project.

2. Basic Configuration

The main project can generate a jar package reference or use it as a reference for another project. However, you prefer to directly reference the Code to facilitate subsequent modification and naming.

Therefore, you can directly put the src content in the Main file into your project.

  

Because Layout is not involved, no error is reported.

3. Use

Create a Layout page

<?xml version="1.0" encoding="utf-8"?><="http://schemas.android.com/apk/res/android"-image="http://schemas.polites.com/android"="fill_parent"="fill_parent" android:gravity="center" >    <="@+id/dmImageView"="fill_parent"="wrap_content"-image:min-scale="0.1"-image:max-scale="10.0"-image:strict="false"  /></LinearLayout>

Note: xmlns: gesture-image = "http://schemas.polites.com/android" in LinearLayout reports an error if you do not add it. Carelessness is hard to find.

Gesture-image: min -- image: max -- image: strict

The usage is the same as that of ImageView. You can try other attributes on your own.

 

GestureImageView is easy to use and configure. It is very easy to start with, as the first plug-in recommended by this blogger. Next, we recommend a waterfall stream plug-in.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.