mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 01:17:41 +08:00
关于 & 设置 界面微调
This commit is contained in:
parent
4f598284bb
commit
4e803f8836
@ -114,7 +114,7 @@ void cmdExecute(String cmd) {
|
|||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
@ -128,11 +128,10 @@ dependencies {
|
|||||||
//fastjson
|
//fastjson
|
||||||
implementation "com.alibaba:fastjson:1.2.78"
|
implementation "com.alibaba:fastjson:1.2.78"
|
||||||
|
|
||||||
// 友盟统计SDK
|
//友盟统计SDK
|
||||||
//友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
|
implementation 'com.umeng.umsdk:common:9.4.4'// 必选
|
||||||
implementation 'com.umeng.umsdk:common:9.3.8'
|
implementation 'com.umeng.umsdk:asms:1.4.1'// 必选
|
||||||
implementation 'com.umeng.umsdk:asms:1.2.2'
|
implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
|
||||||
implementation 'com.umeng.umsdk:abtest:1.0.0'
|
|
||||||
|
|
||||||
//XUpdate
|
//XUpdate
|
||||||
implementation 'com.github.xuexiangjys:XUpdate:2.1.0'
|
implementation 'com.github.xuexiangjys:XUpdate:2.1.0'
|
||||||
|
8
app/proguard-rules.pro
vendored
8
app/proguard-rules.pro
vendored
@ -20,3 +20,11 @@
|
|||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
-keep class com.idormy.sms.forwarder.model.**{*;}
|
-keep class com.idormy.sms.forwarder.model.**{*;}
|
||||||
|
-keep class com.umeng.** {*;}
|
||||||
|
-keepclassmembers class * {
|
||||||
|
public <init> (org.json.JSONObject);
|
||||||
|
}
|
||||||
|
-keepclassmembers enum * {
|
||||||
|
public static **[] values();
|
||||||
|
public static ** valueOf(java.lang.String);
|
||||||
|
}
|
||||||
|
@ -57,6 +57,12 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".AboutActivity"
|
||||||
|
android:label="关于">
|
||||||
|
<intent-filter>
|
||||||
<!--协议部分,随便设置-->
|
<!--协议部分,随便设置-->
|
||||||
<data
|
<data
|
||||||
android:scheme="forwarder"
|
android:scheme="forwarder"
|
||||||
@ -67,9 +73,6 @@
|
|||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:name=".AboutActivity"
|
|
||||||
android:label="关于" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".SettingActivity"
|
android:name=".SettingActivity"
|
||||||
android:label="设置" />
|
android:label="设置" />
|
||||||
|
@ -97,9 +97,15 @@ public class AboutActivity extends AppCompatActivity {
|
|||||||
Toast.makeText(AboutActivity.this, "缓存清理完成", Toast.LENGTH_LONG).show();
|
Toast.makeText(AboutActivity.this, "缓存清理完成", Toast.LENGTH_LONG).show();
|
||||||
});
|
});
|
||||||
|
|
||||||
Button join_qq_group = findViewById(R.id.join_qq_group);
|
Button join_qq_group1 = findViewById(R.id.join_qq_group1);
|
||||||
join_qq_group.setOnClickListener(v -> {
|
join_qq_group1.setOnClickListener(v -> {
|
||||||
String key = "HvroJRfvK7GGfnQgaIQ4Rh1un9O83N7M";
|
String key = "Mj5m39bqy6eodOImrFLI19Tdeqvv-9zf";
|
||||||
|
joinQQGroup(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
Button join_qq_group2 = findViewById(R.id.join_qq_group2);
|
||||||
|
join_qq_group2.setOnClickListener(v -> {
|
||||||
|
String key = "jPXy4YaUzA7Uo0yPPbZXdkb66NS1smU_";
|
||||||
joinQQGroup(key);
|
joinQQGroup(key);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -159,13 +159,13 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
|
|||||||
builder.setMessage(logVo.getFrom() + "\n\n" + logVo.getContent() + "\n\n" + logVo.getRule() + "\n\n" + aUtil.utc2Local(logVo.getTime()) + "\n\nResponse:" + logVo.getForwardResponse());
|
builder.setMessage(logVo.getFrom() + "\n\n" + logVo.getContent() + "\n\n" + logVo.getRule() + "\n\n" + aUtil.utc2Local(logVo.getTime()) + "\n\nResponse:" + logVo.getForwardResponse());
|
||||||
}
|
}
|
||||||
//重发
|
//重发
|
||||||
builder.setPositiveButton("重发", (dialog, which) -> {
|
/*builder.setPositiveButton("重发", (dialog, which) -> {
|
||||||
Long id = logVo.getId();
|
Long id = logVo.getId();
|
||||||
Log.d(TAG, "id = " + id);
|
Log.d(TAG, "id = " + id);
|
||||||
Log.d(TAG, logVo.toString());
|
Log.d(TAG, logVo.toString());
|
||||||
Toast.makeText(MainActivity.this, "你确定要重发吗?", Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, "你确定要重发吗?", Toast.LENGTH_SHORT).show();
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
});
|
});*/
|
||||||
//删除
|
//删除
|
||||||
builder.setNegativeButton("删除", (dialog, which) -> {
|
builder.setNegativeButton("删除", (dialog, which) -> {
|
||||||
Long id = logVo.getId();
|
Long id = logVo.getId();
|
||||||
|
@ -150,7 +150,12 @@ public class SettingActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
SettingUtil.setBatteryLevelAlarm(Integer.parseInt(et_battery_level_alarm.getText().toString()));
|
String batteryLevel = et_battery_level_alarm.getText().toString();
|
||||||
|
if (!batteryLevel.isEmpty()) {
|
||||||
|
SettingUtil.setBatteryLevelAlarm(Integer.parseInt(batteryLevel));
|
||||||
|
} else {
|
||||||
|
SettingUtil.setBatteryLevelAlarm(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -171,7 +176,12 @@ public class SettingActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
SettingUtil.setRetryDelayTime(index, Integer.parseInt(et_retry_delay_time.getText().toString()));
|
String delayTime = et_retry_delay_time.getText().toString();
|
||||||
|
if (!delayTime.isEmpty()) {
|
||||||
|
SettingUtil.setRetryDelayTime(index, Integer.parseInt(delayTime));
|
||||||
|
} else {
|
||||||
|
SettingUtil.setRetryDelayTime(index, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="更新日志" />
|
android:text="开源地址" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/linkweb"
|
android:id="@+id/linkweb"
|
||||||
@ -123,7 +123,34 @@
|
|||||||
android:layout_weight="3"
|
android:layout_weight="3"
|
||||||
android:autoLink="web"
|
android:autoLink="web"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:text="https://github.com/pppscn/SmsForwarder/releases"
|
android:text="https://github.com/pppscn/SmsForwarder"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/about_web2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="同步镜像" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/linkweb2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="3"
|
||||||
|
android:autoLink="web"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="https://gitee.com/pp/SmsForwarder"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -146,22 +173,34 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="用户交流群" />
|
android:text="互帮互助QQ群" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="end"
|
android:gravity="start"
|
||||||
android:text="562854376" />
|
android:text="①群:562854376" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start"
|
||||||
|
android:text="②群:31330492" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/join_qq_group"
|
android:id="@+id/join_qq_group1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="加入QQ群" />
|
android:text="加入①群" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/join_qq_group2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="加入②群" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -5,6 +5,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.0.2'
|
classpath 'com.android.tools.build:gradle:7.0.2'
|
||||||
@ -16,6 +17,7 @@ allprojects {
|
|||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user