code-crusher/Image-Zoomer
关于
:iphone: Image zoom animations library for Android.
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Image-Zoomer
Specs
Image zoomer provides easy way to add zoom animations to you ImageButton. You can set the animation duration and reverse mode to reverse the animation.
Featured in
Screenshots
###Zoom

Zoom Reverse

Integration
- ImageZoomer is available in the MavenCentral, so getting it as simple as adding it as a dependency
compile 'com.vatsal.imagezoomer:image-zoomer:1.0.2'
Usage
Method 1 : XML
In your activity_main.xml file use this code instead of ImageButton:
<com.vatsal.imagezoomer.ImageZoomButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher" />
Attributes
- • To set the duration use:
- • To use the reverse mode:
Method 2 : Java
In your MainActivity.class use this code in OnClick() of ImageButton:
Activity activity = getActivity();
ImageButton imageButton = (ImageButton) findViewById(R.id.image_button);
long duration = 500;
- For simple zoom:
imageButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ZoomAnimation zoomAnimation = new ZoomAnimation(activity);
zoomAnimation.zoom(v, duration);
}
});
- For Reverse zoom:
imageButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ZoomAnimation zoomAnimation = new ZoomAnimation(activity);
zoomAnimation.zoomReverse(v, duration);
}
});
| Variable | Type |
|---|---|
| image_button | ImageButton |
| activity | Activity |
| duration(ms) | long |
License
Copyright 2016 Vatsal Bajpai
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
探索相关项目
加载中…