diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2011-02-15 17:32:44 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2011-02-15 17:32:44 (GMT) |
commit | e84d1dc3b145751d039a4082fe98c0b8006b68f7 (patch) | |
tree | 4ad4c5c03807455d63a09d089b75dd25f4f58e8b /src/net/hoopajoo/android/SoftKeys/SoftKeysService.java | |
parent | a4305e26768cbc7d8ff3ba70327f91bfee7cc323 (diff) | |
download | SoftKeys-e84d1dc3b145751d039a4082fe98c0b8006b68f7.zip SoftKeys-e84d1dc3b145751d039a4082fe98c0b8006b68f7.tar.gz SoftKeys-e84d1dc3b145751d039a4082fe98c0b8006b68f7.tar.bz2 |
Add bootup option if you want the service without running as your default
launcher, needed to restructure some initialization code because of that
since Keys is not the primary entry point anymore
Diffstat (limited to 'src/net/hoopajoo/android/SoftKeys/SoftKeysService.java')
-rw-r--r-- | src/net/hoopajoo/android/SoftKeys/SoftKeysService.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java index e75cbf5..d339d22 100644 --- a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java +++ b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java @@ -75,7 +75,7 @@ public class SoftKeysService extends Service { private int mNumDrags; private OrientationEventListener mOrientationListener; private Runnable mUpdateDrag; - + private int mNumRows = 0; private Map<Integer,Integer> mCustomKeys = new HashMap<Integer,Integer>(); @@ -88,6 +88,7 @@ public class SoftKeysService extends Service { @Override public void onCreate() { super.onCreate(); + ((Globals)getApplication()).bootup(); OnClickListener c = new OnClickListener() { @Override @@ -300,7 +301,9 @@ public class SoftKeysService extends Service { mView.setOnLongClickListener( longpress_rotate ); // only drag by the exit button now - mView.findViewById( R.id.exit ).setOnTouchListener( touch ); + if( settings.getBoolean( "service_drag", true ) ) { + mView.findViewById( R.id.exit ).setOnTouchListener( touch ); + } mView.findViewById( R.id.exit ).setOnLongClickListener( longpress_rotate ); /* For when long click motionevent is fixed @@ -319,7 +322,6 @@ public class SoftKeysService extends Service { // Put together the popper mBumpView = l.inflate( R.layout.service_popper, null ); - mBumpView.setOnTouchListener( touch ); // insert the button Generator.createButtonContainer( this, 0, buttonMult, "service_popper", @@ -327,7 +329,10 @@ public class SoftKeysService extends Service { new int[] { R.id.popper } ); ImageButton b = (ImageButton)mBumpView.findViewById( R.id.popper ); - b.setOnTouchListener( touch ); + if( settings.getBoolean( "service_drag_popper", true ) ) { + mBumpView.setOnTouchListener( touch ); + b.setOnTouchListener( touch ); + } // apply alpha applyTransparency( mBumpView, settings.getInt( "service_popper_transparency", 0 ) ); @@ -354,7 +359,9 @@ public class SoftKeysService extends Service { Generator.currentTheme( this ), Generator.scaledIconSize( this, 0, buttonMult ) ); - mExtraView.setOnTouchListener( touch ); + if( settings.getBoolean( "service_drag_extra", true ) ) { + mExtraView.setOnTouchListener( touch ); + } OnLongClickListener configButtons = new OnLongClickListener() { @Override |