diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2010-12-27 20:50:17 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2010-12-27 20:50:17 (GMT) |
commit | 669d442509c2b6d38f5a1ba9ccfed8d5d22bf21b (patch) | |
tree | fd2d52df141c87ed7012da732c3ffe8f1b6e1215 /src/net/hoopajoo/android/SoftKeys/Theme.java | |
parent | fbdadd1b0fcd7b7d92c261626791f3c36dba05e5 (diff) | |
download | SoftKeys-669d442509c2b6d38f5a1ba9ccfed8d5d22bf21b.zip SoftKeys-669d442509c2b6d38f5a1ba9ccfed8d5d22bf21b.tar.gz SoftKeys-669d442509c2b6d38f5a1ba9ccfed8d5d22bf21b.tar.bz2 |
Add theme flags to resize background the same way we resize icons so
everything is the same size
Diffstat (limited to 'src/net/hoopajoo/android/SoftKeys/Theme.java')
-rw-r--r-- | src/net/hoopajoo/android/SoftKeys/Theme.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/Theme.java b/src/net/hoopajoo/android/SoftKeys/Theme.java index 9a886c7..310fd31 100644 --- a/src/net/hoopajoo/android/SoftKeys/Theme.java +++ b/src/net/hoopajoo/android/SoftKeys/Theme.java @@ -69,6 +69,32 @@ public class Theme { return( null ); } + // these check theme config flags + public boolean getBoolean( String[] name ) { + return getBoolean( name, false ); + } + + public boolean getBoolean( String[] name, boolean def ) { + String flag = getString( name ); + if( flag != null ) { + // t/true is true, everything else is false + if( flag.startsWith( "t" ) ) { + return( true ); + } + return( false ); + } + + return( def ); + } + + public String getString( String[] name ) { + IdPack i = getId( name, "string" ); + if( i != null ) { + return i.R.getString( i.id ); + } + return( null ); + } + // For use mostly with the notification bar, allowing custom themes to include // new icons primarily, but since it's a layout they can do more than that public RemoteViews getRemoteViews( String[] name ) { |