summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout/service_extra.xml8
-rw-r--r--src/net/hoopajoo/android/SoftKeys/SoftKeysService.java18
2 files changed, 19 insertions, 7 deletions
diff --git a/res/layout/service_extra.xml b/res/layout/service_extra.xml
index ded0263..7024bb0 100644
--- a/res/layout/service_extra.xml
+++ b/res/layout/service_extra.xml
@@ -20,6 +20,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_view"
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+<LinearLayout
+ android:id="@+id/button_container"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -125,4 +132,5 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="custom"/>
+</LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
index 4c9b265..fa23127 100644
--- a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
+++ b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
@@ -354,10 +354,10 @@ public class SoftKeysService extends Service {
// extra view (dpad, customizable buttons)
mExtraView = l.inflate( R.layout.service_extra, null );
- Generator.applyContainerExtras( mExtraView, "service_extra",
+ Generator.applyContainerExtras( mExtraView.findViewById( R.id.button_container ), "service_extra",
Generator.currentTheme( this ),
Generator.scaledIconSize( this, 0, buttonMult ) );
-
+
mExtraView.setOnTouchListener( touch );
OnLongClickListener configButtons = new OnLongClickListener() {
@@ -427,10 +427,7 @@ public class SoftKeysService extends Service {
break;
}
}
- mNumRows = settings.getInt( "service_extra_num_custom", 0 );
- mExtraEnabled = settings.getBoolean( "service_extra_enabled", false );
- updateExtraRows();
-
+
// update the button configs, they are simply mapped by id in to a hashmap
int i = 0;
for( int id : new int[] {
@@ -460,8 +457,13 @@ public class SoftKeysService extends Service {
((Button)mExtraView.findViewById( id )).setText( keyname );
mCustomKeys.put( id, keycode );
}
+
applyTransparency( mExtraView, settings.getInt( "service_extra_transparency", 0 ) );
-
+
+ mNumRows = settings.getInt( "service_extra_num_custom", 0 );
+ mExtraEnabled = settings.getBoolean( "service_extra_enabled", false );
+ updateExtraRows();
+
// hide stuff
toggleBar();
@@ -669,9 +671,11 @@ public class SoftKeysService extends Service {
WindowManager wm = (WindowManager)getSystemService(WINDOW_SERVICE);
wm.removeView( mView );
wm.removeView( mBumpView );
+ wm.removeView( mExtraView );
mView = null;
mBumpView = null;
+ mExtraView = null;
mOrientationListener.disable();
}