A tiling scrollview to display large picture (similar to iOS "CATiledLayer")

Overview

Project is not maintained right now. Please see the note at the end of this file.

Introduction

This Android widget aims to provide a scalable way to display large images (like Metro maps, paintings) while keeping the memory consumption as low as possible.

The source image will be provided in TILES, so that all tiles combined create the full scale image.

Current features:

  • Specify a image pattern to find the tiles
  • Freely navigate through the image using a two dimensional scroll view
  • Load required tiles on demand and non-blocking
  • Zoom levels using multiple levels of tiles
  • Panning, Pinching etc (multitouch gestures), work in progress

Planned features:

  • A way to overlay icons or other widgets at fix points (similar to Google Maps), which should be useful for annotations

Example

<asia.ivity.android.tiledscrollview.TiledScrollView
        android:id="@+id/tiledScrollView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        app:file_pattern="tiger400/crop_%col%_%row%.png"
        app:tile_height="100"
        app:tile_width="100"
        app:image_width="400"
        app:image_height="300"
        app:zoom_buttons="true"
        />

Attributes:

  • file_pattern - specifies the pattern to find the files. Placeholders %col% and %row% are mandatory
  • tile_height & tile_width - specify the tile dimensions. The widget should be able to handle non-fitting images (i.e. if the last tile is smaller then others tiles well)
  • image_height & image_width - image dimensions to support abovementioned functions.
  • zoom_buttons - whether to enable the zoom buttons, default is true.

The attributes are very likely to be reduced and cut. I prefer the widget to be more simple in the long term.

Multiple Zoom Levels

The View supports different zoom levels. You can add them using Java.

final TiledScrollView tiledScrollView = (TiledScrollView) findViewById(R.id.tiledScrollView);

tiledScrollView.addConfigurationSet(TiledScrollView.ZoomLevel.LEVEL_1,
        new ConfigurationSet("tiger800/crop_%col%_%row%.png", 100, 100, 800, 600));

tiledScrollView.addConfigurationSet(TiledScrollView.ZoomLevel.LEVEL_2,
        new ConfigurationSet("tiger1600/crop_%col%_%row%.png", 100, 100, 1600, 1200));

Credits

Apps using this library

Maven

The plugin is available in the maven central repository.

<dependency>
  <groupId>asia.ivity</groupId>
  <artifactId>tiledscrollview</artifactId>
  <version>1.1.1</version>
  <type>apklib</type>
</dependency>

License

This library is released under a BSD license. See the LICENSE file included with the distribution for details.

Not for you?

Check out https://github.com/moagrius/TileView, which is a up to date Tiling library which includes many features.

Comments
  • "Error inflating class"

    Hi, I get the following error, both in my own code when trying to use the library, and when running the example code provided. Can you provide any insight? I'm not even trying to do anything complicated.

    06-18 16:54:19.580: E/AndroidRuntime(4142): java.lang.RuntimeException: Unable to start activity ComponentInfo{asia.ivity.android.tiledscrollview/asia.ivity.android.tiledscrollview.TiledScrollViewSample}: android.view.InflateException: Binary XML file line #10: Error inflating class asia.ivity.android.tiledscrollview.TiledScrollView

    opened by antgel 3
  • mention xmlns:app in the README?

    mention xmlns:app in the README?

    First of all, thanks for making this library -- it's coming in really handy for a project of mine.

    Everything worked smoothly for me, except for one issue, over which I scratched my head for a while -- though perhaps it is obvious in retrospect.

    I suggest updating the README or sample/res/layout/main.xml to indicate that app in the XML configuration refers to xmlns:app="http://schemas.android.com/apk/res/..." where ... should be the PROJECT package url, and NOT the LIBRARY one. This isn't obvious in the sample, since it has the same namespace.

    In any case, great job!

    opened by namin 2
  • Zoom levels using multiple levels of tiles

    Zoom levels using multiple levels of tiles

    When browsing a very big picture, it would be nice to zoom out and see it in total. This should be done using different levels of tiles.

    This XML attribute would need another parameter

    app:file_pattern="clifford_layout_highres/CROP_%level%_%col%_%row%.jpg"
    

    whereas %level% is replaced with the zoom level.

    FEATURE 
    opened by ened 1
  • Image caching

    Image caching

    Does anybody have an implementation that enables tile caching so the app can get smooth loading?

    The problem with this library right now is the cleanup tile is too soon and too often.

    Thank you.

    FEATURE 
    opened by yolapop 2
  • Pinch-to-zoom function like Google Maps

    Pinch-to-zoom function like Google Maps

    Thanx for this awesome library!

    Maybe it's an idea to add a zoom effect like Google Maps. When you zoom in, the image where you zoom on will be stretched till both fingers are released, from that point the new tiles will be loaded.

    opened by SilvanLaroo 5
  • A way to overlay icons or other widgets at fix points (similar to Google Maps), which should be useful for annotations

    A way to overlay icons or other widgets at fix points (similar to Google Maps), which should be useful for annotations

    Set up a relative coordinate system and allow the user to use simple Java code to add overlay items that stay according to the zoom level at the same spot.

    FEATURE 
    opened by ened 0
Owner
Sebastian Roth
Connecting Apps with Bluetooth accessories
Sebastian Roth
A small android library for tagging views inside a ScrollView as "sticky" making them stick to the top of the scroll container until a new sticky view comes and takes it's place

StickyScrollViewItems StickyScrollViewItems is a ScrollView subclass that allowed you to mark items inside the ScrollView as sticky. The items marked

Emil Sjölander 1k Jan 7, 2023
Parallax ScrollView and ListView for Android

Parallax Scrolls Parallax ListView and ScrollView for Android This project includes ScrollView with one or more parallaxed views ListView with paralla

Nir Hartmann 851 Dec 3, 2022
Android library to display a ListView whose cells are not rigid but flabby and react to ListView scroll.

FlabbyListView This library is not maintained anymore and there will be no further releases Android library to display a ListView which cells are not

JPARDOGO 762 Nov 23, 2022
StackExpandableView - A custom view that resembles the iOS notification group behavior

StackExpandableView - A custom view that resembles the iOS notification group behavior

Fabio Sassu 155 Dec 15, 2022
Using RecyclerView to display data instead of ScrollView or lInearLayout for a strong app. It replaces the ScrollView used in trackMySleep app.

RecyclerView - SleepQualityTracker with RecyclerView app This is the toy app for Lesson 7 of the Android App Development in Kotlin course on Udacity.

Espérant GADA 0 Oct 18, 2021
Astronomy Picture of the Day Nasa(APOD) media listing and show picture details.

Astronomy Picture of the Day Nasa(APOD) media listing and show picture details. Built to learn and use of Latest Android development libs using Coroutines, Flow, Dagger-Hilt, Architecture Components, MVVM, Room, Retrofit, Material Guideline)

pRaNaY 5 Oct 18, 2022
A library to take picture easy, transform your data in different format and save photos in your device

A Magic library to take photos and select pictures in Android. In a simple way and if you need it also save the pictures in device, and facial recogni

Fabian Rosales (Frosquivel Developer) 331 Nov 20, 2022
Qart is Android App that's based on CuteR project. App generate QR code that merge a picture. So the QR code looks more beautiful.

Qart is Android App that's based on CuteR project. App generate QR code that merge a picture. So the QR code looks more beautiful.

scola 1k Dec 16, 2022
A sample code taking picture in android with app permission and simple ui

Android Taking Picture Sample Just sample code taking picture in android with ap

M. Hafizh Anbiya 2 Dec 29, 2021
KirinApp - Schedule, Picture Sharing App

Kirin App 일정 및 사진 공유 앱 Android Room Android DB API. 공식가이드 참고 Navigation Componen

null 1 Mar 5, 2022
A view pager indicator view to deal with a large amount of pages.

Attention I'm not going to support this anymore. Just use a better solution, e.g. this one Indefinite-Pager-Indicator BubblePagerIndicator A view page

Bogdan Kornev 134 Aug 18, 2022
An open source Android library that allows the visualization of large images with gesture capabilities

ByakuGallery ByakuGallery is an open source Android library that allows the visualization of large images with gesture capabilities. This lib is based

Diego Lima 311 Dec 4, 2022
Large-scale Viewer-participating Content Plugin for komq.

Advancement-Traveler Large-scale Viewer-participating Content Plugin for komq. Build ./gradlew clean dist Releases [Releases] Licenses [GNU General Pu

BaeHyeonWoo 6 Oct 29, 2022
A high-performance fork of Paper/Airplane designed for large servers.

Pufferfish A highly optimized Paper/Airplane fork designed for large servers requiring both maximum performance, stability, and "enterprise" features.

Pufferfish Studios LLC 399 Jan 7, 2023
Cesar Valiente 1 Sep 3, 2022
An implement of ProgressHUD for Android, similar to MBProgressHUD, SVProgressHUD for iOS.

KProgressHUD A progress HUD implementation for Android. Inspired by MBProgressHUD for iOS. Compatibility Android 2.3 and later Adding KProgressHUD to

Kaopiz Software Co., Ltd. 1.6k Dec 27, 2022
iOS style scroll wheel (style similar to UIPickerView)

WheelPicker iOS-style scroll wheel picker Read this in other languages: Feature Day / Night Mode Support Customizable style Support circular scro

Tian Yiyan 21 Dec 30, 2022
A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows

A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows.Provides fast canvas draw as no renderscript needed .The similar shadow blurred effects can also be seen in iOS Music App.

Vivek Verma 163 Dec 31, 2022