Skip to content

Commit

Permalink
Add air actions
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieNesmith committed Sep 4, 2024
1 parent 1ce2f3f commit 2900234
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@
android:value="org.secuso.privacyfriendly2048.activities.MainActivity" />
</activity>
<activity
android:exported="true"
android:name=".activities.GameActivity"
android:label="@string/title_activity_game"
android:parentActivityName=".activities.MainActivity">
<intent-filter>
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
</intent-filter>
<meta-data
android:name="com.samsung.android.support.REMOTE_ACTION"
android:resource="@xml/air_actions" />
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.secuso.privacyfriendly2048.activities.MainActivity" />
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,11 @@
<string name="Stat_Time_Swipes">Zeit pro Wischer</string>
<string name="reset_stats">Statistik zurücksetzem</string>

<!-- ###AIR ACTIONS### -->
<string name="swipe_up">Streiche Oben</string>
<string name="swipe_down">Streiche Unten</string>
<string name="swipe_left">Streiche Links</string>
<string name="swipe_right">Streiche Rechts</string>
<string name="undo">Rückgängig</string>

</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,11 @@
<string name="Stat_Time_Swipes">Time per Swipe</string>
<string name="reset_stats">Reset Statistics</string>

<!-- ###AIR ACTIONS### -->
<string name="swipe_up">Swipe Up</string>
<string name="swipe_down">Swipe Down</string>
<string name="swipe_left">Swipe Left</string>
<string name="swipe_right">Swipe Right</string>
<string name="undo">Undo</string>

</resources>
44 changes: 44 additions & 0 deletions app/src/main/res/xml/air_actions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<remote-actions version="1.2">
<action
id="swipe_up"
label="@string/swipe_up"
priority="1"
trigger_key="DPAD_UP">
<preference name="gesture" value="swipe_up"/>
<preference name="motion_only" value="true"/>
</action>
<action
id="swipe_right"
label="@string/swipe_right"
priority="2"
trigger_key="DPAD_RIGHT">
<preference name="gesture" value="swipe_right"/>
<preference name="motion_only" value="true"/>
</action>
<action
id="swipe_left"
label="@string/swipe_left"
priority="3"
trigger_key="DPAD_LEFT">
<preference name="gesture" value="swipe_left"/>
<preference name="motion_only" value="true"/>
</action>
<action
id="swipe_down"
label="@string/swipe_down"
priority="4"
trigger_key="DPAD_DOWN">
<preference name="gesture" value="swipe_down"/>
<preference name="motion_only" value="true"/>
</action>
<action
id="undo"
label="@string/undo"
priority="5"
trigger_key="CTRL+Z">
<preference name="gesture" value="circle_cw|circle_ccw"/>
<preference name="motion_only" value="true"/>
</action>
</remote-actions>

0 comments on commit 2900234

Please sign in to comment.