diff options
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 ) { |