public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { try { View view = inflater.Inflate(Resource.Layout.AboutUserLayout, container, false); ContextProfile = (TikUserProfileFragment)ParentFragment; GlobalContext = (HomeActivity)Activity; InitComponent(view); WebsiteButton.Click += WebsiteButtonOnClick; SocialFacebook.Click += BtnFacebookOnClick; SocialTwitter.Click += BtnTwitterOnClick; SocialGoogle.Click += BtnGoogleOnClick; //Website link click TxtWebsite.Click += WebsiteButtonOnClick; ContextProfile.LoadProfile(ContextProfile.Json, ContextProfile.Type); StartApiService(); return(view); } catch (Exception exception) { Console.WriteLine(exception); return(null); } }
public static void OpenProfile(Activity activity, string userId, UserDataObject item) { try { if (userId != UserDetails.UserId) { Bundle bundle = new Bundle(); bundle.PutString("userinfo", JsonConvert.SerializeObject(item)); bundle.PutString("type", "UserData"); bundle.PutString("userid", userId); bundle.PutString("avatar", item.Avatar); bundle.PutString("fullname", item.Username); if (AppSettings.ProfileTheme == ProfileTheme.DefaultTheme) { UserProfileFragment profileFragment = new UserProfileFragment { Arguments = bundle }; HomeActivity.GetInstance()?.OpenFragment(profileFragment); } else if (AppSettings.ProfileTheme == ProfileTheme.TikTheme) { TikUserProfileFragment profileFragment = new TikUserProfileFragment { Arguments = bundle }; HomeActivity.GetInstance()?.OpenFragment(profileFragment); } } else { HomeActivity.GetInstance()?.NavigationTabBar.SetModelIndex(4, true); } } catch (Exception e) { Console.WriteLine(e); } }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { try { Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base); LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper); View view = localInflater.Inflate(Resource.Layout.MainFragmentLayout, container, false); ContextProfile = (TikUserProfileFragment)ParentFragment; GlobalContext = (HomeActivity)Activity; InitComponent(view); SetRecyclerViewAdapters(); return(view); } catch (Exception e) { Console.WriteLine(e); return(null); } }