Skip to content
This repository was archived by the owner on Mar 18, 2022. It is now read-only.

Commit 541fa91

Browse files
committed
* initial commit
1 parent f97fb01 commit 541fa91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1468
-2
lines changed

Crossfader.iml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id="Crossfader" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="java-gradle" name="Java-Gradle">
5+
<configuration>
6+
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
7+
<option name="BUILDABLE" value="false" />
8+
</configuration>
9+
</facet>
10+
</component>
11+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
12+
<exclude-output />
13+
<content url="file://$MODULE_DIR$">
14+
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
15+
</content>
16+
<orderEntry type="inheritedJdk" />
17+
<orderEntry type="sourceFolder" forTests="false" />
18+
</component>
19+
</module>
Loading
Loading
Loading
Loading
Loading

DEV/ic_launcher/web_hi_res_512.png

16.1 KB
Loading

DEV/screenshots/screenshot1.png

238 KB
Loading

DEV/screenshots/screenshot1_small.png

107 KB
Loading

DEV/screenshots/screenshot2.png

240 KB
Loading

DEV/screenshots/screenshot2_small.png

109 KB
Loading

DEV/screenshots/screenshot3.png

252 KB
Loading

DEV/screenshots/screenshot3_small.png

114 KB
Loading

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

README.md

+52-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,52 @@
1-
# Crossfader
1+
#Crossfader [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/crossfader/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/crossfader)
2+
[![Join the chat at https://gitter.im/mikepenz/crossfader](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mikepenz/crossfader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3+
4+
**Crossfader**
5+
6+
#Preview
7+
##Demo
8+
To follow
9+
10+
##Screenshots
11+
![Image](https://raw.githubusercontent.com/mikepenz/Crossfader/develop/DEV/screenshots/screenshot1_small.png)
12+
![Image](https://raw.githubusercontent.com/mikepenz/Crossfader/develop/DEV/screenshots/screenshot2_small.png)
13+
14+
![Image](https://raw.githubusercontent.com/mikepenz/Crossfader/develop/DEV/screenshots/screenshot3_small.png)
15+
16+
17+
#Include in your project
18+
##Using Maven
19+
The Crossfader Library is pushed to [Maven Central](http://search.maven.org/#search|ga|1|g%3A%22com.mikepenz%22), so you just need to add the following dependency to your `build.gradle`.
20+
21+
```javascript
22+
compile('com.mikepenz:crossfader:0.0.1-SNAPSHOT@aar') {
23+
transitive = true
24+
}
25+
```
26+
27+
##How to use
28+
###CrossfaderBuilder
29+
30+
```java
31+
```
32+
33+
#Developed By
34+
35+
* Mike Penz - http://mikepenz.com - <[email protected]>
36+
37+
38+
#License
39+
40+
Copyright 2015 Mike Penz
41+
42+
Licensed under the Apache License, Version 2.0 (the "License");
43+
you may not use this file except in compliance with the License.
44+
You may obtain a copy of the License at
45+
46+
http://www.apache.org/licenses/LICENSE-2.0
47+
48+
Unless required by applicable law or agreed to in writing, software
49+
distributed under the License is distributed on an "AS IS" BASIS,
50+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51+
See the License for the specific language governing permissions and
52+
limitations under the License.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/app.iml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Crossfader" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="android-gradle" name="Android-Gradle">
5+
<configuration>
6+
<option name="GRADLE_PROJECT_PATH" value=":app" />
7+
</configuration>
8+
</facet>
9+
<facet type="android" name="Android">
10+
<configuration>
11+
<option name="SELECTED_BUILD_VARIANT" value="debug" />
12+
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
13+
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
14+
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
15+
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
16+
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
17+
<afterSyncTasks>
18+
<task>generateDebugAndroidTestSources</task>
19+
<task>generateDebugSources</task>
20+
</afterSyncTasks>
21+
<option name="ALLOW_USER_CONFIGURATION" value="false" />
22+
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
23+
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
24+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
25+
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
26+
</configuration>
27+
</facet>
28+
</component>
29+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
30+
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
31+
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
32+
<exclude-output />
33+
<content url="file://$MODULE_DIR$">
34+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
35+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
36+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
37+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
38+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
39+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
40+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
41+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
42+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
43+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
44+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
45+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/debug" type="java-test-resource" />
46+
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
47+
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
48+
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
49+
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
50+
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
51+
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
52+
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
53+
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
54+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
55+
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
56+
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
57+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
58+
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
59+
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
60+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
61+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
62+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
63+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
64+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
65+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
66+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
67+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
68+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
69+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
70+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
71+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
72+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
73+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
74+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" />
75+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/cardview-v7/22.2.0/jars" />
76+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/22.2.0/jars" />
77+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" />
78+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/aboutlibraries/5.0.5/jars" />
79+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/iconics/1.3.0/jars" />
80+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialdrawer/4.0.0.b4-SNAPSHOT/jars" />
81+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialize/0.1.0/jars" />
82+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
83+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
84+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
85+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
86+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
87+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
88+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
89+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
90+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
91+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
92+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
93+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
94+
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
95+
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
96+
</content>
97+
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
98+
<orderEntry type="sourceFolder" forTests="false" />
99+
<orderEntry type="library" exported="" name="aboutlibraries-5.0.5" level="project" />
100+
<orderEntry type="library" exported="" name="materialdrawer-4.0.0.b4-SNAPSHOT" level="project" />
101+
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
102+
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
103+
<orderEntry type="library" exported="" name="materialize-0.1.0" level="project" />
104+
<orderEntry type="library" exported="" name="recyclerview-v7-22.2.0" level="project" />
105+
<orderEntry type="library" exported="" name="cardview-v7-22.2.0" level="project" />
106+
<orderEntry type="library" exported="" name="picasso-2.5.2" level="project" />
107+
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
108+
<orderEntry type="library" exported="" name="iconics-1.3.0" level="project" />
109+
<orderEntry type="module" module-name="library" exported="" />
110+
</component>
111+
</module>

app/build.gradle

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
apply plugin: 'com.android.application'
2+
//wrap with try and catch so the build is working even if the signing stuff is missing
3+
try {
4+
apply from: '../../../signing.gradle'
5+
} catch (ex) {
6+
}
7+
8+
android {
9+
compileSdkVersion rootProject.ext.compileSdkVersion
10+
buildToolsVersion rootProject.ext.buildToolsVersion
11+
12+
defaultConfig {
13+
applicationId "com.mikepenz.crossfader.app"
14+
minSdkVersion 10
15+
targetSdkVersion 22
16+
versionCode 1
17+
versionName '0.0.1'
18+
19+
applicationVariants.all { variant ->
20+
variant.outputs.each { output ->
21+
def file = output.outputFile
22+
def fileName = file.name.replace(".apk", "-v" + versionName + "-c" + versionCode + ".apk")
23+
output.outputFile = new File(file.parentFile, fileName)
24+
}
25+
}
26+
}
27+
buildTypes {
28+
debug {
29+
applicationIdSuffix ".debug"
30+
versionNameSuffix "-DEBUG"
31+
try {
32+
signingConfig signingConfigs.debug
33+
} catch (ex) {
34+
}
35+
minifyEnabled false
36+
}
37+
release {
38+
try {
39+
signingConfig signingConfigs.release
40+
} catch (ex) {
41+
}
42+
zipAlignEnabled true
43+
minifyEnabled false
44+
}
45+
}
46+
lintOptions {
47+
abortOnError false
48+
}
49+
}
50+
51+
dependencies {
52+
compile project(':library')
53+
54+
compile('com.mikepenz:materialdrawer:4.0.0.b4-SNAPSHOT@aar') {
55+
transitive = true
56+
}
57+
compile('com.mikepenz:aboutlibraries:5.0.5@aar') {
58+
transitive = true
59+
}
60+
61+
compile 'com.squareup.picasso:picasso:2.5.2'
62+
}

app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Entwicklung/android-sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}

app/src/main/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.mikepenz.crossfader.app">
3+
4+
<uses-permission android:name="android.permission.INTERNET" />
5+
6+
<application
7+
android:name="com.mikepenz.crossfader.app.CustomApplication"
8+
android:allowBackup="true"
9+
android:icon="@drawable/ic_launcher"
10+
android:label="@string/app_name">
11+
<!-- android:supportsRtl="true" -->
12+
<activity
13+
android:name=".SimpleActivity"
14+
android:label="@string/app_name"
15+
android:theme="@style/MaterialDrawerTheme">
16+
<intent-filter>
17+
<action android:name="android.intent.action.MAIN" />
18+
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.mikepenz.crossfader.app;
2+
3+
import android.app.Application;
4+
import android.content.Context;
5+
import android.graphics.drawable.Drawable;
6+
import android.net.Uri;
7+
import android.widget.ImageView;
8+
9+
import com.mikepenz.materialdrawer.util.DrawerImageLoader;
10+
import com.squareup.picasso.Picasso;
11+
12+
/**
13+
* Created by mikepenz on 27.03.15.
14+
*/
15+
public class CustomApplication extends Application {
16+
17+
@Override
18+
public void onCreate() {
19+
super.onCreate();
20+
21+
//initialize and create the image loader logic
22+
DrawerImageLoader.init(new DrawerImageLoader.IDrawerImageLoader() {
23+
@Override
24+
public void set(ImageView imageView, Uri uri, Drawable placeholder) {
25+
Picasso.with(imageView.getContext()).load(uri).placeholder(placeholder).into(imageView);
26+
}
27+
28+
@Override
29+
public void cancel(ImageView imageView) {
30+
Picasso.with(imageView.getContext()).cancelRequest(imageView);
31+
}
32+
33+
@Override
34+
public Drawable placeholder(Context ctx) {
35+
return null;
36+
}
37+
});
38+
}
39+
}

0 commit comments

Comments
 (0)