Repository: biodunalfet/SlidingSquaresLoader
Branch: master
Commit: 610635a859d5
Files: 36
Total size: 40.0 KB
Directory structure:
gitextract_kz4zy341/
├── .gitignore
├── LICENSE
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── hamza/
│ │ └── slidingsquaresloader/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── hamza/
│ │ │ └── slidingsquaresloader/
│ │ │ └── MainActivity.java
│ │ └── res/
│ │ ├── layout/
│ │ │ └── activity_main.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ids.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── values-w820dp/
│ │ └── dimens.xml
│ └── test/
│ └── java/
│ └── com/
│ └── hamza/
│ └── slidingsquaresloader/
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── slidingsquaresloaderview/
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src/
├── androidTest/
│ └── java/
│ └── com/
│ └── hamza/
│ └── slidingsquaresloaderview/
│ └── ExampleInstrumentedTest.java
├── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── hamza/
│ │ └── slidingsquaresloaderview/
│ │ ├── SlidingSquareLoaderView.java
│ │ └── Square.java
│ └── res/
│ ├── drawable/
│ │ └── square.xml
│ └── values/
│ ├── attrs.xml
│ ├── colors.xml
│ └── strings.xml
└── test/
└── java/
└── com/
└── hamza/
└── slidingsquaresloaderview/
└── ExampleUnitTest.java
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
.idea
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) [2017] [Hamza Fetuga]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
[](https://jitpack.io/#biodunalfet/SlidingSquaresLoader)
# SlidingSquaresLoader
Sliding Square Loader - A simple progress loader inspired by [Can you Code this UI? Volume 6!](https://stories.uplabs.com/can-you-code-this-ui-volume-6-7bd09fa6dd92#.nyh2zhpvb)

## Gradle
**Step 1.** Add the JitPack repository to your build file
``` groovy
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```
**Step 2.** Add the dependency
``` groovy
dependencies {
compile "com.github.biodunalfet:SlidingSquaresLoader:1.0"
}
```
## Usage
* In XML Layout
``` xml
<com.hamza.slidingsquaresloaderview.SlidingSquareLoaderView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:sslv_start="true"
app:sslv_delay="15"
app:sslv_duration="150"
app:sslv_gap="2dp"
app:sslv_square_length="12dp"
app:sslv_color="@color/colorPrimary"
xmlns:app="http://schemas.android.com/apk/res-auto"
/>
```
1. `sslv_start` = `boolean` that determines if the loader should start sliding. Default value is `true`.
2. `sslv_duration` = the amount of milliseconds it takes for a square to complete sliding. Default value is `350`
3. `sslv_delay` = the number of milliseconds to wait before sliding. Default value is `25`
4. `sslv_square_length` = the dimension of each square. Default value is `25dp`
5. `sslv_gap` = the dimension of the gap between each square. Default value is `5dp`
6. `sslv_color` = the `color` of the square. Defaults to `#ff8f00`
* In Java
``` java
SlidingSquareLoaderView slidingview2 = (SlidingSquareLoaderView) findViewById(R.id.sliding_view2);
slidingview.start(); // starts the sliding
slidingview.stop(); // stops the sliding
slidingview.setDuration(xxx); // sets duration of sliding
slidingview.setDelay(xxx); // sets delay period before sliding
slidingview.setColor(Color.parseColor("#2196F3")); // sets the color of the squares
```
## License
The contents of this repository are covered under the [MIT License](https://github.com/biodunalfet/SlidingSquareLoader/blob/master/LICENSE)
================================================
FILE: app/.gitignore
================================================
/build
================================================
FILE: app/build.gradle
================================================
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.hamza.slidingsquaresloader"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "com.android.support:appcompat-v7:$supportLibVersion"
testCompile 'junit:junit:4.12'
compile project(':slidingsquaresloaderview')
}
================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Hamza Fetuga\Desktop\Android Calabash\adt-bundle-windows-x86-20131030\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
================================================
FILE: app/src/androidTest/java/com/hamza/slidingsquaresloader/ExampleInstrumentedTest.java
================================================
package com.hamza.slidingsquaresloader;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.hamza.slidingsquaresloader", appContext.getPackageName());
}
}
================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hamza.slidingsquaresloader">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
================================================
FILE: app/src/main/java/com/hamza/slidingsquaresloader/MainActivity.java
================================================
package com.hamza.slidingsquaresloader;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import com.hamza.slidingsquaresloaderview.SlidingSquareLoaderView;
public class MainActivity extends AppCompatActivity {
private SlidingSquareLoaderView slidingview;
private SlidingSquareLoaderView slidingview2;
private Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.slidingview = (SlidingSquareLoaderView) findViewById(R.id.sliding_view);
this.slidingview2 = (SlidingSquareLoaderView) findViewById(R.id.sliding_view2);
this.button = (Button) findViewById(R.id.button);
slidingview.start();
slidingview2.start();
slidingview2.setDuration(200);
slidingview2.setDelay(15);
slidingview2.setColor(Color.parseColor("#2196F3"));
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (slidingview2.isAnimating()){
slidingview2.stop();
}
else {
slidingview2.start();
}
}
});
}
}
================================================
FILE: app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.hamza.slidingsquaresloader.MainActivity">
<com.hamza.slidingsquaresloaderview.SlidingSquareLoaderView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_centerHorizontal="true"
app:sslv_start="true"
app:sslv_delay="15"
app:sslv_duration="150"
app:sslv_gap="2dp"
app:sslv_square_length="12dp"
app:sslv_color="#ffea00"
xmlns:app="http://schemas.android.com/apk/res-auto"
/>
<com.hamza.slidingsquaresloaderview.SlidingSquareLoaderView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sliding_view"
android:layout_marginBottom="20dp"
android:layout_centerInParent="true"
app:sslv_start="true"
xmlns:app="http://schemas.android.com/apk/res-auto"
/>
<com.hamza.slidingsquaresloaderview.SlidingSquareLoaderView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/sliding_view"
android:layout_centerHorizontal="true"
android:id="@+id/sliding_view2"
xmlns:app="http://schemas.android.com/apk/res-auto"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginTop="20dp"
android:layout_centerHorizontal="true"
android:text="@string/start_stop"
android:id="@+id/button"/>
</RelativeLayout>
================================================
FILE: app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="sslv_color">#ff8f00</color>
</resources>
================================================
FILE: app/src/main/res/values/dimens.xml
================================================
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="square_length">25dp</dimen>
<dimen name="square_gap">5dp</dimen>
</resources>
================================================
FILE: app/src/main/res/values/ids.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="square_length" type="id">50dp</item>
</resources>
================================================
FILE: app/src/main/res/values/strings.xml
================================================
<resources>
<string name="app_name">SlidingSquaresLoader</string>
<string name="start_stop">START/STOP</string>
</resources>
================================================
FILE: app/src/main/res/values/styles.xml
================================================
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@android:color/black</item>
</style>
</resources>
================================================
FILE: app/src/main/res/values-w820dp/dimens.xml
================================================
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
================================================
FILE: app/src/test/java/com/hamza/slidingsquaresloader/ExampleUnitTest.java
================================================
package com.hamza.slidingsquaresloader;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
ext {
compileSdkVersion = 25
targetSdkVersion = compileSdkVersion
buildToolsVersion = "25.0.2"
minSdkVersion = 15
supportLibVersion = '25.3.0'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Fri Mar 10 10:38:47 GMT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
================================================
FILE: gradlew
================================================
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
================================================
FILE: gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: settings.gradle
================================================
include ':app', ':slidingsquaresloaderview'
================================================
FILE: slidingsquaresloaderview/.gitignore
================================================
/build
================================================
FILE: slidingsquaresloaderview/build.gradle
================================================
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.biodunalfet'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "com.android.support:appcompat-v7:$supportLibVersion"
testCompile 'junit:junit:4.12'
}
================================================
FILE: slidingsquaresloaderview/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Hamza Fetuga\Desktop\Android Calabash\adt-bundle-windows-x86-20131030\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
================================================
FILE: slidingsquaresloaderview/src/androidTest/java/com/hamza/slidingsquaresloaderview/ExampleInstrumentedTest.java
================================================
package com.hamza.slidingsquaresloaderview;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.hamza.slidingsquaresloaderview.test", appContext.getPackageName());
}
}
================================================
FILE: slidingsquaresloaderview/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hamza.slidingsquaresloaderview">
<application android:allowBackup="true" android:label="@string/app_name"
android:supportsRtl="true">
</application>
</manifest>
================================================
FILE: slidingsquaresloaderview/src/main/java/com/hamza/slidingsquaresloaderview/SlidingSquareLoaderView.java
================================================
package com.hamza.slidingsquaresloaderview;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Point;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;
import java.util.Random;
/**
* Created by Hamza Fetuga on 2/4/2017.
*/
public class SlidingSquareLoaderView extends FrameLayout {
private static final String TAG = "SSLV";
/**
* Direction trackers for the view
* By default, it starts from the top right
*/
boolean moveRight = false;
boolean moveUp = false;
/**
* All possible XY positions of squares
*/
Point[][] squareCoordinates;
/**
* Square to move
*/
Square mover;
/**
* All squares and their XY positions
*/
Square[][] squares;
/**
* The current column and row number of the moving square
*/
int colNumber = 3;
int rowNumber = 0;
/**
* Duration of translation of each square
*/
int duration = 350;
/**
* Delay period before each translation
*/
int delay = 25;
/**
* Default color of squares
*/
int default_color;
/**
* Flag to track whether to start animtion or not
*/
private boolean start;
/**
* Coordinates of center of view
*/
private Point center;
/**
* Dimensions of squares
*/
private int margin = 10; // margin between squares
private int height = 50; // height of squares
private int width = 50; // width of square;
/**
* Flag that stores the state of the view
*/
private boolean isAnimating = false;
/**
* Flag to determine whether to redraw on requestLayout() invocation
*/
private boolean redraw = false;
public SlidingSquareLoaderView(Context context) {
this(context, null);
}
public SlidingSquareLoaderView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public SlidingSquareLoaderView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(attrs);
}
private void init(AttributeSet attrs) {
TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.SlidingSquareLoaderView);
start = typedArray.getBoolean(R.styleable.SlidingSquareLoaderView_sslv_start, true);
default_color = typedArray.getColor(R.styleable.SlidingSquareLoaderView_sslv_color,
ContextCompat.getColor(getContext(), R.color.sslv_color));
int sslv_duration = typedArray.getInteger(R.styleable.SlidingSquareLoaderView_sslv_duration, duration);
int sslv_delay = typedArray.getInteger(R.styleable.SlidingSquareLoaderView_sslv_duration, delay);
int dimen = (int) typedArray
.getDimension(R.styleable.SlidingSquareLoaderView_sslv_square_length, height);
int gap = (int) typedArray
.getDimension(R.styleable.SlidingSquareLoaderView_sslv_gap, margin);
setDuration(sslv_duration);
setDelay(sslv_delay);
setSquareDimen(dimen);
setSquareGap(gap);
typedArray.recycle();
if (start){
start();
}
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
Log.d(TAG, "onMeasure: ");
setMeasuredDimension(calculateWidth(widthMeasureSpec),
calculateHeight(heightMeasureSpec));
}
private int calculateHeight(int measureSpec) {
int preferred = (3 * height) + (margin * 2);
return getMeasurement(preferred, measureSpec);
}
private int calculateWidth(int measureSpec) {
int preferred = (4 * width) + (3 * margin);
return getMeasurement(preferred, measureSpec);
}
private int getMeasurement(int preferred, int measureSpec) {
int specSize = MeasureSpec.getSize(measureSpec);
int measurement;
switch (MeasureSpec.getMode(measureSpec)) {
case MeasureSpec.EXACTLY:
// This means the dimension of this view has been given.
measurement = specSize;
break;
case MeasureSpec.AT_MOST:
// Take the minimum of the preferred size and what
// we were told to be.
measurement = Math.min(preferred, specSize);
break;
case MeasureSpec.UNSPECIFIED:
default:
measurement = preferred;
break;
}
return measurement;
}
private void drawGrid() {
squares = new Square[3][4];
Context context = getContext();
for (int j = 0; j < 4; j++) {
addSquare(1, j, context);
}
mover = addSquare(0, 3, context);
// for (int i = 0; i < 3; i++){
// for (int j = 0; j < 4; j++){
// addSquare(i, j, context);
// }
// }
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
Log.d(TAG, "onLayout: " + getChildCount());
if (changed || redraw) {
redraw = false;
getOrigin();
calculateSquareCoordinates();
drawGrid();
int moverTag = 4 * colNumber + rowNumber;
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
Log.d(TAG, "onLayout: " + child.getTag());
int tag = (int) child.getTag();
int row = tag / 4;
int col = tag % 4;
int l = squareCoordinates[row][col].x;
int t = squareCoordinates[row][col].y;
int r = l + width;
squares[row][col] = (Square) child;
int b = t + height;
if (4 * row + col == moverTag) {
mover = (Square) child;
}
child.layout(l, t, r, b);
Log.d(TAG, "onLayout: L" + l);
Log.d(TAG, "onLayout: T" + t);
Log.d(TAG, "onLayout: R" + r);
Log.d(TAG, "onLayout: B" + b);
}
if (start) {
isAnimating = true;
moveHoriz();
}
}
}
private Square addSquare(int row, int col, Context c) {
Square currentSquare = new Square(c);
Point point = squareCoordinates[row][col];
LayoutParams params = new FrameLayout.LayoutParams(width, height);
currentSquare.setLayoutParams(params);
// currentSquare.setX(point.x);
// currentSquare.setY(point.y);
currentSquare.setTag(4 * row + col);
currentSquare.setColor(default_color);
addView(currentSquare, width,
height);
return currentSquare;
}
private void calculateSquareCoordinates() {
int x = center.x;
int y = center.y;
int p = margin;
int w = width;
int h = height;
int ex = x - p / 2 - 2 * w - p;
int ey = y - h / 2;
int fx = x - p / 2 - w;
int fy = ey;
int gx = x + p / 2;
int gy = ey;
int hx = x + p / 2 + w + p;
int hy = ey;
int ax = ex;
int ay = y - h / 2 - p - h;
int bx = fx;
int by = ay;
int cx = gx;
int cy = ay;
int dx = hx;
int dy = ay;
int ix = ex;
int iy = y + h / 2 + p;
int jx = fx;
int jy = iy;
int kx = gx;
int ky = iy;
int lx = hx;
int ly = iy;
squareCoordinates = new Point[][]{
{new Point(ax, ay), new Point(bx, by), new Point(cx, cy), new Point(dx, dy)},
{new Point(ex, ey), new Point(fx, fy), new Point(gx, gy), new Point(hx, hy)},
{new Point(ix, iy), new Point(jx, jy), new Point(kx, ky), new Point(lx, ly)}
};
}
private void getOrigin() {
center = new Point(getMeasuredWidth() / 2, getMeasuredHeight() / 2);
}
private int generateRandomColor(){
Random rnd = new Random();
return Color.argb(255, rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256));
}
public void stop() {
if (isAnimating) {
for (int i = 0; i < getChildCount(); i++) {
getChildAt(i).animate().cancel();
}
}
start = false;
redraw = false;
colNumber = 3;
rowNumber = 0;
isAnimating = false;
moveRight = false;
moveUp = false;
}
public boolean isAnimating() {
return isAnimating;
}
public void setColor(int color){
default_color = color;
}
public void start() {
start = true;
removeAllViews();
redraw = true;
requestLayout();
}
public void setDuration(int duration){
this.duration = Math.max(0, duration);
}
public void setDelay(int delay){
this.delay = Math.max(0, delay);
}
public int getDelay(){
return delay;
}
public int getSpeed(){
return duration;
}
public void setSquareDimen(int dimen){
dimen = Math.max(0, dimen);
width = dimen;
height = dimen;
}
public void setSquareGap(int gap){
gap = Math.max(0, gap);
margin = gap;
}
private void moveVert() {
if (moveUp) {
// Log.d(TAG, "moveVert: up");
ViewPropertyAnimator animatorMover =
mover.animate()
.y(squareCoordinates[1][colNumber].y)
.setDuration(duration)
.setStartDelay(delay);
final Square middle = squares[1][colNumber];
final ViewPropertyAnimator animatorOther =
middle.animate()
.y(squareCoordinates[0][colNumber].y)
.setDuration(duration)
.setStartDelay(delay);
animatorOther.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
rowNumber = 0;
squares[0][colNumber] = middle;
squares[1][colNumber] = mover;
squares[2][colNumber] = null;
animatorOther.setListener(null);
mover = squares[0][colNumber];
moveUp = false;
if (isAnimating){moveHoriz();}
// moveHoriz();
}
});
} else {
// Log.d(TAG, "moveVert: down");
final Square middle = squares[1][colNumber];
final ViewPropertyAnimator animatorOther =
middle.animate()
.y(squareCoordinates[2][colNumber].y)
.setDuration(duration)
.setStartDelay(delay);
ViewPropertyAnimator animatorMover =
mover.animate()
.y(squareCoordinates[1][colNumber].y)
.setDuration(duration)
.setStartDelay(delay);
animatorOther.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
rowNumber = 2;
squares[1][colNumber] = mover;
squares[0][colNumber] = null;
squares[2][colNumber] = middle;
animatorOther.setListener(null);
mover = squares[2][colNumber];
moveUp = true;
if (isAnimating){moveHoriz();}
// moveHoriz();
}
});
}
}
private void moveHoriz() {
if (colNumber == 3) {
moveRight = false;
}
if (colNumber == 0) {
moveRight = true;
}
if (moveRight) {
// Log.d(TAG, "moveHoriz: right");
final ViewPropertyAnimator animator =
mover.animate()
.x(squares[1][colNumber + 1].getX())
.setDuration(duration)
.setStartDelay(delay);
animator.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
int preCol = colNumber;
colNumber = Math.min(3, colNumber + 1);
squares[rowNumber][colNumber] = mover;
squares[rowNumber][preCol] = null;
animator.setListener(null);
if (isAnimating){moveVert();}
// moveVert();
}
});
} else {
// Log.d(TAG, "moveHoriz: left");
final ViewPropertyAnimator animator =
mover.animate()
.x(squares[1][colNumber - 1].getX())
.setDuration(duration)
.setStartDelay(delay);
animator.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
// mover.setX(squares[1][colNumber - 1].getX());
int preCol = colNumber;
colNumber = Math.max(0, colNumber - 1);
squares[rowNumber][colNumber] = mover;
squares[rowNumber][preCol] = null;
animator.setListener(null);
if (isAnimating){moveVert();}
// moveVert();
}
});
}
}
}
================================================
FILE: slidingsquaresloaderview/src/main/java/com/hamza/slidingsquaresloaderview/Square.java
================================================
package com.hamza.slidingsquaresloaderview;
import android.content.Context;
import android.graphics.PorterDuff;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.AttributeSet;
import android.view.View;
/**
* Created by Hamza Fetuga on 2/3/2017.
*/
public class Square extends View {
boolean isMover = false;
public boolean isMover() {
return isMover;
}
public void setMover(boolean mover) {
isMover = mover;
}
public Square(Context context) {
super(context);
setBackgroundResource(R.drawable.square);
}
public Square(Context context, AttributeSet attrs) {
super(context, attrs);
}
public Square(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public Square(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public void setColor(int color){
getBackground().setColorFilter(color, PorterDuff.Mode.SRC_IN);
}
}
================================================
FILE: slidingsquaresloaderview/src/main/res/drawable/square.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<solid android:color="#616161"/>
<corners android:radius="2dp"/>
</shape>
================================================
FILE: slidingsquaresloaderview/src/main/res/values/attrs.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="SlidingSquareLoaderView">
<attr name="sslv_start" format="boolean"/>
<attr name="sslv_color" format="color"/>
<attr name="sslv_square_length" format="dimension"/>
<attr name="sslv_gap" format="dimension"/>
<attr name="sslv_duration" format="integer"/>
<attr name="sslv_delay" format="integer"/>
</declare-styleable>
</resources>
================================================
FILE: slidingsquaresloaderview/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="sslv_color">#ff8f00</color>
</resources>
================================================
FILE: slidingsquaresloaderview/src/main/res/values/strings.xml
================================================
<resources>
<string name="app_name">SlidingSquaresLoaderView</string>
</resources>
================================================
FILE: slidingsquaresloaderview/src/test/java/com/hamza/slidingsquaresloaderview/ExampleUnitTest.java
================================================
package com.hamza.slidingsquaresloaderview;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
gitextract_kz4zy341/
├── .gitignore
├── LICENSE
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── hamza/
│ │ └── slidingsquaresloader/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── hamza/
│ │ │ └── slidingsquaresloader/
│ │ │ └── MainActivity.java
│ │ └── res/
│ │ ├── layout/
│ │ │ └── activity_main.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ids.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── values-w820dp/
│ │ └── dimens.xml
│ └── test/
│ └── java/
│ └── com/
│ └── hamza/
│ └── slidingsquaresloader/
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── slidingsquaresloaderview/
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src/
├── androidTest/
│ └── java/
│ └── com/
│ └── hamza/
│ └── slidingsquaresloaderview/
│ └── ExampleInstrumentedTest.java
├── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── hamza/
│ │ └── slidingsquaresloaderview/
│ │ ├── SlidingSquareLoaderView.java
│ │ └── Square.java
│ └── res/
│ ├── drawable/
│ │ └── square.xml
│ └── values/
│ ├── attrs.xml
│ ├── colors.xml
│ └── strings.xml
└── test/
└── java/
└── com/
└── hamza/
└── slidingsquaresloaderview/
└── ExampleUnitTest.java
SYMBOL INDEX (45 symbols across 7 files)
FILE: app/src/androidTest/java/com/hamza/slidingsquaresloader/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 17) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 19) | @Test
FILE: app/src/main/java/com/hamza/slidingsquaresloader/MainActivity.java
class MainActivity (line 11) | public class MainActivity extends AppCompatActivity {
method onCreate (line 17) | @Override
FILE: app/src/test/java/com/hamza/slidingsquaresloader/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
FILE: slidingsquaresloaderview/src/androidTest/java/com/hamza/slidingsquaresloaderview/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 17) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 19) | @Test
FILE: slidingsquaresloaderview/src/main/java/com/hamza/slidingsquaresloaderview/SlidingSquareLoaderView.java
class SlidingSquareLoaderView (line 22) | public class SlidingSquareLoaderView extends FrameLayout {
method SlidingSquareLoaderView (line 95) | public SlidingSquareLoaderView(Context context) {
method SlidingSquareLoaderView (line 99) | public SlidingSquareLoaderView(Context context, AttributeSet attrs) {
method SlidingSquareLoaderView (line 103) | public SlidingSquareLoaderView(Context context, AttributeSet attrs, in...
method init (line 108) | private void init(AttributeSet attrs) {
method onMeasure (line 134) | @Override
method calculateHeight (line 143) | private int calculateHeight(int measureSpec) {
method calculateWidth (line 148) | private int calculateWidth(int measureSpec) {
method getMeasurement (line 153) | private int getMeasurement(int preferred, int measureSpec) {
method drawGrid (line 178) | private void drawGrid() {
method onLayout (line 195) | @Override
method addSquare (line 247) | private Square addSquare(int row, int col, Context c) {
method calculateSquareCoordinates (line 264) | private void calculateSquareCoordinates() {
method getOrigin (line 308) | private void getOrigin() {
method generateRandomColor (line 312) | private int generateRandomColor(){
method stop (line 317) | public void stop() {
method isAnimating (line 336) | public boolean isAnimating() {
method setColor (line 340) | public void setColor(int color){
method start (line 344) | public void start() {
method setDuration (line 353) | public void setDuration(int duration){
method setDelay (line 357) | public void setDelay(int delay){
method getDelay (line 361) | public int getDelay(){
method getSpeed (line 365) | public int getSpeed(){
method setSquareDimen (line 369) | public void setSquareDimen(int dimen){
method setSquareGap (line 375) | public void setSquareGap(int gap){
method moveVert (line 380) | private void moveVert() {
method moveHoriz (line 454) | private void moveHoriz() {
FILE: slidingsquaresloaderview/src/main/java/com/hamza/slidingsquaresloaderview/Square.java
class Square (line 14) | public class Square extends View {
method isMover (line 18) | public boolean isMover() {
method setMover (line 22) | public void setMover(boolean mover) {
method Square (line 26) | public Square(Context context) {
method Square (line 31) | public Square(Context context, AttributeSet attrs) {
method Square (line 35) | public Square(Context context, AttributeSet attrs, int defStyleAttr) {
method Square (line 39) | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
method setColor (line 44) | public void setColor(int color){
FILE: slidingsquaresloaderview/src/test/java/com/hamza/slidingsquaresloaderview/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
Condensed preview — 36 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (45K chars).
[
{
"path": ".gitignore",
"chars": 124,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n.i"
},
{
"path": "LICENSE",
"chars": 1072,
"preview": "MIT License\n\nCopyright (c) [2017] [Hamza Fetuga]\n\nPermission is hereby granted, free of charge, to any person obtaining "
},
{
"path": "README.md",
"chars": 2219,
"preview": "[](https://jitpack.io/#biodunalfet/SlidingSquaresLoader)\n#"
},
{
"path": "app/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "app/build.gradle",
"chars": 1052,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n compileSdkVersion rootProject.ext.compileSdkVersion\n buildTool"
},
{
"path": "app/proguard-rules.pro",
"chars": 713,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:"
},
{
"path": "app/src/androidTest/java/com/hamza/slidingsquaresloader/ExampleInstrumentedTest.java",
"chars": 764,
"preview": "package com.hamza.slidingsquaresloader;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegi"
},
{
"path": "app/src/main/AndroidManifest.xml",
"chars": 670,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "app/src/main/java/com/hamza/slidingsquaresloader/MainActivity.java",
"chars": 1401,
"preview": "package com.hamza.slidingsquaresloader;\n\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.support"
},
{
"path": "app/src/main/res/layout/activity_main.xml",
"chars": 2156,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xm"
},
{
"path": "app/src/main/res/values/colors.xml",
"chars": 253,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#3F51B5</color>\n <color name=\"color"
},
{
"path": "app/src/main/res/values/dimens.xml",
"chars": 297,
"preview": "<resources>\n <!-- Default screen margins, per the Android Design guidelines. -->\n <dimen name=\"activity_horizontal"
},
{
"path": "app/src/main/res/values/ids.xml",
"chars": 116,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <item name=\"square_length\" type=\"id\">50dp</item>\n</resources>"
},
{
"path": "app/src/main/res/values/strings.xml",
"chars": 133,
"preview": "<resources>\n <string name=\"app_name\">SlidingSquaresLoader</string>\n <string name=\"start_stop\">START/STOP</string>\n"
},
{
"path": "app/src/main/res/values/styles.xml",
"chars": 457,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "app/src/main/res/values-w820dp/dimens.xml",
"chars": 358,
"preview": "<resources>\n <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n (such as s"
},
{
"path": "app/src/test/java/com/hamza/slidingsquaresloader/ExampleUnitTest.java",
"chars": 408,
"preview": "package com.hamza.slidingsquaresloader;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local"
},
{
"path": "build.gradle",
"chars": 737,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 230,
"preview": "#Fri Mar 10 10:38:47 GMT 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "gradle.properties",
"chars": 730,
"preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
},
{
"path": "gradlew",
"chars": 4971,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "settings.gradle",
"chars": 44,
"preview": "include ':app', ':slidingsquaresloaderview'\n"
},
{
"path": "slidingsquaresloaderview/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "slidingsquaresloaderview/build.gradle",
"chars": 1030,
"preview": "apply plugin: 'com.android.library'\n\napply plugin: 'com.github.dcendents.android-maven'\ngroup='com.github.biodunalfet'\n\n"
},
{
"path": "slidingsquaresloaderview/proguard-rules.pro",
"chars": 713,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:"
},
{
"path": "slidingsquaresloaderview/src/androidTest/java/com/hamza/slidingsquaresloaderview/ExampleInstrumentedTest.java",
"chars": 777,
"preview": "package com.hamza.slidingsquaresloaderview;\n\nimport android.content.Context;\nimport android.support.test.Instrumentation"
},
{
"path": "slidingsquaresloaderview/src/main/AndroidManifest.xml",
"chars": 266,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.hamza.slidingsquaresloaderview\">\n\n"
},
{
"path": "slidingsquaresloaderview/src/main/java/com/hamza/slidingsquaresloaderview/SlidingSquareLoaderView.java",
"chars": 14474,
"preview": "package com.hamza.slidingsquaresloaderview;\n\nimport android.animation.Animator;\nimport android.animation.AnimatorListene"
},
{
"path": "slidingsquaresloaderview/src/main/java/com/hamza/slidingsquaresloaderview/Square.java",
"chars": 1166,
"preview": "package com.hamza.slidingsquaresloaderview;\n\nimport android.content.Context;\nimport android.graphics.PorterDuff;\nimport "
},
{
"path": "slidingsquaresloaderview/src/main/res/drawable/square.xml",
"chars": 223,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:sha"
},
{
"path": "slidingsquaresloaderview/src/main/res/values/attrs.xml",
"chars": 462,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n <declare-styleable name=\"SlidingSquareLoaderView\">\n <attr"
},
{
"path": "slidingsquaresloaderview/src/main/res/values/colors.xml",
"chars": 108,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"sslv_color\">#ff8f00</color>\n</resources>"
},
{
"path": "slidingsquaresloaderview/src/main/res/values/strings.xml",
"chars": 87,
"preview": "<resources>\n <string name=\"app_name\">SlidingSquaresLoaderView</string>\n</resources>\n"
},
{
"path": "slidingsquaresloaderview/src/test/java/com/hamza/slidingsquaresloaderview/ExampleUnitTest.java",
"chars": 412,
"preview": "package com.hamza.slidingsquaresloaderview;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example l"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the biodunalfet/SlidingSquaresLoader GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 36 files (40.0 KB), approximately 11.2k tokens, and a symbol index with 45 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.