关于 & 设置 界面微调

pull/67/head
pppscn 3 years ago
parent 4f598284bb
commit 4e803f8836

@ -114,7 +114,7 @@ void cmdExecute(String cmd) {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.13.2'
@ -128,11 +128,10 @@ dependencies {
//fastjson
implementation "com.alibaba:fastjson:1.2.78"
// SDK
//SDK
implementation 'com.umeng.umsdk:common:9.3.8'
implementation 'com.umeng.umsdk:asms:1.2.2'
implementation 'com.umeng.umsdk:abtest:1.0.0'
//SDK
implementation 'com.umeng.umsdk:common:9.4.4'//
implementation 'com.umeng.umsdk:asms:1.4.1'//
implementation 'com.umeng.umsdk:apm:1.4.2' // SDKcrash
//XUpdate
implementation 'com.github.xuexiangjys:XUpdate:2.1.0'

@ -20,3 +20,11 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-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>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".AboutActivity"
android:label="关于">
<intent-filter>
<!--协议部分,随便设置-->
<data
android:scheme="forwarder"
@ -67,9 +73,6 @@
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity
android:name=".AboutActivity"
android:label="关于" />
<activity
android:name=".SettingActivity"
android:label="设置" />

@ -97,9 +97,15 @@ public class AboutActivity extends AppCompatActivity {
Toast.makeText(AboutActivity.this, "缓存清理完成", Toast.LENGTH_LONG).show();
});
Button join_qq_group = findViewById(R.id.join_qq_group);
join_qq_group.setOnClickListener(v -> {
String key = "HvroJRfvK7GGfnQgaIQ4Rh1un9O83N7M";
Button join_qq_group1 = findViewById(R.id.join_qq_group1);
join_qq_group1.setOnClickListener(v -> {
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);
});

@ -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.setPositiveButton("重发", (dialog, which) -> {
/*builder.setPositiveButton("重发", (dialog, which) -> {
Long id = logVo.getId();
Log.d(TAG, "id = " + id);
Log.d(TAG, logVo.toString());
Toast.makeText(MainActivity.this, "你确定要重发吗?", Toast.LENGTH_SHORT).show();
dialog.dismiss();
});
});*/
//删除
builder.setNegativeButton("删除", (dialog, which) -> {
Long id = logVo.getId();

@ -150,7 +150,12 @@ public class SettingActivity extends AppCompatActivity {
@Override
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
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_height="wrap_content"
android:layout_weight="1"
android:text="更新日志" />
android:text="开源地址" />
<TextView
android:id="@+id/linkweb"
@ -123,7 +123,34 @@
android:layout_weight="3"
android:autoLink="web"
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" />
</LinearLayout>
@ -146,22 +173,34 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用户交流群" />
android:text="互帮互助QQ群" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:text="562854376" />
android:gravity="start"
android:text="①群562854376" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start"
android:text="②群31330492" />
</LinearLayout>
<Button
android:id="@+id/join_qq_group"
android:id="@+id/join_qq_group1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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

@ -5,6 +5,7 @@ buildscript {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://repo1.maven.org/maven2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
@ -16,6 +17,7 @@ allprojects {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://repo1.maven.org/maven2/' }
}
}

Loading…
Cancel
Save