日常备份,接入广点通开屏、Banner
数据改成掉落日志和战斗日志(战斗日志咕了)
This commit is contained in:
1
mylibrary/.gitignore
vendored
Normal file
1
mylibrary/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
37
mylibrary/build.gradle
Normal file
37
mylibrary/build.gradle
Normal file
@@ -0,0 +1,37 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
|
||||
//载入界面
|
||||
implementation 'com.kaopiz:kprogresshud:1.1.0'
|
||||
}
|
||||
21
mylibrary/proguard-rules.pro
vendored
Normal file
21
mylibrary/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yutou.jianrmg_v2.plugs.test.app1;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.yutou.jianrmg_v2.plugs.test.app1.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package Interfaces;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/27.
|
||||
*/
|
||||
|
||||
public interface BaseActivityInterface {
|
||||
void onCreate(Bundle savedInstanceState, LinearLayout layout, Context context, Intent intent);
|
||||
void onRestart();
|
||||
void onResume();
|
||||
void onPause();
|
||||
void onDestroy();
|
||||
void getIntent(Intent intent);
|
||||
boolean onKeyDown(int keyCode, KeyEvent event);
|
||||
boolean onKeyUp(int keyCode, KeyEvent event);
|
||||
boolean onTouchEvent(MotionEvent event);
|
||||
Data getData();
|
||||
class Data{
|
||||
private String type;
|
||||
private String url;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.yutou.jianrmg_v2.plugins;
|
||||
|
||||
public class Data {
|
||||
public static String name="test";
|
||||
public static String title="测试插件";
|
||||
public static String appId="abcdefg";
|
||||
public static String url="#";
|
||||
public static String image="#";
|
||||
public static String mainFunction="com.yutou.jianrmg_v2.plugs.test.app1.MainActivity#localActivity";
|
||||
public static Integer permission=0;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.yutou.jianrmg_v2.plugs.test.app1;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
|
||||
import Interfaces.BaseActivityInterface;
|
||||
|
||||
public class MainActivity implements BaseActivityInterface {
|
||||
public MainActivity() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState, LinearLayout layout, Context context, Intent intent) {
|
||||
Toast.makeText(context,"已装载插件",Toast.LENGTH_LONG).show();
|
||||
TextView textView=new TextView(context);
|
||||
textView.setText("测试");
|
||||
layout.addView(textView);
|
||||
final KProgressHUD hud=showLoading(context,null,null);
|
||||
hud.show();
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hud.dismiss();
|
||||
}
|
||||
},3000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestart() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getIntent(Intent intent) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Data getData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static KProgressHUD showLoading(Context context, String title, String text) {
|
||||
if (text == null) {
|
||||
text = "载入中";
|
||||
}
|
||||
if (title == null) {
|
||||
title = "请稍后";
|
||||
}
|
||||
KProgressHUD hud = KProgressHUD.create(context)
|
||||
.setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
|
||||
.setLabel(title)
|
||||
.setDetailsLabel(text)
|
||||
.setCancellable(false)
|
||||
.setAnimationSpeed(2)
|
||||
.setDimAmount(0.5f);
|
||||
return hud;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yutou.jianrmg_v2.plugs.test.app1;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
public interface SDKActivity {
|
||||
void onCreate(Activity activity, Bundle savedInstanceState);
|
||||
void onResume();
|
||||
void onPause();
|
||||
void onRestart();
|
||||
void finish();
|
||||
void onStop();
|
||||
Activity getActivity();
|
||||
View createView(Activity sdkActivity);
|
||||
}
|
||||
3
mylibrary/src/main/res/values/strings.xml
Normal file
3
mylibrary/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">My Library</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yutou.jianrmg_v2.plugs.test.app1;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user