GifLoading

Additional

Language
Java
Version
1.0.3 (Apr 29, 2019)
Created
Nov 9, 2018
Updated
Apr 29, 2019 (Retired)
Owner
Mohammed Alaa (MohammedAlaaMorsi)
Contributors
Mohamed Alaa (mohammed-alaa)
Mohammed Alaa (MohammedAlaaMorsi)
2
Activity
Badge
Generate
Download
Source code

GifLoading

Gif images loading indicator

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

allprojects {
  repositories {
   maven { url 'https://jitpack.io' }
  }
     
}

Step 2

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

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

Step 3

Add the following xml to your layout file.

<com.mohammedalaa.gifloading.LoadingView
        android:id="@+id/loading_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:loading_text="@string/loading"
        app:loading_text_size="@dimen/text_size"
        app:block_while_loading="true"
        app:srcImg="@drawable/facebook_loading"
        app:loading_text_color="@color/colorAccent" />

Step 4

Reference the View in Java code.

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

Show loading

       loadingView.showLoading();

Hide loading

       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.