Compare commits
6 Commits
timestamp-
...
timestamp-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13e0ad3f03 | ||
|
|
be85ef923e | ||
|
|
9a3383a43b | ||
|
|
d875b6965d | ||
|
|
bc873852c2 | ||
|
|
b032de55dc |
6
timestamp/README.md
Normal file
6
timestamp/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## TimpStamp
|
||||
## 时间戳工具集
|
||||
|
||||
## 使用要点:
|
||||
1。常驻通知栏按钮的正常使用,
|
||||
需要设置允许应用[写入剪贴板]的[始终允许]权限。
|
||||
@@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Tue May 06 18:01:46 HKT 2025
|
||||
stageCount=4
|
||||
#Tue May 06 20:37:48 HKT 2025
|
||||
stageCount=7
|
||||
libraryProject=
|
||||
baseVersion=15.0
|
||||
publishVersion=15.0.3
|
||||
publishVersion=15.0.6
|
||||
buildCount=0
|
||||
baseBetaVersion=15.0.4
|
||||
baseBetaVersion=15.0.7
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:roundIcon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/MyAppTheme"
|
||||
android:resizeableActivity="true"
|
||||
|
||||
@@ -219,7 +219,7 @@ public class MainService extends Service {
|
||||
String szTimeStampFormatString = AppConfigsUtil.getInstance(MainService.this).getAppConfigsModel().getTimeStampFormatString();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(szTimeStampFormatString);
|
||||
String formattedDateTime = ldt.format(formatter);
|
||||
TimeStampRemoteViewsUtil.getInstance(MainService.this).showNotification(formattedDateTime + " 已复制");
|
||||
TimeStampRemoteViewsUtil.getInstance(MainService.this).showNotification("时间戳:\n" + formattedDateTime + "\n已拷贝到剪贴板。");
|
||||
|
||||
LogUtils.d(TAG, "Hello, World! " + formattedDateTime);
|
||||
break;
|
||||
|
||||
@@ -63,6 +63,7 @@ public class AppConfigsModel extends BaseBean {
|
||||
super.writeThisToJsonWriter(jsonWriter);
|
||||
jsonWriter.name("isEnableService").value(isEnableService());
|
||||
jsonWriter.name("timeStampFormatString").value(getTimeStampFormatString());
|
||||
jsonWriter.name("timeStampCopyFormatString").value(getTimeStampCopyFormatString());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,6 +73,8 @@ public class AppConfigsModel extends BaseBean {
|
||||
setIsEnableService(jsonReader.nextBoolean());
|
||||
} else if (name.equals("timeStampFormatString")) {
|
||||
setTimeStampFormatString(jsonReader.nextString());
|
||||
} else if (name.equals("timeStampCopyFormatString")) {
|
||||
setTimeStampCopyFormatString(jsonReader.nextString());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ButtonClickReceiver extends BroadcastReceiver {
|
||||
ClipboardUtil.copyTextToClipboard(context, formattedDateTime);
|
||||
|
||||
// 比如显示一个Toast
|
||||
Toast.makeText(context, formattedDateTime + " 已复制", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(context, "时间戳:\n" + formattedDateTime + "\n已拷贝到剪贴板。", Toast.LENGTH_SHORT).show();
|
||||
MainService.updateCopiedTimeStamp();
|
||||
}
|
||||
}
|
||||
|
||||
BIN
timestamp/src/main/res/drawable/ic_launcher.png
Normal file
BIN
timestamp/src/main/res/drawable/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -17,10 +17,10 @@
|
||||
android:layout_weight="1.0"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="复制时间戳"
|
||||
android:id="@+id/btn_copytimestamp"/>
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:id="@+id/btn_copytimestamp"
|
||||
android:background="@drawable/ic_launcher"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user