Skip to content

Commit

Permalink
getTheme() delegated to Activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuinden committed Jul 31, 2016
1 parent 6f3224d commit e5a3b59
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Change Log
==========


Flowless Version 1.0-alpha1.8 *(2016-07-31)*
Flowless Version 1.0-alpha1.9 *(2016-07-31)*
--------------------------------------------
* Added `InternalContextThemeWrapper` to allow using Design Support Library

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ In order to use Flow(less), you need to add jitpack to your project root gradle:

and add the compile dependency to your module level gradle.

compile 'com.github.Zhuinden:flowless:1.0-alpha1.8'
compile 'com.github.Zhuinden:flowless:1.0-alpha1.9'


Then, install Flow into your Activity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.view.ContextThemeWrapper;

/**
Expand All @@ -20,6 +21,11 @@ final class InternalContextThemeWrapper
this.activity = activity;
}

@Override
public Resources.Theme getTheme() {
return activity.getTheme();
}

@Override
public Object getSystemService(String name) {
if(FLOW_SERVICE.equals(name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.Resources;

final class InternalContextWrapper
extends ContextWrapper
Expand All @@ -32,6 +33,11 @@ final class InternalContextWrapper
this.activity = activity;
}

@Override
public Resources.Theme getTheme() {
return activity.getTheme();
}

@Override
public Object getSystemService(String name) {
if(FLOW_SERVICE.equals(name)) {
Expand Down

0 comments on commit e5a3b59

Please sign in to comment.