]> git.zerfleddert.de Git - ms2-fixes/commitdiff
make textview more dynamic
authorMichael Gernoth <michael@gernoth.net>
Fri, 20 May 2011 22:05:51 +0000 (00:05 +0200)
committerMichael Gernoth <michael@gernoth.net>
Fri, 20 May 2011 22:05:51 +0000 (00:05 +0200)
MS2Debounce/res/layout/main.xml
MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java
MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java

index 8fc51942b7bb62550da4e454523a67cb4c0ca7f7..323709bd4c29b7ecece2328b3c6db645dcad3024 100644 (file)
@@ -5,9 +5,10 @@
     android:layout_height="fill_parent"
     >
 <TextView  
     android:layout_height="fill_parent"
     >
 <TextView  
+    android:id="@+id/text"
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
-    android:text="You will soon be able to set the debounce_delay here."
+    android:text=""
     />
 </LinearLayout>
 
     />
 </LinearLayout>
 
index 7a9f3de200d4df1fe87f7744177487228699927b..e4ad296e2e47c5b2cad17967de860a2906061073 100644 (file)
@@ -42,6 +42,10 @@ public class DebounceModuleHelper
                return false;
        }
 
                return false;
        }
 
+       public int getDelay() {
+               return 10;
+       }
+
        private synchronized void extractModule() {
                File debounce_ko = new File(ctx.getFilesDir() + "/debounce.ko");
 
        private synchronized void extractModule() {
                File debounce_ko = new File(ctx.getFilesDir() + "/debounce.ko");
 
index 00eaa61ef7001d5e737c57e0e3f5794c41040f17..654cf5ac988983ffe6a8bda607ac9195fdab2da8 100644 (file)
@@ -3,6 +3,7 @@ package de.rmdir.ms2debounce;
 import android.app.Activity;
 import android.os.Bundle;
 import android.content.Intent;
 import android.app.Activity;
 import android.os.Bundle;
 import android.content.Intent;
+import android.widget.TextView;
 
 public class MS2Debounce extends Activity
 {
 
 public class MS2Debounce extends Activity
 {
@@ -18,5 +19,8 @@ public class MS2Debounce extends Activity
                }
 
                setContentView(R.layout.main);
                }
 
                setContentView(R.layout.main);
+
+               TextView text = (TextView)findViewById(R.id.text);
+               text.setText("You will soon be able to set the debounce_delay here.\nModule loaded: " + module.isLoaded() + "\ndebounce_delay: " + module.getDelay() + "ms");
        }
 }
        }
 }
Impressum, Datenschutz