View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000198 | MantisDroid | Defect | public | 2012-05-15 12:58 | 2012-05-22 06:38 |
Reporter | e7andy | Assigned To | e7andy | ||
Priority | urgent | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 1.0 | Fixed in Version | 1.0 | ||
Summary | 0000198: Handle orientation changes the correct way in issue and project lists | ||||
Description | Retain issue lists between orientation changes. Handle orientation changes the correct way: http://developer.android.com/guide/topics/resources/runtime-changes.html @Override public Object onRetainNonConfigurationInstance() { final MyDataObject data = collectMyLoadedData(); return data; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final MyDataObject data = (MyDataObject) getLastNonConfigurationInstance(); if (data == null) { data = loadMyData(); } ... } | ||||
Tags | No tags attached. | ||||
|
IssueListActivity.java: Construct List<Project> projects = new ArrayList<Project>() in GetProjectsTask. No need to clear the list on each execution. Change order to: issuesCollectionPagerAdapter = new IssuesCollectionPagerAdapter(this, getSupportFragmentManager()); viewPager.setAdapter(issuesCollectionPagerAdapter); populateProjectSpinner(); Save position: if (savedInstanceState != null) { bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt("tab", getActionBar().getSelectedNavigationIndex()); } ------------------------------------------------ IssuesCollectionPagerAdapter.java: http://stackoverflow.com/questions/7263291/viewpager-pageradapter-not-updating-the-view Test: public int getItemPosition(Object object) { return POSITION_NONE; } |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-15 12:58 | e7andy | New Issue | |
2012-05-15 12:58 | e7andy | Assigned To | => e7andy |
2012-05-15 12:58 | e7andy | Status | new => assigned |
2012-05-16 13:03 | e7andy | Note Added: 0000008 | |
2012-05-16 13:05 | e7andy | Note Edited: 0000008 | |
2012-05-16 13:11 | e7andy | Note Edited: 0000008 | |
2012-05-16 13:13 | e7andy | Note Edited: 0000008 | |
2012-05-16 13:14 | e7andy | Note Edited: 0000008 | |
2012-05-21 09:28 | e7andy | Description Updated | |
2012-05-22 06:38 | e7andy | Status | assigned => closed |
2012-05-22 06:38 | e7andy | Resolution | open => fixed |
2012-05-22 06:38 | e7andy | Fixed in Version | => 1.0 |