项目作者: MohammedAlaaMorsi

项目描述 :
Gif images loading indicator
高级语言: Java
项目地址: git://github.com/MohammedAlaaMorsi/GifLoading.git
创建时间: 2018-11-09T02:53:38Z
项目社区:https://github.com/MohammedAlaaMorsi/GifLoading

开源协议:

下载


GifLoading

Gif images loading indicator

License
Android Arsenal

Usage

For a working implementation of this project see the app/ folder.

Step 1

Add this in your root build.gradle at the end of repositories

  1. allprojects {
  2. repositories {
  3. maven { url 'https://jitpack.io' }
  4. }
  5. }

Step 2

Include the library as a local library project or add the dependency in your build.gradle.

  1. dependencies {
  2. implementation 'com.github.Mohammed-Alaa:GifLoading:1.0.3'
  3. }

Step 3

Add the following xml to your layout file.

  1. <com.mohammedalaa.gifloading.LoadingView
  2. android:id="@+id/loading_view"
  3. android:layout_width="wrap_content"
  4. android:layout_height="wrap_content"
  5. android:visibility="gone"
  6. app:loading_text="@string/loading"
  7. app:loading_text_size="@dimen/text_size"
  8. app:block_while_loading="true"
  9. app:srcImg="@drawable/facebook_loading"
  10. app:loading_text_color="@color/colorAccent" ></com.mohammedalaa.gifloading.LoadingView>

Step 4

Reference the View in Java code.

  1. LoadingView loadingView= (LoadingView) findViewById(R.id.loading_view);

Show loading

  1. loadingView.showLoading();

Hide loading

  1. loadingView.hideLoading();

Credits

Inspired by

  • Loading.io for there awesome Gifs

    License

    Copyright 2018 Mohammmed Alaa
    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

    http://www.apache.org/licenses/LICENSE-2.0

    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.