From: kfl_614 Date: Tue, 1 Dec 2020 10:26:48 +0000 (+0800) Subject: reverse record list. X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=5d38b1d269c9dd50fe682c54174443df0e7d5256;p=ichardware.git reverse record list. --- diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..61a9130 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index d291b3d..9bba60d 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,15 +1,20 @@ + diff --git a/.idea/misc.xml b/.idea/misc.xml index 7bfef59..9f83622 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,9 +1,18 @@ - + + + + + \ No newline at end of file diff --git a/.idea/qaplug_profiles.xml b/.idea/qaplug_profiles.xml new file mode 100644 index 0000000..3dfd21f --- /dev/null +++ b/.idea/qaplug_profiles.xml @@ -0,0 +1,465 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/ic/hardware/fragment/pedometer/PedRecordFragment.java b/app/src/main/java/com/ic/hardware/fragment/pedometer/PedRecordFragment.java index 70d0b98..672ebbc 100644 --- a/app/src/main/java/com/ic/hardware/fragment/pedometer/PedRecordFragment.java +++ b/app/src/main/java/com/ic/hardware/fragment/pedometer/PedRecordFragment.java @@ -19,7 +19,7 @@ import java.util.List; public class PedRecordFragment extends Fragment { - public interface QueryPedometerRecordListener{ + public interface QueryPedometerRecordListener { void onQueryRecord(); } @@ -35,7 +35,7 @@ public class PedRecordFragment extends Fragment { @Override public void onAttach(Context context) { super.onAttach(context); - this.mContext=context; + this.mContext = context; try { queryListner = (QueryPedometerRecordListener) context; @@ -64,13 +64,16 @@ public class PedRecordFragment extends Fragment { return view; } - public void updatePedRecord(List records){ + public void updatePedRecord(List records) { setupAdapte.updatePedRecordList(records); + //移动到第一个位置上 + mSetupRv.scrollToPosition(records.size() - 1); } private void initRecyclerView() { setupAdapte = new PedRecordAdapter(mContext); - LinearLayoutManager mLayoutManager = new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false); + LinearLayoutManager mLayoutManager = + new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, true); mSetupRv.setLayoutManager(mLayoutManager); mSetupRv.setAdapter(setupAdapte); }