use of com.onesignal.sdktest.util.Dialog in project OneSignal-Android-SDK by OneSignal.
the class MainActivityViewModel method onActivityCreated.
@Override
public ActivityViewModel onActivityCreated(Context context) {
this.context = context;
animate = new Animate();
currentUser = CurrentUser.getInstance();
dialog = new Dialog(context);
font = new Font(context);
intentTo = new IntentTo(context);
recyclerViewBuilder = new RecyclerViewBuilder(context);
toaster = new Toaster(context);
appBarLayout = getActivity().findViewById(R.id.main_activity_app_bar_layout);
toolbar = getActivity().findViewById(R.id.main_activity_toolbar);
privacyConsentLinearLayout = getActivity().findViewById(R.id.main_activity_privacy_consent_linear_layout);
nestedScrollView = getActivity().findViewById(R.id.main_activity_nested_scroll_view);
privacyConsentTitleTextView = getActivity().findViewById(R.id.main_activity_privacy_consent_title_text_view);
privacyConsentDescriptionTextView = getActivity().findViewById(R.id.main_activity_privacy_consent_description_text_view);
privacyConsentAllowButton = getActivity().findViewById(R.id.main_activity_privacy_consent_allow_button);
appTitleTextView = getActivity().findViewById(R.id.main_activity_account_title_text_view);
appIdRelativeLayout = getActivity().findViewById(R.id.main_activity_account_details_app_id_relative_layout);
appIdTitleTextView = getActivity().findViewById(R.id.main_activity_account_details_app_id_title_text_view);
appIdTextView = getActivity().findViewById(R.id.main_activity_account_details_app_id_text_view);
emailHeaderTextView = getActivity().findViewById(R.id.main_activity_email_title_text_view);
emailRelativeLayout = getActivity().findViewById(R.id.main_activity_account_details_email_relative_layout);
emailTitleTextView = getActivity().findViewById(R.id.main_activity_account_details_email_text_view);
userEmailTextView = getActivity().findViewById(R.id.main_activity_account_details_user_email_text_view);
logoutEmailButton = getActivity().findViewById(R.id.main_activity_email_logout_email_button);
smsHeaderTextView = getActivity().findViewById(R.id.main_activity_sms_title_text_view);
smsRelativeLayout = getActivity().findViewById(R.id.main_activity_account_details_sms_relative_layout);
smsTitleTextView = getActivity().findViewById(R.id.main_activity_account_details_sms_text_view);
userSMSTextView = getActivity().findViewById(R.id.main_activity_account_details_user_sms_text_view);
logoutSMSButton = getActivity().findViewById(R.id.main_activity_sms_logout_sms_button);
externalUserIdRelativeLayout = getActivity().findViewById(R.id.main_activity_account_details_external_user_id_relative_layout);
externalUserIdTitleTextView = getActivity().findViewById(R.id.main_activity_account_details_external_user_id_text_view);
userExternalUserIdTextView = getActivity().findViewById(R.id.main_activity_account_details_user_external_user_id_text_view);
tagsTitleTextView = getActivity().findViewById(R.id.main_activity_tags_title_text_view);
noTagsTextView = getActivity().findViewById(R.id.main_activity_tags_no_tags_text_view);
tagsRecyclerView = getActivity().findViewById(R.id.main_activity_tags_recycler_view);
addTagButton = getActivity().findViewById(R.id.main_activity_add_tags_button);
pushNotificationTitleTextView = getActivity().findViewById(R.id.main_activity_push_notification_title_text_view);
pushNotificationRecyclerView = getActivity().findViewById(R.id.main_activity_push_notification_recycler_view);
outcomeTitleTextView = getActivity().findViewById(R.id.main_activity_outcomes_title_text_view);
sendOutcomeButton = getActivity().findViewById(R.id.main_activity_outcomes_send_outcome_button);
triggersTitleTextView = getActivity().findViewById(R.id.main_activity_in_app_messages_triggers_title_text_view);
noTriggersTextView = getActivity().findViewById(R.id.main_activity_in_app_messages_triggers_no_triggers_text_view);
triggersRecyclerView = getActivity().findViewById(R.id.main_activity_in_app_messages_triggers_recycler_view);
addTriggerButton = getActivity().findViewById(R.id.main_activity_add_triggers_button);
inAppMessagingTitleTextView = getActivity().findViewById(R.id.main_activity_in_app_messaging_title_text_view);
inAppMessagingRecyclerView = getActivity().findViewById(R.id.main_activity_in_app_messaging_recycler_view);
locationTitleTextView = getActivity().findViewById(R.id.main_activity_location_title_text_view);
locationSharedRelativeLayout = getActivity().findViewById(R.id.main_activity_location_shared_relative_layout);
locationSharedTextView = getActivity().findViewById(R.id.main_activity_location_shared_text_view);
locationSharedDescriptionTextView = getActivity().findViewById(R.id.main_activity_location_shared_info_text_view);
locationSharedSwitch = getActivity().findViewById(R.id.main_activity_location_shared_switch);
promptLocationButton = getActivity().findViewById(R.id.main_activity_location_prompt_location_button);
settingTitleTextView = getActivity().findViewById(R.id.main_activity_settings_title_text_view);
subscriptionRelativeLayout = getActivity().findViewById(R.id.main_activity_settings_subscription_relative_layout);
subscriptionTextView = getActivity().findViewById(R.id.main_activity_settings_subscription_text_view);
subscriptionDescriptionTextView = getActivity().findViewById(R.id.main_activity_settings_subscription_info_text_view);
subscriptionSwitch = getActivity().findViewById(R.id.main_activity_settings_subscription_switch);
pauseInAppMessagesRelativeLayout = getActivity().findViewById(R.id.main_activity_settings_pause_in_app_messages_relative_layout);
pauseInAppMessagesTextView = getActivity().findViewById(R.id.main_activity_settings_pause_in_app_messages_text_view);
pauseInAppMessagesDescriptionTextView = getActivity().findViewById(R.id.main_activity_settings_pause_in_app_messages_info_text_view);
pauseInAppMessagesSwitch = getActivity().findViewById(R.id.main_activity_settings_pause_in_app_messages_switch);
revokeConsentButton = getActivity().findViewById(R.id.main_activity_settings_revoke_consent_button);
Button navigateNextActivity = getActivity().findViewById(R.id.main_activity_navigate_button);
navigateNextActivity.setOnClickListener(v -> {
getActivity().startActivity(new Intent(getActivity(), SecondaryActivity.class));
});
tagSet = new HashMap<>();
tagArrayList = new ArrayList<>();
triggerSet = new HashMap<>();
triggerArrayList = new ArrayList<>();
return this;
}
Aggregations