Skip to content

Commit 8fa9b2b

Browse files
Merge pull request #3 from zhihaoyuu/issue_4965
update CategoryDetailsActivity
2 parents 777f4e4 + b66f10c commit 8fa9b2b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

app/src/main/java/fr/free/nrw/commons/category/CategoryDetailsActivity.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
import static fr.free.nrw.commons.category.CategoryClientKt.CATEGORY_PREFIX;
44

5+
import android.content.ContentValues;
56
import android.content.Context;
67
import android.content.Intent;
8+
import android.location.LocationManager;
79
import android.net.Uri;
810
import android.os.Bundle;
911
import android.view.Menu;
@@ -65,8 +67,23 @@ protected void onCreate(Bundle savedInstanceState) {
6567
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
6668
setTabs();
6769
setPageTitle();
70+
71+
if (null != savedInstanceState) {
72+
categoryName = savedInstanceState.getString("categoryName");
73+
}
74+
}
75+
76+
/**
77+
* Save categoryName
78+
* @param outState
79+
*/
80+
@Override
81+
protected void onSaveInstanceState(Bundle outState) {
82+
super.onSaveInstanceState(outState);
83+
outState.putString("categoryName", categoryName);
6884
}
6985

86+
7087
/**
7188
* This activity contains 3 tabs and a viewpager. This method is used to set the titles of tab,
7289
* Set the fragments according to the tab selected in the viewPager.

0 commit comments

Comments
 (0)