From a22ecefce63a1541b8febc4585fdf5dc6465d0ac Mon Sep 17 00:00:00 2001 From: SammysHP Date: Sun, 4 Dec 2011 21:43:20 +0100 Subject: Fix #862: No text in Viewager after opening cache from LiveMap or Nearby list --- main/src/cgeo/geocaching/CacheDetailActivity.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'main/src/cgeo') diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 4da2b71..d905c1c 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -124,6 +124,11 @@ public class CacheDetailActivity extends AbstractActivity { private ViewPagerAdapter viewPagerAdapter; /** + * The {@link TitlePageIndicator} for this activity. + */ + private TitlePageIndicator titleIndicator; + + /** * If another activity is called and can modify the data of this activity, we refresh it on resume. */ private boolean refreshOnResume = false; @@ -241,7 +246,7 @@ public class CacheDetailActivity extends AbstractActivity { viewPagerAdapter = new ViewPagerAdapter(); pager.setAdapter(viewPagerAdapter); - TitlePageIndicator titleIndicator = (TitlePageIndicator) findViewById(R.id.pager_indicator); + titleIndicator = (TitlePageIndicator) findViewById(R.id.pager_indicator); titleIndicator.setViewPager(pager); // Initialization done. Let's load the data with the given information. @@ -588,6 +593,9 @@ public class CacheDetailActivity extends AbstractActivity { // notify the adapter that the data has changed viewPagerAdapter.notifyDataSetChanged(); + // notify the indicator that the data has changed + titleIndicator.notifyDataSetChanged(); + // rendering done! remove progress-popup if any there progress.dismiss(); } -- cgit v1.1