Skip to content

Commit

Permalink
1. 去除head time
Browse files Browse the repository at this point in the history
  • Loading branch information
beiger committed Oct 24, 2018
1 parent 6cfae37 commit b2d3116
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ public void onRefresh(@NonNull RefreshLayout refreshLayout) {
protected abstract void refresh(@NonNull RefreshLayout refreshLayout);

protected void initRefreshHeader() {
int delta = new Random().nextInt(7 * 24 * 60 * 60 * 1000);
ClassicsHeader classicsHeader = (ClassicsHeader) mRefreshLayout.getRefreshHeader();
classicsHeader.setLastUpdateTime(new Date(System.currentTimeMillis() - delta));
classicsHeader.setTimeFormat(new DynamicTimeFormat(getString(R.string.refresh_at) + " %s"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
import com.scwang.smartrefresh.layout.header.ClassicsHeader;
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Random;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -105,9 +101,7 @@ public void onRefresh(@NonNull RefreshLayout refreshLayout) {
protected abstract void refresh(@NonNull RefreshLayout refreshLayout);

protected void initRefreshHeader() {
int delta = new Random().nextInt(7 * 24 * 60 * 60 * 1000);
ClassicsHeader classicsHeader = (ClassicsHeader) mRefreshLayout.getRefreshHeader();
classicsHeader.setLastUpdateTime(new Date(System.currentTimeMillis() - delta));
classicsHeader.setTimeFormat(new DynamicTimeFormat(getString(R.string.refresh_at) + " %s"));
}

Expand Down

0 comments on commit b2d3116

Please sign in to comment.