Commit 238f2540 by sikang

bug fix

parent 24b73646
......@@ -166,7 +166,8 @@ public class StringFormat {
* 格式化时间
*/
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 simpleDateFormatLocal = new SimpleDateFormat(formatStyle);
simpleDateFormatLocal.setTimeZone(TimeZone.getDefault());
......
......@@ -40,8 +40,7 @@ public class QMUIHelper {
* 重新设置topbarimagebutton的图片尺寸
* 当没有合适尺寸的图片使用时,将图片强制缩放到适合的尺寸
*/
public static ImageButton resizeTopbarBtn(ImageButton imageButton) {
int width = StringFormat.dpToPx(imageButton.getContext(), 17f);
public static ImageButton resizeTopbarBtn(ImageButton imageButton,int width,int height) {
Bitmap bmp = BitmapUtils.drawableToBmp(imageButton.getDrawable());
imageButton.setImageBitmap(BitmapUtils.scaleBitmap(bmp, width, width));
imageButton.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
......@@ -183,7 +182,7 @@ public class QMUIHelper {
@Override
public void initTopBar(TopBar topBar, Activity activity) {
topBar.toolBar().addLeftBackImageButton().setOnClickListener(v -> UIHelper.doBack());
}
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment