• Stars
    star
    808
  • Rank 56,429 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementation of the fragment with the ability to display indeterminate progress indicator when you are waiting for the initial data.

Android-ProgressFragment

Android Arsenal

Implementation of the fragment with the ability to display indeterminate progress indicator when you are waiting for the initial data. Based on ListFragment.

Sample

A sample application is available on Google Play:

Get it on Google Play

screenshot

Compatibility

This library is compatible from API 4 (Android 1.6).

Usage

To display the progress fragment you need the following code:

  • Create your implementation of progress fragment
public class MyProgressFragment extends ProgressFragment {
	// your code of fragment
}

or if you use ActionBarSherlock

public class MyProgressFragment extends SherlockProgressFragment {
	// your code of fragment
}
  • Setup content view and empty text (optional) in onActivityCreate() method.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    // Setup content view
    setContentView(R.layout.content);
    // Setup text for empty content
    setEmptyText(R.string.empty);
    // ...
}
  • Display of indeterminate progress indicator
setContentShown(false);
  • When the data is loaded to set whether the content is empty and show content
setContentEmpty(/* true if content is empty else false */);
setContentShown(true);

Gradle

Android-ProgressFragment library is now pushed to Maven Central as a AAR, so you just need to add the following dependency to your build.gradle.

ProgressFragment (support-v4):

dependencies {
    compile 'com.github.johnkil.android-progressfragment:progressfragment:1.4.+'
}

ProgressFragment (native):

dependencies {
    compile 'com.github.johnkil.android-progressfragment:progressfragment-native:1.4.+'
}

SherlockProgressFragment:

dependencies {
    compile 'com.android.support:support-v4:19.0.0'
    compile('com.github.johnkil.android-progressfragment:sherlockprogressfragment:1.4.+') {
        exclude module: 'support-v4'
    }
}

Example Gradle project using Android-ProgressFragment:

Developed By

License

Copyright 2013 Evgeny Shishkin

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.

More Repositories

1

Android-AppMsg

In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773).
Java
1,370
star
2

Android-RobotoTextView

Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the brand new Roboto Slab fonts.
Java
778
star
3

SideNavigation

Implementation of "Side Navigation" or "Fly-in app menu" pattern for Android (based on Google+ app)
Java
318
star
4

Android-Icon-Fonts

Material and Holo iconic fonts.
HTML
222
star
5

Print

A lightweight Android library for use iconic fonts.
Java
205
star
6

Android-CollapsibleSearchMenu

Implementation of the SearchView is compatible with Android below 3.0. This library allows developers to easily integrate search menuItem in an Android application.
Java
118
star
7

SpySMS

Interceptor sms for android
Java
80
star
8

MockGPS

The application to emulate the location
Java
16
star
9

Android-AppMsg-Gradle-Sample

The sample project that uses Android-AppMsg via Gradle.
Shell
12
star
10

RecipeBook

Recipe Book for Android
Java
12
star
11

Android-JSONCompare

Comparison of JSON parsers performance on Android
Java
12
star
12

Metro

Modern subway maps of Moscow and Saint Petersburg.
Java
11
star
13

android-without-fragments

Demo for presentation "Life without Fragments" #MBLTdev16
Kotlin
9
star
14

CookApp

Android application of cooking
Java
8
star
15

Android-ProgressFragment-Gradle-Sample

The sample project that uses Android-ProgressFragment via Gradle.
Java
7
star
16

Steganography

Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message, a form of security through obscurity.
Java
6
star
17

DoubleBackExample

Example: double back to exit
Java
4
star
18

GeocoderExample

Example of a geocoder to Android
Java
3
star
19

johnkil

1
star
20

VK-Music-Downloader

The application to download music from the social network Vkontakte.
1
star