Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Applied mobileorgNG theme to outline when light theme is selected.

  • Loading branch information...
commit 8e030b3e80b330c4148242b6da133370705d876c 1 parent 73b176d
Henning Weiss hdweiss authored
2  src/com/matburt/mobileorg/Gui/Outline/OutlineAdapter.java
View
@@ -27,7 +27,7 @@ public OutlineAdapter(Context context) {
super(context, R.layout.outline_item);
this.resolver = context.getContentResolver();
- this.theme = new DefaultTheme();
+ this.theme = DefaultTheme.getTheme(context);
init();
}
20 src/com/matburt/mobileorg/Gui/Theme/DefaultTheme.java
View
@@ -1,5 +1,8 @@
package com.matburt.mobileorg.Gui.Theme;
+import com.matburt.mobileorg.util.OrgUtils;
+
+import android.content.Context;
import android.graphics.Color;
public class DefaultTheme {
@@ -23,7 +26,18 @@
public int ceLCyan = Color.rgb(0x00, 0xff, 0xff);
public int cfLWhite = Color.rgb(0xff, 0xff, 0xff);
- public final int[] levelColors = new int[] { ccLBlue, c3Yellow, ceLCyan,
- c2Green, c5Purple, ccLBlue, c2Green, ccLBlue, c3Yellow,
- ceLCyan };
+ public int[] levelColors;
+
+ public DefaultTheme() {
+ levelColors = new int[] { ccLBlue, c3Yellow, ceLCyan, c2Green,
+ c5Purple, ccLBlue, c2Green, ccLBlue, c3Yellow, ceLCyan };
+ }
+
+
+ public static DefaultTheme getTheme(Context context) {
+ if(OrgUtils.isThemeLight(context))
+ return new WhiteTheme();
+ else
+ return new DefaultTheme();
+ }
}
4 src/com/matburt/mobileorg/Gui/Theme/WhiteTheme.java
View
@@ -22,5 +22,9 @@ public WhiteTheme() {
cdLPurple = Color.rgb(0x80, 0x00, 0x80);
ceLCyan = Color.rgb(0x00, 0x80, 0x80);
cfLWhite = Color.rgb(0x00, 0x00, 0x00);
+
+ levelColors = new int[] { ccLBlue, c3Yellow, ceLCyan, c2Green,
+ c5Purple, ccLBlue, c2Green, ccLBlue, c3Yellow, ceLCyan };
+
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.