-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8c43d3b
Showing
39 changed files
with
3,181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# RPAssistant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apply plugin: 'com.android.application' | ||
android { | ||
compileSdkVersion 26 | ||
buildToolsVersion "28.0.3" | ||
|
||
defaultConfig { | ||
applicationId "com.rAs.android.rpgamepad" | ||
minSdkVersion 19 | ||
targetSdkVersion 26 | ||
multiDexEnabled true | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly 'de.robv.android.xposed:api:82' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.rAs.android.rpgamepad" | ||
android:versionCode="6" | ||
android:versionName="0.9.190805" > | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:largeHeap="true" | ||
android:label="@string/app_name" > | ||
|
||
<meta-data android:name="xposedmodule" android:value="true"/> | ||
<meta-data android:name="xposedminversion" android:value="2.0*"/> | ||
<meta-data android:name="xposeddescription" android:value="It assist you can use game controllers in Remote Play."/> | ||
|
||
<activity | ||
android:name=".SettingActivity" | ||
android:launchMode="singleTask" | ||
android:configChanges="orientation|keyboard|keyboardHidden" | ||
android:label="@string/app_name" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".TestActivity" | ||
android:launchMode="singleTask" | ||
android:screenOrientation="fullSensor" | ||
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" | ||
android:configChanges="orientation|keyboard|keyboardHidden"> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.rAs.android.rpgamepad.XRPAssistant |
53 changes: 53 additions & 0 deletions
53
app/src/main/java/com/rAs/android/rpgamepad/InputDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.rAs.android.rpgamepad; | ||
|
||
import android.app.AlertDialog; | ||
import android.content.Context; | ||
import android.view.MotionEvent; | ||
|
||
public class InputDialog extends AlertDialog { | ||
|
||
interface OnMotionEventListener { | ||
boolean onGenericMotionEvent(MotionEvent event); | ||
} | ||
|
||
private OnMotionEventListener onMotionEventListener; | ||
private Context mContext; | ||
|
||
public InputDialog(Context context, int theme) { | ||
super(context, theme); | ||
mContext = context; | ||
} | ||
|
||
public InputDialog(Context context, boolean cancelable, OnCancelListener cancelListener) { | ||
super(context, cancelable, cancelListener); | ||
mContext = context; | ||
} | ||
|
||
public InputDialog(Context context) { | ||
super(context); | ||
mContext = context; | ||
} | ||
|
||
public void setOnInputListener(OnMotionEventListener onInputListener) { | ||
this.onMotionEventListener = onInputListener; | ||
} | ||
|
||
@Override | ||
public boolean dispatchGenericMotionEvent(MotionEvent event) { | ||
if(onMotionEventListener != null) | ||
return onMotionEventListener.onGenericMotionEvent(event); | ||
return super.dispatchGenericMotionEvent(event); | ||
} | ||
|
||
public void setPositiveButton(int textId, final OnClickListener listener) { | ||
setButton(BUTTON_POSITIVE, mContext.getText(textId), listener); | ||
} | ||
|
||
public void setNegativeButton(int textId, final OnClickListener listener) { | ||
setButton(BUTTON_NEGATIVE, mContext.getText(textId), listener); | ||
} | ||
|
||
public void setNeutralButton(int textId, final OnClickListener listener) { | ||
setButton(BUTTON_NEUTRAL, mContext.getText(textId), listener); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
app/src/main/java/com/rAs/android/rpgamepad/InputInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.rAs.android.rpgamepad; | ||
|
||
public class InputInfo { | ||
private int keyCode; | ||
private int output; | ||
private boolean isAxis; | ||
private boolean isWithCombine; | ||
private boolean isNegative; | ||
private String toProfile; | ||
|
||
public int getKeyCode() { | ||
return keyCode; | ||
} | ||
public void setKeyCode(int keyCode) { | ||
this.keyCode = keyCode; | ||
} | ||
public int getOutput() { | ||
return output; | ||
} | ||
public void setOutput(int output) { | ||
this.output = output; | ||
} | ||
public boolean isAxis() { | ||
return isAxis; | ||
} | ||
public void setAxis(boolean isAxis) { | ||
this.isAxis = isAxis; | ||
} | ||
public boolean isWithCombine() { | ||
return isWithCombine; | ||
} | ||
public void setWithCombine(boolean isWithCombine) { | ||
this.isWithCombine = isWithCombine; | ||
} | ||
public boolean isNegative() { | ||
return isNegative; | ||
} | ||
public void setNegative(boolean isNegative) { | ||
this.isNegative = isNegative; | ||
} | ||
public String getToProfile() { | ||
return toProfile; | ||
} | ||
public void setToProfile(String toProfile) { | ||
this.toProfile = toProfile; | ||
} | ||
} |
Oops, something went wrong.