All Projects → justasm → Windowview

justasm / Windowview

Licence: mit
Android ImageView you pan by tilting your device.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Windowview

RoundImage
This library is used for converting Bitmap or Drawable images to Round or Circular Shape. Round image view for Android or Circular Image View for Android.Tags Android Round Circularimageview Circle Rounded Corner imageview library.
Stars: ✭ 42 (-84.39%)
Mutual labels:  imageview
Leon
Leon is swift library to show and slid images with more gesture
Stars: ✭ 16 (-94.05%)
Mutual labels:  imageview
TNImageView-Android
Android Library for making scale-able and rotatable image views or giving this power to your own image view. This repo has been depreciated.
Stars: ✭ 18 (-93.31%)
Mutual labels:  imageview
FaceAware-Android
this helps to auto zoom for face on ImageView
Stars: ✭ 46 (-82.9%)
Mutual labels:  imageview
NoiseView
Android library written in kotlin that add a noise effect to image.
Stars: ✭ 47 (-82.53%)
Mutual labels:  imageview
ImageView
Qt自定义图片显示控件-支持加载本地图片和网络图片,并支持缓存
Stars: ✭ 14 (-94.8%)
Mutual labels:  imageview
ProgressableImageView
Change your users progress capability with ProgressableImageView
Stars: ✭ 86 (-68.03%)
Mutual labels:  imageview
progress-image-view-android
Simple progress with ImageView android
Stars: ✭ 64 (-76.21%)
Mutual labels:  imageview
Parrot
A simple way to handle remote image in Kotlin.
Stars: ✭ 21 (-92.19%)
Mutual labels:  imageview
bubble-layout
An Android ViewGroup that displays avatar bubbles... similar to the chat bubbles on Facebook Messenger.
Stars: ✭ 46 (-82.9%)
Mutual labels:  imageview
CombineView
View that combines multiple images
Stars: ✭ 27 (-89.96%)
Mutual labels:  imageview
Image-Support
Add badge with counter to ImageView Android.
Stars: ✭ 128 (-52.42%)
Mutual labels:  imageview
StickerView
仿微博贴纸效果实现
Stars: ✭ 102 (-62.08%)
Mutual labels:  imageview
aspect-ratio-imageview
A simple imageview which scales the width or height aspect with the given ratio
Stars: ✭ 72 (-73.23%)
Mutual labels:  imageview
imagin
An attachable image zooming library for the Android ImageView.
Stars: ✭ 17 (-93.68%)
Mutual labels:  imageview
SquareImageView
SquareImageView is a simple wrapper library for Android ImageView
Stars: ✭ 28 (-89.59%)
Mutual labels:  imageview
image-zoom-view
Imageview zoom library for android
Stars: ✭ 52 (-80.67%)
Mutual labels:  imageview
Diagonal Imageview
A simple imageview which allows you to create diagonal cut views easily
Stars: ✭ 257 (-4.46%)
Mutual labels:  imageview
ImageViewProcess
ImageView图像处理功能实现+文件加解密
Stars: ✭ 29 (-89.22%)
Mutual labels:  imageview
easy-animated-vector-drawable
A library that helps using Animated Vector Drawables.
Stars: ✭ 40 (-85.13%)
Mutual labels:  imageview

WindowView

Window as in windowsill.

Tilting to pan images.

An Android ImageView that can be panned around by tilting your device, as if you were looking through a window.

Usage

Add it to your project using Gradle:

compile 'com.jmedeisis:windowview:0.2.0'

Use in place of an ImageView. Example XML layout file:

<com.jmedeisis.windowview.WindowView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/my_image" />

Please refer to the included sample application project for a complete example.

Configuration

You will typically want to configure the following attributes for the WindowView class:

  • wwv_max_pitch - maximum angle (in degrees) from origin for vertical device tilts. Default - 30°

  • wwv_max_roll - maximum angle (in degrees) from origin for horizontal device tilts. Default - 30°

  • wwv_vertical_origin - (in degrees) when device pitch equals this value, the image is centered vertically. Default - 0°

  • wwv_horizontal_origin - (in degrees) when device roll equals this value, the image is centered horizontally. Default - 0°

You may also want to configure more advanced attributes:

  • wwv_orientation_mode - Absolute or Relative (default). Specifies whether device tilt should be tracked with respect to Absolute world coordinates (i.e. pitch, roll w.r.t. ground plane) or with respect to the device orientation when WindowView is created, which WindowView refers to as the 'orientation origin'. If using the latter, i.e. Relative, you may use WindowView#resetOrientationOrigin(boolean) to set the orientation origin to that of the device when the method is called.

  • wwv_translate_mode - Constant or Proportional (default). Specifies how much the image is translated in response to device tilt. If Proportional, the image moves within the full range defined by max_pitch / max_roll, with the extremities of the image visible when device pitch / roll is at those angles. If Constant, the image moves a constant amount per unit of tilt which is defined by max_constant_translation, achieved when pitch / roll are at max_pitch / max_roll.

  • wwv_max_constant_translation - see above. Default - 150dp

  • wwv_sensor_sampling_period - the desired rate of sensor events. In microseconds or one of fast, normal (default) or slow. If using microsecond values, higher values result in slower sensor updates. Directly related to the rate at which WindowView updates in response to device tilt.

  • wwv_tilt_sensor_mode - Manual or Automatic (default). Specifies whether WindowView is responsible for when tilt motion tracking starts and stops. If Automatic, WindowView works out of the box and requires no extra configuration. If Manual, you must explicitly start and stop tilt motion tracking. You have two options:

    • Use WindowView#startTiltTracking() and WindowView#stopTiltTracking(), e.g. in your Activity's onResume() and onPause(), respectively.

    • Use WindowView#attachTiltTracking(TiltSensor) and WindowView#detachTiltTracking(TiltSensor). This approach is recommended when using multiple WindowViews in a single logical layout. The externally managed TiltSensor should be started and stopped using TiltSensor#startTracking(int) and TiltSensor#stopTracking() as appropriate.

Example configuration:

<com.jmedeisis.windowview.WindowView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/my_image"
    app:wwv_tilt_sensor_mode="Manual"
    app:wwv_orientation_mode="Relative"
    app:wwv_translate_mode="Constant"
    app:wwv_max_constant_translation="100dp"
    app:wwv_sensor_sampling_period="fast"
    app:wwv_max_pitch="15"
    app:wwv_max_roll="15"
    app:wwv_vertical_origin="0"
    app:wwv_horizontal_origin="0" />

Limitations

  • Only supports the CENTER_CROP scale type.
  • Works for API levels 9+.

Development

Pull requests are welcome and encouraged for bugfixes and features such as:

  • adaptive smoothing filters tuned for different sensor accuracy and rates
  • bi-directional image panning

License

WindowView is licensed under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].