Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
238f2540
Commit
238f2540
authored
Feb 15, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
24b73646
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/main/java/tech/starwin/utils/format_utils/StringFormat.java
+2
-1
src/main/java/tech/starwin/utils/ui_utils/QMUIHelper.java
+2
-3
No files found.
src/main/java/tech/starwin/utils/format_utils/StringFormat.java
View file @
238f2540
...
@@ -166,7 +166,8 @@ public class StringFormat {
...
@@ -166,7 +166,8 @@ public class StringFormat {
* 格式化时间
* 格式化时间
*/
*/
public
static
String
convertTime
(
String
srcTime
,
String
formatStyle
)
{
public
static
String
convertTime
(
String
srcTime
,
String
formatStyle
)
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
format
=
srcTime
.
contains
(
"T"
)
?
"yyyy-MM-dd'T'HH:mm:ss'Z'"
:
"yyyy-MM-dd HH:mm:ss"
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
format
);
simpleDateFormat
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"GMT00:00"
));
simpleDateFormat
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"GMT00:00"
));
SimpleDateFormat
simpleDateFormatLocal
=
new
SimpleDateFormat
(
formatStyle
);
SimpleDateFormat
simpleDateFormatLocal
=
new
SimpleDateFormat
(
formatStyle
);
simpleDateFormatLocal
.
setTimeZone
(
TimeZone
.
getDefault
());
simpleDateFormatLocal
.
setTimeZone
(
TimeZone
.
getDefault
());
...
...
src/main/java/tech/starwin/utils/ui_utils/QMUIHelper.java
View file @
238f2540
...
@@ -40,8 +40,7 @@ public class QMUIHelper {
...
@@ -40,8 +40,7 @@ public class QMUIHelper {
* 重新设置topbarimagebutton的图片尺寸
* 重新设置topbarimagebutton的图片尺寸
* 当没有合适尺寸的图片使用时,将图片强制缩放到适合的尺寸
* 当没有合适尺寸的图片使用时,将图片强制缩放到适合的尺寸
*/
*/
public
static
ImageButton
resizeTopbarBtn
(
ImageButton
imageButton
)
{
public
static
ImageButton
resizeTopbarBtn
(
ImageButton
imageButton
,
int
width
,
int
height
)
{
int
width
=
StringFormat
.
dpToPx
(
imageButton
.
getContext
(),
17
f
);
Bitmap
bmp
=
BitmapUtils
.
drawableToBmp
(
imageButton
.
getDrawable
());
Bitmap
bmp
=
BitmapUtils
.
drawableToBmp
(
imageButton
.
getDrawable
());
imageButton
.
setImageBitmap
(
BitmapUtils
.
scaleBitmap
(
bmp
,
width
,
width
));
imageButton
.
setImageBitmap
(
BitmapUtils
.
scaleBitmap
(
bmp
,
width
,
width
));
imageButton
.
setScaleType
(
ImageView
.
ScaleType
.
CENTER_INSIDE
);
imageButton
.
setScaleType
(
ImageView
.
ScaleType
.
CENTER_INSIDE
);
...
@@ -183,7 +182,7 @@ public class QMUIHelper {
...
@@ -183,7 +182,7 @@ public class QMUIHelper {
@Override
@Override
public
void
initTopBar
(
TopBar
topBar
,
Activity
activity
)
{
public
void
initTopBar
(
TopBar
topBar
,
Activity
activity
)
{
topBar
.
toolBar
().
addLeftBackImageButton
().
setOnClickListener
(
v
->
UIHelper
.
doBack
());
}
}
};
};
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment