diff --git a/src/main/java/com/apb/beacon/adapter/PageLanguageSettingsAdapter.java b/src/main/java/com/apb/beacon/adapter/PageLanguageSettingsAdapter.java index 353504d3..3f3dfa9c 100644 --- a/src/main/java/com/apb/beacon/adapter/PageLanguageSettingsAdapter.java +++ b/src/main/java/com/apb/beacon/adapter/PageLanguageSettingsAdapter.java @@ -45,14 +45,16 @@ public class PageLanguageSettingsAdapter extends ArrayAdapter { private String selectedLang; private int lastUpdatedVersion; private int latestVersion; + private int parentActivity; - public PageLanguageSettingsAdapter(Context context) { + public PageLanguageSettingsAdapter(Context context, int parentActivity) { super(context, R.layout.row_page_language_settings); this.mContext = context; mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); this.currentLang = ApplicationSettings.getSelectedLanguage(mContext); latestVersion = -1; lastUpdatedVersion = ApplicationSettings.getLastUpdatedVersion(mContext); + this.parentActivity = parentActivity; } @@ -117,6 +119,9 @@ public void restartApp(){ i.putExtra("page_id", pageId); mContext.startActivity(i); + if(parentActivity == AppConstants.FROM_WIZARD_ACTIVITY){ + ((WizardActivity) mContext).callFinishActivityReceiver(); + } ((Activity) mContext).finish(); } diff --git a/src/main/java/com/apb/beacon/fragment/LanguageSettingsFragment.java b/src/main/java/com/apb/beacon/fragment/LanguageSettingsFragment.java index ba207ccf..a5c3f308 100644 --- a/src/main/java/com/apb/beacon/fragment/LanguageSettingsFragment.java +++ b/src/main/java/com/apb/beacon/fragment/LanguageSettingsFragment.java @@ -84,7 +84,7 @@ public void onActivityCreated(Bundle savedInstanceState) { tvIntro.setText(currentPage.getIntroduction()); - pageLanguageSettingsAdapter = new PageLanguageSettingsAdapter(activity); + pageLanguageSettingsAdapter = new PageLanguageSettingsAdapter(activity, parentActivity); lvActions.setAdapter(pageLanguageSettingsAdapter); pageLanguageSettingsAdapter.setData(currentPage.getAction());