项目作者: flipboxstudio

项目描述 :
Progress layout collection for Android
高级语言: Java
项目地址: git://github.com/flipboxstudio/sosoito.git
创建时间: 2017-02-21T15:34:13Z
项目社区:https://github.com/flipboxstudio/sosoito

开源协议:

下载



Android Arsenal

Sosoito

Sosoito is layout library for Android that can be used to simplify basic needs for loading/progression state.

Demo / Sample Project

Installation

Sosoito can installed by adding the following dependency to your build.gradle file:

  1. repositories {
  2. jcenter()
  3. maven { url "https://jitpack.io" }
  4. }
  1. dependencies {
  2. compile 'com.github.flipboxstudio:sosoito:latest-release'
  3. }

Usage

Basic

You can start using sosoito by add your preferable layout in your layout.xml:

  1. <id.co.flipbox.sosoito.LoadingLayout
  2. android:id="@+id/loadingLayout"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent">
  5. </id.co.flipbox.sosoito.LoadingLayout>

Then, access it from your activity/fragment to use it’s feature:

  1. ...
  2. LoadingLayout loadingLayout = (LoadingLayout) findViewById(R.id.loadingLayout);
  3. loadingLayout.showLoading(true);
  4. ...
Available Methods

Empty Layout

  • showEmptyView(boolean)
  • showEmptyView(boolean, message)
  • showEmptyView(boolean, iconResourceId)
  • showEmptyView(boolean, iconResourceId, message)

Custom Loading Layout

  • showCustomLoading(boolean)
  • showCustomLoading(boolean, message)
  • showCustomLoading(boolean, iconResourceId)
  • showCustomLoading(boolean, iconResourceId, message)

Loading (in) layout

  • showLoading(boolean)
  • showLoading(boolean, message)

Progress Dialog

  • showProgressDialog()
  • showProgressDialog(message)
  • setProgressDialogMessage(message)
  • hideProgressDialog()

screenshot