Code Monkey home page Code Monkey logo

janis's Introduction

Janis, the Missing Components of Android SDK

Janis aims to solve everyday problems by providing solutions for everyday problems by providing commonly needed features for existing components that are not presented in the official Android SDK. This library includes the following components:

Views

  • LoadingImageView: An image view you can set an remote image url.
  • LoadingListView: A list view allows you to fire new loading actions once user hits the bottom of the list.
  • NotScrollingListView: A list view that is growing in height depending on the number of the items on the list. This is a popular trick to put a ListView into a ScrollView, so ListView scrolling wont block its parent's.
  • NotScrollingListView: Similart to NotScrollingListView but for constructing grid views.
  • AnimatedImageView: Animates an array of drawables you set.
  • PagedScrollView: A vertically scrolling view with paging enabled.
  • HortizontalPagedScrollView: A horizontally scrolling view with paged enabled.

... TODO

janis's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

janis's Issues

LoadingImageView and LoadingListView task management is not thread safe

LoadingImageView .setImageUrl should be able to perform thread safely. There should be no more than a single BackgroundTask instance created by LoadingImageView.

If setImageUrl is called,

  • If there is an existing task, it should be cancelled
  • A new task should be created and executed.

On LoadingListView,

  • If there exists a current task, that task should be waited to be finished.
  • If there is none or one with finished state, new task can be created and executed.

NotScrollingListView doesnt calculate height properly if rows are different in length

If item views are different in height, NotScrollingListView scrolls. There are 2 things to argue:

  • To minimize calculation, the height is measured based of the first row view of the list view. If there exists row items differs in length, this calculation is not accurate.
  • On the other hand, current list view provides no caching since all item views are visible. So it's already risky to use it on a large set of data. Depending on this fact, no one will bind large data because they will get out of memory.

So, it may OK to provide an optional height calculation that is accurate.

Image download task cancelation

LoadingImageView should provide:

  • an interface to cancel the current download task
  • cancellation of the current download task if a new one gets started.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.