From ee6322a1851220fd0855348d07cca15e826c6a5e Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 21 May 2011 00:05:51 +0200 Subject: [PATCH 1/1] make textview more dynamic --- MS2Debounce/res/layout/main.xml | 3 ++- .../src/de/rmdir/ms2debounce/DebounceModuleHelper.java | 4 ++++ MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/MS2Debounce/res/layout/main.xml b/MS2Debounce/res/layout/main.xml index 8fc5194..323709b 100644 --- a/MS2Debounce/res/layout/main.xml +++ b/MS2Debounce/res/layout/main.xml @@ -5,9 +5,10 @@ android:layout_height="fill_parent" > diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java index 7a9f3de..e4ad296 100644 --- a/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java +++ b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java @@ -42,6 +42,10 @@ public class DebounceModuleHelper return false; } + public int getDelay() { + return 10; + } + private synchronized void extractModule() { File debounce_ko = new File(ctx.getFilesDir() + "/debounce.ko"); diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java b/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java index 00eaa61..654cf5a 100644 --- a/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java +++ b/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java @@ -3,6 +3,7 @@ package de.rmdir.ms2debounce; import android.app.Activity; import android.os.Bundle; import android.content.Intent; +import android.widget.TextView; public class MS2Debounce extends Activity { @@ -18,5 +19,8 @@ public class MS2Debounce extends Activity } 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"); } } -- 2.39.5