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);
|
||||
|
||||
gridView = findViewById(R.id.gridViewAlarms);
|
||||
gridView.setNestedScrollingEnabled(true);
|
||||
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
||||
gridView.setAdapter(adapter);
|
||||
|
||||
@ -171,7 +172,10 @@ public class AlarmActivity extends Activity {
|
||||
if (param.equals(ALARM)) {
|
||||
// set adapter
|
||||
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
||||
int position = gridView.getFirstVisiblePosition();
|
||||
|
||||
gridView.setAdapter(adapter);
|
||||
gridView.setSelection(position);
|
||||
} else {
|
||||
adapter.changeACK(ackPosition);
|
||||
SM.Debug("Set ACK: " + ackPosition + " | " + (Boolean.TRUE.equals(acknowledged.get(ackPosition)) ? "true" : "false"));
|
||||
|
Loading…
Reference in New Issue
Block a user