protected override void OnCreate(Bundle savedInstanceState) { OverridePendingTransition(0, 0); SetTheme(StyleHelper.Style.CommonActivityStyle); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_chat_details); _navigationBarView = FindViewById <NavigationBarView>(Resource.Id.activity_chat_details_navigation_bar); _navigationBarView.SetLeftButton(StyleHelper.Style.NavigationBarBackButtonIcon, ViewModel.BackCommand); _navigationBarView.SetTitle(ViewModel.LocalizedStrings.DetailsTitle); _navigationBarView.SetRightButton(ViewModel.LocalizedStrings.Save, new RelayCommand(OnSaveClick)); _navigationBarView.RightTextButton.Visibility = ViewStates.Gone; _chatPhotoImageView = FindViewById <MvxCachedImageView>(Resource.Id.iv_chat_photo); _chatEditedPhotoImageView = FindViewById <MvxCachedImageView>(Resource.Id.iv_chat_photo_edited); _chatNameText = FindViewById <TextView>(Resource.Id.activity_chat_details_chat_name); _chatNameEditText = FindViewById <EditText>(Resource.Id.activity_chat_details_chat_name_edit); _chatMembersCountTextView = FindViewById <TextView>(Resource.Id.tv_members_count); _addMemberContainer = FindViewById <LinearLayout>(Resource.Id.activity_chat_details_add_member_container); _addmemberImageView = FindViewById <ImageView>(Resource.Id.activity_chat_details_add_member_image); _addmemberImageView.SetImageResource(StyleHelper.Style.AddMemberIcon); _addMemberTextView = FindViewById <TextView>(Resource.Id.activity_chat_details_add_member_text); _addMemberTextView.Text = ViewModel.LocalizedStrings.AddMembers; _membersRecyclerView = FindViewById <RecyclerView>(Resource.Id.rv_contacts_list); _changeChatPhotoButton = FindViewById <Button>(Resource.Id.b_chat_change_photo); _changeChatPhotoButton.SetCommand(new RelayCommand(OpenImagePicker)); _changeChatPhotoButton.Text = ViewModel.LocalizedStrings.ChangePhoto; _muteNotificationsLabel = FindViewById <TextView>(Resource.Id.activity_chat_details_mute_label); _muteNotificationsLabel.Text = ViewModel.LocalizedStrings.Notifications; _muteNotificationsSwitch = FindViewById <SwitchCompat>(Resource.Id.activity_chat_details_mute_switch); _muteNotificationsSwitch.SetCommand(ViewModel.HeaderViewModel.ChangeMuteNotificationsCommand); InitializeMembersRecyclerView(); // TODO YP: remove ServiceLocator _imagePicker = new ImagePicker( Dependencies.Container.Resolve <IPermissionsManager>(), Dependencies.Container.Resolve <IImagePickerService>()) { MaxImageWidth = 300 }; _busyOverlayView = FindViewById <BusyOverlayView>(Resource.Id.activity_chat_details_busy_view); }
protected override void OnCreate(Bundle savedInstanceState) { OverridePendingTransition(0, 0); SetTheme(StyleHelper.Style.CommonActivityStyle); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_chat_create); _navigationBarView = FindViewById <NavigationBarView>(Resource.Id.activity_chat_create_navigation_bar); _navigationBarView.SetLeftButton(StyleHelper.Style.NavigationBarBackButtonIcon, ViewModel.BackCommand); _navigationBarView.SetTitle(ViewModel.LocalizedStrings.CreateGroup); _navigationBarView.SetRightButton(ViewModel.LocalizedStrings.Create, new RelayCommand(() => { KeyboardService.HideSoftKeyboard(_chatNameEditTextView); ViewModel.SaveCommand.Execute(_imagePicker.GetStreamFunc()); })); _navigationBarView.RightTextButton.SetBackgroundColor(Color.Transparent); _chatPhotoImageView = FindViewById <MvxCachedImageView>(Resource.Id.iv_chat_photo); _chatEditedPhotoImageView = FindViewById <MvxCachedImageView>(Resource.Id.iv_chat_photo_edited); _chatNameEditTextView = FindViewById <EditText>(Resource.Id.et_chat_name); _contactsRecyclerView = FindViewById <RecyclerView>(Resource.Id.rv_contacts_list); _membersCountTextView = FindViewById <TextView>(Resource.Id.tv_members_count); _changeChatPhotoButton = FindViewById <Button>(Resource.Id.b_chat_change_photo); _changeChatPhotoButton.SetCommand(new RelayCommand(ChangePhoto)); _changeChatPhotoButton.Text = ViewModel.LocalizedStrings.ChangePhoto; InitializeContactsRecyclerView(); _imagePicker = new ImagePicker(Dependencies.PermissionsManager, Dependencies.Container.Resolve <IImagePickerService>()) { MaxImageWidth = 300 }; _chatPhotoImageView.SetImageResource(StyleHelper.Style.ChatGroupNoAvatarIcon); _chatEditedPhotoImageView.Visibility = ViewStates.Gone; _addMembers = FindViewById <Button>(Resource.Id.activity_chat_create_add_member); _addMembers.Text = ViewModel.LocalizedStrings.AddMembers; _addMembers.SetCommand(ViewModel.AddMembersCommand); _chatNameEditTextView.Hint = ViewModel.LocalizedStrings.ChatName; _busyOverlayView = FindViewById <BusyOverlayView>(Resource.Id.activity_chat_create_busy_view); }
protected override void OnCreate(Bundle savedInstanceState) { OverridePendingTransition(0, 0); SetTheme(StyleHelper.Style.CommonActivityStyle); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_chat_new); InitNavigationBar(); InitSearchBar(); InitNewGroupLayout(); InitRecyclerView(); _busyOverlayView = FindViewById <BusyOverlayView>(Resource.Id.activity_chat_new_busy_view); }
public override void OnViewCreated(View view, Bundle savedInstanceState) { base.OnViewCreated(view, savedInstanceState); View.SetBackgroundResource(StyleHelper.Style.ContentColor); InitNavigationBarView(view); var searchContainer = View.FindViewById <View>(Resource.Id.dialog_select_members_search_container); searchContainer.SetBackgroundResource(StyleHelper.Style.UnderlinedBg); _editText = View.FindViewById <EditText>(Resource.Id.dialog_select_members_search_text); _editText.Hint = ViewModel.Resources.Search; InitSelectedRecyclerView(view); InitFilteredRecyclerView(view); _busyOverlayView = View.FindViewById <BusyOverlayView>(Resource.Id.dialog_select_members_busy_view); }