diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2011-01-10 18:01:50 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2011-01-10 18:01:50 (GMT) |
commit | fdadf619edd01a8f5c6ebed0ee1dae1615b38a20 (patch) | |
tree | 2ca6a29bef5279401ee8b98bc1640737f7a2d2b6 /src | |
parent | 52b1064298e9f47c573a0fbdc168f72e80f12877 (diff) | |
download | SoftKeys-fdadf619edd01a8f5c6ebed0ee1dae1615b38a20.zip SoftKeys-fdadf619edd01a8f5c6ebed0ee1dae1615b38a20.tar.gz SoftKeys-fdadf619edd01a8f5c6ebed0ee1dae1615b38a20.tar.bz2 |
Save numrows, update the buttons not the linearlayouts from before
Diffstat (limited to 'src')
-rw-r--r-- | src/net/hoopajoo/android/SoftKeys/SoftKeysService.java | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java index 11b7257..3ba62ba 100644 --- a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java +++ b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java @@ -402,7 +402,7 @@ public class SoftKeysService extends Service { break; } } - mNumRows = 0; + mNumRows = settings.getInt( "service_extra_num_custom", 0 ); updateExtraRows(); // update the button configs, they are simply mapped by id in to a hashmap @@ -550,8 +550,8 @@ public class SoftKeysService extends Service { case R.id.extra_more: mNumRows++; - if( mNumRows > 3 ) { - mNumRows = 3; + if( mNumRows > 6 ) { + mNumRows = 6; } updateExtraRows(); hide = false; @@ -644,7 +644,14 @@ public class SoftKeysService extends Service { private void updateExtraRows() { int i = 0; - int[] ids = { R.id. extra_row1, R.id.extra_row2, R.id.extra_row3 }; + int[] ids = { + R.id.extra_custom1, + R.id.extra_custom2, + R.id.extra_custom3, + R.id.extra_custom4, + R.id.extra_custom5, + R.id.extra_custom6 + }; for( int id : ids ) { i++; @@ -655,6 +662,13 @@ public class SoftKeysService extends Service { mExtraView.findViewById( id ).setVisibility( View.VISIBLE ); } } + + SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences( this ); + + SharedPreferences.Editor e = settings.edit(); + e.putInt( "service_extra_num_custom", mNumRows ); + e.commit(); + } private void savePosition() { |