Skip to content

Commit 4f849d4

Browse files
committed
version 2.0.0-BETA-1
- view rewritten from scratch - profile management - create view from xml - new profile chooser (inspired by YouTube app)
1 parent 195f1c8 commit 4f849d4

119 files changed

Lines changed: 2353 additions & 1983 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
.gradle
2-
gradle*
3-
/gradle
4-
/local.properties
5-
.idea/*
6-
.DS_Store
1+
*.iml
2+
*.apk
3+
*.DS_Store
4+
5+
/*.png
6+
7+
/.gradle
8+
/.idea
79
/build
810
/captures
9-
app/build/
10-
/libraries/
11-
/gen/
12-
/release
13-
*.iml
11+
/gradle
12+
/gradlew
13+
/gradlew.bat
14+
/local.properties
15+
16+
/app/build
17+
/library/build

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Raphaël Bussa
3+
Copyright (c) 2017 Raphaël Bussa
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

app/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/app-release.apk

-1.4 MB
Binary file not shown.

app/build.gradle

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2017 Raphaël Bussa
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
125
apply plugin: 'com.android.application'
226

327
android {
4-
compileSdkVersion 23
5-
buildToolsVersion '23.0.3'
28+
29+
compileSdkVersion var.compileSdk
30+
buildToolsVersion var.buildTools
631

732
defaultConfig {
833
applicationId "rebus.header.view.sample"
9-
minSdkVersion 8
10-
targetSdkVersion 23
11-
versionCode 3
12-
versionName "1.1.1"
34+
minSdkVersion var.minSdk
35+
targetSdkVersion var.targetSdk
36+
versionCode 1
37+
versionName "${var.version}"
1338
}
39+
1440
buildTypes {
1541
release {
1642
minifyEnabled false
@@ -20,8 +46,9 @@ android {
2046
}
2147

2248
dependencies {
23-
compile project(':headerview')
24-
compile 'com.android.support:appcompat-v7:23.4.0'
25-
compile 'com.android.support:design:23.4.0'
26-
compile 'com.squareup.picasso:picasso:2.5.2'
49+
compile project(':library')
50+
compile "com.android.support:appcompat-v7:${var.supportLib}"
51+
compile "com.android.support:design:${var.supportLib}"
52+
53+
compile 'com.github.bumptech.glide:glide:3.7.0'
2754
}

app/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add project specific ProGuard rules here.
22
# By default, the flags in this file are appended to flags specified
3-
# in C:\Users\Raphaël\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
3+
# in /Users/raphaelbussa/Library/Android/sdk/tools/proguard/proguard-android.txt
44
# You can edit the include path and order by changing the proguardFiles
55
# directive in build.gradle.
66
#

app/src/androidTest/java/rebus/header/view/sample/ApplicationTest.java

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package rebus.header.view.sample;
2+
3+
public class ExampleInstrumentedTest {
4+
5+
}

app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
~ The MIT License (MIT)
44
~
5-
~ Copyright (c) 2015 Raphaël Bussa
5+
~ Copyright (c) 2017 Raphaël Bussa
66
~
77
~ Permission is hereby granted, free of charge, to any person obtaining a copy
88
~ of this software and associated documentation files (the "Software"), to deal
@@ -26,31 +26,21 @@
2626
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2727
package="rebus.header.view.sample">
2828

29-
<uses-permission android:name="android.permission.INTERNET" />
29+
<uses-permission android:name="android.permission.INTERNET"/>
3030

3131
<application
3232
android:allowBackup="true"
3333
android:icon="@mipmap/ic_launcher"
34+
android:name=".CustomApplication"
3435
android:label="@string/app_name"
35-
android:theme="@style/AppTheme">
36-
<activity
37-
android:name=".MainActivity"
38-
android:screenOrientation="portrait">
36+
android:supportsRtl="true"
37+
android:theme="@style/AppTheme.Drawer">
38+
<activity android:name=".MainActivity">
3939
<intent-filter>
4040
<action android:name="android.intent.action.MAIN" />
4141
<category android:name="android.intent.category.LAUNCHER" />
4242
</intent-filter>
4343
</activity>
44-
<activity
45-
android:name=".HeaderActivity"
46-
android:theme="@style/AppTheme.Drawer" />
47-
<activity
48-
android:name=".HeaderCompactActivity"
49-
android:theme="@style/AppTheme.Drawer" />
50-
<activity
51-
android:name=".HeaderCompactBelowToolbarActivity" />
52-
<activity
53-
android:name=".HeaderBelowToolbarActivity" />
5444
</application>
5545

56-
</manifest>
46+
</manifest>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2017 Raphaël Bussa
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
package rebus.header.view.sample;
26+
27+
import android.app.Application;
28+
import android.net.Uri;
29+
import android.widget.ImageView;
30+
31+
import com.bumptech.glide.Glide;
32+
33+
import rebus.header.view.ImageLoader;
34+
35+
/**
36+
* Created by raphaelbussa on 13/01/17.
37+
*/
38+
39+
public class CustomApplication extends Application {
40+
41+
@Override
42+
public void onCreate() {
43+
super.onCreate();
44+
ImageLoader.init(new ImageLoader.ImageLoaderInterface() {
45+
@Override
46+
public void loadImage(Uri url, ImageView imageView, @ImageLoader.Type int type) {
47+
switch (type) {
48+
case ImageLoader.AVATAR:
49+
Glide.with(imageView.getContext())
50+
.load(url)
51+
.asBitmap()
52+
.placeholder(R.drawable.ic_placeholder)
53+
.error(R.drawable.ic_placeholder)
54+
.into(imageView);
55+
break;
56+
case ImageLoader.HEADER:
57+
Glide.with(imageView.getContext())
58+
.load(url)
59+
.asBitmap()
60+
.placeholder(R.drawable.ic_placeholder_bg)
61+
.error(R.drawable.ic_placeholder_bg)
62+
.into(imageView);
63+
break;
64+
}
65+
}
66+
67+
});
68+
69+
}
70+
}

0 commit comments

Comments
 (0)