android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
+<TextView
+ android:id="@+id/delay_label"
+ android:layout_marginTop="20dip"
+ android:layout_alignParentLeft="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Delay:"/>
+<EditText
+ android:id="@+id/debounce_delay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignBaseline="@id/delay_label"
+ android:layout_toRightOf="@id/delay_label"
+ android:numeric="integer"
+ android:maxLength="2"
+ android:background="@android:drawable/editbox_background"/>
<Button
android:id="@+id/reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:layout_alignParentLeft="true"
+ android:layout_alignBaseline="@id/delay_label"
+ android:layout_toRightOf="@id/debounce_delay"
android:onClick="reloadModule"
android:text="Reload" />
-<Button
- android:id="@+id/load"
- android:layout_below="@id/reload"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:onClick="loadModule"
- android:text="Load" />
<Button
android:id="@+id/unload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toRightOf="@id/load"
- android:layout_alignTop="@id/load"
+ android:layout_alignBaseline="@id/delay_label"
+ android:layout_alignParentRight="true"
android:onClick="unloadModule"
android:text="Unload" />
+<Button
+ android:id="@+id/load"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignBaseline="@id/delay_label"
+ android:layout_toLeftOf="@id/unload"
+ android:onClick="loadModule"
+ android:text="Load" />
<CheckBox
android:id="@+id/on_boot"
android:layout_below="@id/load"
import android.content.Intent;
import android.content.DialogInterface;
import android.widget.TextView;
+import android.widget.EditText;
import android.widget.Button;
import android.widget.CheckBox;
import android.view.View;
}
private void updateUI() {
- TextView text = (TextView)findViewById(R.id.text);
-
disableUI();
boolean loaded = module.isLoaded();
boolean safe_to_load = module.is_safe_to_load();
+ TextView text = (TextView)findViewById(R.id.text);
text.setText("Current status:\n\nModule loaded: " + loaded + "\ndebounce_delay: " + module.getDelay() + "ms\nsafe_to_load: " + safe_to_load);
+ //EditText textDelay = (EditText)findViewById(R.id.debounce_delay);
+ //textDelay.setText(module.getSavedDelay());
+
Button reload = (Button)findViewById(R.id.reload);
if (loaded) {
reload.setEnabled(true);