add switch profile for Tasker

This commit is contained in:
CzBiX
2015-12-01 17:32:49 +08:00
parent a56fb2b522
commit 253cfec33d
7 changed files with 221 additions and 29 deletions
+4 -8
View File
@@ -5,12 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar_light_dark" />
<Switch android:checked="true"
android:id="@+id/service_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/toggle_service_state"
android:textSize="18sp"
android:textColor="?android:attr/textColorSecondary"
android:padding="16dp"/>
<FrameLayout
android:id="@+id/fragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Switch android:id="@+id/service_switch"
android:checked="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/toggle_service_state"
android:textSize="18sp"
android:textColor="?android:attr/textColorSecondary"
android:padding="16dp"/>
</FrameLayout>
+10
View File
@@ -226,4 +226,14 @@
<item>204.0.0.0/6</item>
<item>208.0.0.0/4</item>
</string-array>
<string-array name="tasker_action_name">
<item>Toggle service</item>
<item>Switch profile</item>
</string-array>
<string-array name="tasker_action_value">
<item>toggle_service</item>
<item>switch_profile</item>
</string-array>
</resources>
+3
View File
@@ -106,6 +106,9 @@
<string name="toggle_service_state">Toggle service state</string>
<string name="save">Save</string>
<string name="turn_service_state">Turn service %s</string>
<string name="no_action_selected">No action was selected</string>
<string name="no_profile_selected">No profile was selected</string>
<string name="switch_profile_to">Switch profile to %s</string>
<string name="state_on">on</string>
<string name="state_off">off</string>
</resources>