Skip to content

Commit 532a3e6

Browse files
committed
see 05/30 log
1 parent 3ff340e commit 532a3e6

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

gradle/config/config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class CustomListener implements BuildListener {
122122
}
123123
})
124124

125-
def sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss")
125+
def sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH-mm-ss")
126126
file = new File(rootProject.buildDir.getAbsolutePath(),
127127
"buildTime_" + sdf.format(new Date(System.currentTimeMillis())) + ".txt")
128128
}

utilcode/lib/src/main/java/com/blankj/utilcode/util/ToastUtils.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,15 @@ public static void showLong(final String format, final Object... args) {
185185
* @param layoutId ID for an XML layout resource to load.
186186
*/
187187
public static View showCustomShort(@LayoutRes final int layoutId) {
188-
final View view = getView(layoutId);
188+
return showCustomShort(getView(layoutId));
189+
}
190+
191+
/**
192+
* Show custom toast for a short period of time.
193+
*
194+
* @param view The view of toast.
195+
*/
196+
public static View showCustomShort(final View view) {
189197
show(view, Toast.LENGTH_SHORT);
190198
return view;
191199
}
@@ -196,7 +204,15 @@ public static View showCustomShort(@LayoutRes final int layoutId) {
196204
* @param layoutId ID for an XML layout resource to load.
197205
*/
198206
public static View showCustomLong(@LayoutRes final int layoutId) {
199-
final View view = getView(layoutId);
207+
return showCustomLong(getView(layoutId));
208+
}
209+
210+
/**
211+
* Show custom toast for a long period of time.
212+
*
213+
* @param view The view of toast.
214+
*/
215+
public static View showCustomLong(final View view) {
200216
show(view, Toast.LENGTH_LONG);
201217
return view;
202218
}

0 commit comments

Comments
 (0)