alerts tab scroll to last position before refresh
This commit is contained in:
parent
7bcec6e81b
commit
0e9ae233de
@ -66,6 +66,7 @@ public class AlarmActivity extends Activity {
|
|||||||
setContentView(R.layout.tabalarm);
|
setContentView(R.layout.tabalarm);
|
||||||
|
|
||||||
gridView = findViewById(R.id.gridViewAlarms);
|
gridView = findViewById(R.id.gridViewAlarms);
|
||||||
|
gridView.setNestedScrollingEnabled(true);
|
||||||
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
||||||
gridView.setAdapter(adapter);
|
gridView.setAdapter(adapter);
|
||||||
|
|
||||||
@ -171,7 +172,10 @@ public class AlarmActivity extends Activity {
|
|||||||
if (param.equals(ALARM)) {
|
if (param.equals(ALARM)) {
|
||||||
// set adapter
|
// set adapter
|
||||||
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
||||||
|
int position = gridView.getFirstVisiblePosition();
|
||||||
|
|
||||||
gridView.setAdapter(adapter);
|
gridView.setAdapter(adapter);
|
||||||
|
gridView.setSelection(position);
|
||||||
} else {
|
} else {
|
||||||
adapter.changeACK(ackPosition);
|
adapter.changeACK(ackPosition);
|
||||||
SM.Debug("Set ACK: " + ackPosition + " | " + (Boolean.TRUE.equals(acknowledged.get(ackPosition)) ? "true" : "false"));
|
SM.Debug("Set ACK: " + ackPosition + " | " + (Boolean.TRUE.equals(acknowledged.get(ackPosition)) ? "true" : "false"));
|
||||||
|
Loading…
Reference in New Issue
Block a user