Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
fairytale110 committed Sep 25, 2018
1 parent 80876b9 commit 253e8e6
Show file tree
Hide file tree
Showing 50 changed files with 1,820 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
29 changes: 29 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 122 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@

## SquaresLoadingView
> A SquaresLoadingView based on android.View, nicely rotation、easy to use.
[![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg)](https://android-arsenal.com/api?level=19)
[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://img.shields.io/badge/Download-1.0.1-B93B8F.svg) ](https://github.com/fairytale110/WedgesView/archive/1.0.1.zip)

### Preview



### Features

Supported functions:

- [x] Optionally configure the colors of each square
- [x] Manually stop and start the animation
- [x] Configurable anim's speed

- [x] Support the padding settings


Support will be forthcoming:

- [ ] Manual rotation

- [ ] Refresh header view support

- [ ] Etc

### How to

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
Step 2. Add the dependency
```
dependencies {
implementation 'com.github.fairytale110:SquaresLoadingView:1.0.0'
}
```

### Usage

```java
<tech.nicesky.libsquaresloadingview.SquaresLoadingView
android:id="@+id/slv_loading"
android:padding="10dp"
app:slv_scale_speed="0.77"
app:slv_squares_alpha="1"
app:slv_background="@android:color/white"
android:layout_width="80dp"
android:layout_height="200dp" />
```
or
```java

private void loading(){

int[] colorsDefault = {
Color.parseColor("#C5523F"),
Color.parseColor("#F2B736"),
Color.parseColor("#499255"),
Color.parseColor("#F2B736"),
Color.parseColor("#499255"),
Color.parseColor("#1875E5"),
Color.parseColor("#499255"),
Color.parseColor("#1875E5"),
Color.parseColor("#C5523F"),
};

SquaresLoadingView squaresLoadingView = new SquaresLoadingView(this);
squaresLoadingView.setAnimSpeed(0.5F);
squaresLoadingView.setSquareAlpha(0.8F);
squaresLoadingView.setColors(colorsDefault);
squaresLoadingView.start();
//squaresLoadingView.stop();
}
```

### Participate in the contribution
fairytale110@foxmail.com


### Author
fairytale110@foxmail.com
> 简书: http://jianshu.com/u/d95b27ffdd3c
> 掘金: https://juejin.im/user/596d91ee6fb9a06bb874a800
> CSDN: https://blog.csdn.net/LJYBQ
> MY WEB: https://nicesky.tech

## LICENSE

```
Copyright 2018 fairytale110
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.
```
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
44 changes: 44 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apply plugin: rootProject.ext.plugins.android

android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
defaultConfig {
applicationId rootProject.ext.android.applicationId
minSdkVersion rootProject.ext.android.sampleMinSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}


lintOptions {
abortOnError false
}

// compileOptions {
// sourceCompatibility JavaVersion.VERSION_1_8
// targetCompatibility JavaVersion.VERSION_1_8
// }
}

dependencies {
androidTestImplementation(rootProject.ext.dependencies.expressoCore) {
exclude group: "com.android.support", module: "support-annotations"
}
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation rootProject.ext.dependencies.junit
implementation rootProject.ext.dependencies.appCompat
debugImplementation rootProject.ext.dependencies.leakcanary

androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation project(':libsquaresloadingview')
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# 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 *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package tech.nicesky.squaresloadingview;

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.*;

/**
* Instrumented 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() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("tech.nicesky.squaresloadingview", appContext.getPackageName());
}
}
Loading

0 comments on commit 253e8e6

Please sign in to comment.