Fist draft for tasker settings.

This commit is contained in:
Chris 2019-01-07 16:20:01 +01:00
parent be6a3e3275
commit 26af4c47e3
5 changed files with 81 additions and 4 deletions

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tasker_add_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:onClick="resetearBD"
android:text="@string/tasker_add">
</Button>
</RelativeLayout >

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tasker_remove_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:onClick="resetearBD"
android:text="@string/tasker_remove">
</Button>
</RelativeLayout >

View File

@ -674,7 +674,18 @@
<!-- Tasker -->
<string name="tasker">Tasker</string>
<string name="tasker_active">Active</string>
<string name="tasker_active_sum">Enables Tasker but disables media controls</string>
<string name="tasker_active_sum">Enables Tasker support</string>
<string name="tasker_add">Add</string>
<string name="tasker_remove">Remove</string>
<string name="tasker_event_button">Button Events</string>
<string name="tasker_event_connection">Connection Events</string>
<string name="tasker_event_data">Data Events</string>
<string name="tasker_threshold">Threshold milliseconds</string>
<string name="tasker_threshold_sum">Delay between task calls</string>
<string name="tasker_task">Task</string>
<string name="tasker_task_sum">Adds another threshold task</string>
<string name="tasker_task_name">Task name</string>
<string name="tasker_info">Add tasks to events by name and event count in threshold i.e. for threshold 1000: Double button event within one second triggers task number two.</string>
<string name="tasker_task_single">Task for single press</string>
<string name="tasker_task_double">Task for double press</string>
<string name="tasker_task_triple">Task for triple press</string>

View File

@ -714,15 +714,15 @@
<EditTextPreference
android:key="tasker_task_single"
android:maxLength="255"
android:title="@string/tasker_task_single"/>
android:title="@string/tasker_task_single" />
<EditTextPreference
android:key="tasker_task_double"
android:maxLength="255"
android:title="@string/tasker_task_double"/>
android:title="@string/tasker_task_double" />
<EditTextPreference
android:key="tasker_task_triple"
android:maxLength="255"
android:title="@string/tasker_task_triple"/>
android:title="@string/tasker_task_triple" />
</PreferenceCategory>
</PreferenceScreen>
</PreferenceCategory>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:summary="@string/tasker_info"
android:title="@string/tasker">
<SwitchPreference
android:defaultValue="false"
android:key="tasker_active"
android:summary="@string/tasker_active_sum"
android:title="@string/tasker_active" />
<Preference
android:persistent="false"
android:selectable="false"
android:summary="@string/tasker_info" />
</PreferenceCategory>
<PreferenceScreen android:title="@string/tasker_event_button">
<EditTextPreference
android:inputType="number"
android:summary="@string/tasker_threshold_sum"
android:title="@string/tasker_threshold" />
</PreferenceScreen>
<EditTextPreference
android:inputType="number"
android:summary="@string/tasker_threshold_sum"
android:title="@string/tasker_threshold" />
<Preference
android:key="tasker_task_add"
android:summary="@string/tasker_task_sum"
android:title="@string/tasker_task"
android:widgetLayout="@layout/tasker_add_button"></Preference>
<EditTextPreference
android:key="tasker_task"
android:summary="@string/tasker_task_name"
android:widgetLayout="@layout/tasker_remove_button" />
</PreferenceScreen>