Skip to content

Commit c545195

Browse files
committed
updates dali to v0.3.0
updates to renderscript 20 updates publish script adds debugview
1 parent 88156c7 commit c545195

File tree

12 files changed

+220
-198
lines changed

12 files changed

+220
-198
lines changed

CHANGELOG

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Releases
2+
3+
## v0.3.0
4+
* first version in jcenter
5+
* updates renderscriptTargetApi to 20
6+
* updates target sdk and build tools to 25
7+
* adds debug view in app
8+
9+
## v0.2.0
10+
initial release

DaliTestApp/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ android {
1616
}
1717

1818
defaultConfig {
19-
minSdkVersion rootProject.ext.minSdkVersion
19+
minSdkVersion 14
2020
targetSdkVersion rootProject.ext.targetSdkVersion
2121
versionCode rootProject.ext.versionCode
2222
versionName rootProject.ext.versionName
@@ -42,7 +42,8 @@ android {
4242
dependencies {
4343
compile 'com.android.support:appcompat-v7:25.1.0'
4444
compile 'com.android.support:appcompat-v7:25.1.0'
45-
compile 'com.squareup.picasso:picasso:2.5.+'
45+
compile 'com.squareup.picasso:picasso:2.5.2'
4646

47-
compile 'at.favre.lib:dali:0.2'
47+
compile 'at.favre.lib:dali:0.3.0'
48+
compile 'at.favre.lib.hood:hood-extended:0.2.3'
4849
}

DaliTestApp/proguard-rules.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@
1414
# class:
1515
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1616
# public *;
17-
#}
17+
#}
18+
19+
-keep public **.BuildConfig {public static *;}
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="at.favre.app.dalitest" >
2+
<manifest package="at.favre.app.dalitest"
3+
xmlns:android="http://schemas.android.com/apk/res/android">
44

55
<application
6+
android:name=".DaliTestApplication"
67
android:allowBackup="true"
78
android:icon="@mipmap/ic_launcher"
89
android:label="@string/app_name"
9-
android:name=".DaliTestApplication"
10-
android:theme="@style/AppTheme" >
10+
android:theme="@style/AppTheme">
1111
<activity
1212
android:name=".activity.MainMenuActivity"
13-
android:label="@string/app_name" >
13+
android:label="@string/app_name">
1414
<intent-filter>
15-
<action android:name="android.intent.action.MAIN" />
15+
<action android:name="android.intent.action.MAIN"/>
1616

17-
<category android:name="android.intent.category.LAUNCHER" />
17+
<category android:name="android.intent.category.LAUNCHER"/>
1818
</intent-filter>
1919
</activity>
2020

21-
<activity android:name=".activity.GenericActivity"
22-
android:windowSoftInputMode="stateHidden"/>
21+
<activity
22+
android:name=".activity.GenericActivity"
23+
android:windowSoftInputMode="stateHidden"/>
2324
<activity android:name=".activity.NavigationDrawerActivity"/>
25+
<activity
26+
android:name=".activity.DebugActivity"
27+
android:label="Debug View"
28+
android:theme="@style/HoodThemeDark"/>
2429
</application>
25-
2630
</manifest>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package at.favre.app.dalitest.activity;
2+
3+
import android.support.annotation.NonNull;
4+
5+
import at.favre.app.dalitest.BuildConfig;
6+
import at.favre.lib.hood.extended.PopHoodActivity;
7+
import at.favre.lib.hood.interfaces.Page;
8+
import at.favre.lib.hood.interfaces.Pages;
9+
import at.favre.lib.hood.util.defaults.DefaultProperties;
10+
11+
public class DebugActivity extends PopHoodActivity {
12+
@NonNull
13+
@Override
14+
public Pages getPageData(@NonNull Pages emptyPages) {
15+
Page page = emptyPages.addNewPage();
16+
page.add(DefaultProperties.createSectionBasicDeviceInfo());
17+
page.add(DefaultProperties.createDetailedDeviceInfo(this));
18+
page.add(DefaultProperties.createSectionAppVersionInfoFromBuildConfig(BuildConfig.class));
19+
page.add(DefaultProperties.createSectionAppVersionInfoFromBuildConfig(at.favre.lib.dali.BuildConfig.class).removeHeader());
20+
21+
22+
return emptyPages;
23+
}
24+
}

DaliTestApp/src/main/java/at/favre/app/dalitest/activity/MainMenuActivity.java

Lines changed: 54 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99

1010
import at.favre.app.dalitest.R;
1111
import at.favre.lib.dali.Dali;
12+
import at.favre.lib.hood.Hood;
13+
import at.favre.lib.hood.interfaces.actions.ManagerControl;
1214

1315

1416
public class MainMenuActivity extends AppCompatActivity {
17+
private ManagerControl control;
1518

1619
@Override
1720
protected void onCreate(Bundle savedInstanceState) {
@@ -22,42 +25,57 @@ protected void onCreate(Bundle savedInstanceState) {
2225
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
2326
setSupportActionBar(toolbar);
2427

25-
findViewById(R.id.btn_blur1).setOnClickListener(new StartActivityListener(this,0));
26-
findViewById(R.id.btn_liveblur1).setOnClickListener(new StartActivityListener(this,1));
27-
findViewById(R.id.btn_animation1).setOnClickListener(new StartActivityListener(this,2));
28-
findViewById(R.id.btn_viewblur).setOnClickListener(new StartActivityListener(this,3));
29-
findViewById(R.id.btn_blur2).setOnClickListener(new StartActivityListener(this,4));
30-
findViewById(R.id.btn_blur_misc).setOnClickListener(new StartActivityListener(this,5));
31-
findViewById(R.id.btn_navdrawer).setOnClickListener(new View.OnClickListener() {
32-
@Override
33-
public void onClick(View view) {
34-
startActivity(new Intent(MainMenuActivity.this,NavigationDrawerActivity.class));
35-
}
36-
});
37-
38-
findViewById(R.id.btn_clear_cache).setOnClickListener(new View.OnClickListener() {
39-
@Override
40-
public void onClick(View view) {
41-
Dali.resetAndSetNewConfig(MainMenuActivity.this,new Dali.Config());
42-
Dali.setDebugMode(true);
43-
}
44-
});
28+
findViewById(R.id.btn_blur1).setOnClickListener(new StartActivityListener(this, 0));
29+
findViewById(R.id.btn_liveblur1).setOnClickListener(new StartActivityListener(this, 1));
30+
findViewById(R.id.btn_animation1).setOnClickListener(new StartActivityListener(this, 2));
31+
findViewById(R.id.btn_viewblur).setOnClickListener(new StartActivityListener(this, 3));
32+
findViewById(R.id.btn_blur2).setOnClickListener(new StartActivityListener(this, 4));
33+
findViewById(R.id.btn_blur_misc).setOnClickListener(new StartActivityListener(this, 5));
34+
findViewById(R.id.btn_navdrawer).setOnClickListener(new View.OnClickListener() {
35+
@Override
36+
public void onClick(View view) {
37+
startActivity(new Intent(MainMenuActivity.this, NavigationDrawerActivity.class));
38+
}
39+
});
40+
41+
findViewById(R.id.btn_clear_cache).setOnClickListener(new View.OnClickListener() {
42+
@Override
43+
public void onClick(View view) {
44+
Dali.resetAndSetNewConfig(MainMenuActivity.this, new Dali.Config());
45+
Dali.setDebugMode(true);
46+
}
47+
});
48+
49+
control = Hood.ext().registerShakeToOpenDebugActivity(getApplicationContext(),
50+
DebugActivity.createIntent(this, DebugActivity.class));
51+
}
52+
53+
@Override
54+
protected void onResume() {
55+
super.onResume();
56+
control.start();
4557
}
4658

47-
private static class StartActivityListener implements View.OnClickListener {
48-
private int fragmentId;
49-
private Activity activity;
50-
51-
private StartActivityListener(Activity ctx, int fragmentId) {
52-
this.fragmentId = fragmentId;
53-
this.activity = ctx;
54-
}
55-
56-
@Override
57-
public void onClick(View view) {
58-
Intent i = new Intent(activity, GenericActivity.class);
59-
i.putExtra(GenericActivity.FRAGMENT_ID,fragmentId);
60-
activity.startActivity(i);
61-
}
62-
}
59+
@Override
60+
protected void onPause() {
61+
super.onPause();
62+
control.stop();
63+
}
64+
65+
private static class StartActivityListener implements View.OnClickListener {
66+
private int fragmentId;
67+
private Activity activity;
68+
69+
private StartActivityListener(Activity ctx, int fragmentId) {
70+
this.fragmentId = fragmentId;
71+
this.activity = ctx;
72+
}
73+
74+
@Override
75+
public void onClick(View view) {
76+
Intent i = new Intent(activity, GenericActivity.class);
77+
i.putExtra(GenericActivity.FRAGMENT_ID, fragmentId);
78+
activity.startActivity(i);
79+
}
80+
}
6381
}

README.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,16 @@ easily extended and pretty every configuration can be changed.
1111

1212
*Note: This library is in prototype state and not ready for prime time. It is mostly feature complete (except for the animation module) although bugs are to be expected.*
1313

14-
# Usage
14+
# Install
1515

16-
Add the lib as gradle dependency either by using the provided `.aar` file (see releases)
17-
[as local dependency](http://stackoverflow.com/questions/24506648/adding-local-aar-files-to-gradle-build-using-flatdirs-is-not-working)
18-
or use the maven dependency:
16+
Add the following to your dependencies ([add jcenter to your repositories](https://developer.android.com/studio/build/index.html#top-level) if you haven't)
1917

2018
```gradle
2119
dependencies {
22-
compile 'at.favre.lib:dali:0.2'
20+
compile 'at.favre.lib:dali:0.3.0'
2321
}
2422
```
2523

26-
Currently the lib is not on jcenter or maven central yet, therefore you need to add my maven repo in your root build.gradle:
27-
28-
```gradle
29-
allprojects {
30-
repositories {
31-
jcenter()
32-
maven {
33-
url 'https://dl.bintray.com/patrickfav/maven/'
34-
}
35-
}
36-
}
37-
```
38-
3924
Then add the following to your app's build.gradle to get Renderscript to work
4025

4126
```gradle

build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ plugins {
1616
allprojects {
1717
repositories {
1818
jcenter()
19-
maven {
20-
url 'https://dl.bintray.com/patrickfav/maven/'
21-
}
2219
}
2320
}
2421

dali/build.gradle

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
apply plugin: 'com.android.library'
22

3-
ext {
4-
bintrayRepo = 'maven'
5-
bintrayName = 'dali'
6-
7-
publishedGroupId = 'at.favre.lib'
8-
libraryName = 'Dali'
9-
artifact = 'dali'
10-
11-
libraryDescription = 'Dali is an image blur library for Android. It is easy to use, fast and extensible. Dali contains several modules for either static blurring, live blurring and animations.'
12-
13-
siteUrl = 'https://github.com/patrickfav/Dali'
14-
gitUrl = 'https://github.com/patrickfav/Dali.git'
15-
16-
libraryVersion = rootProject.ext.versionName
17-
18-
developerId = 'patrickfav'
19-
developerName = 'Patrick Favre-Bulle'
20-
developerEmail = 'patrick.favrebulle@gmail.com'
21-
22-
licenseName = 'The Apache Software License, Version 2.0'
23-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
24-
allLicenses = ["Apache-2.0"]
25-
}
26-
273
def Properties localProps = getSigningProperties()
284

295
android {
@@ -69,5 +45,4 @@ dependencies {
6945
compile 'com.android.support:recyclerview-v7:25.1.0'
7046
}
7147

72-
//apply from: '../gradle/install.gradle'
73-
//apply from: '../gradle/publish.gradle'
48+
apply from: "$rootDir/publish.gradle"

gradle/install.gradle

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)