private async void GetCatsImages(List <Cats> lstCats) { if (CrossConnectivity.Current.IsConnected) { ImageCommon imageCommon = new ImageCommon(); //ProgressBar progress = null; foreach (var cat in lstCats) { //loading para cada foto enquanto carrega ProgressBar progress = new ProgressBar(Context); llImages.AddView(progress); string urlFoto = cat.url; var bitmap = await imageCommon.GetImageBitmapFromUrlAsync(urlFoto); //Criando o imageView para ser adicionado ao LinearLayout Dinamicamente AppCompatImageView imgView = new AppCompatImageView(Context); imgView.SetPadding(20, 20, 20, 20); imgView.SetImageBitmap(bitmap); //Adicionado o imageView ao LinearLayout llImages.AddView(imgView); //retira o loading llImages.RemoveView(progress); } } }
private void ConnectViews(View view) { toolbar_friend = view.FindViewById <MaterialToolbar>(Resource.Id.toolbar_friend); toolbar_friend.SetNavigationIcon(Resource.Mipmap.ic_arrow_back_white_18dp); toolbar_friend.NavigationClick += Toolbar_friend_NavigationClick; Names = view.FindViewById <MaterialTextView>(Resource.Id.txt_profile_name); Surname = view.FindViewById <MaterialTextView>(Resource.Id.txt_profile_surname); Phone = view.FindViewById <MaterialTextView>(Resource.Id.txt_profile_phone_number); ImgCover = view.FindViewById <AppCompatImageView>(Resource.Id.F_ProfileImgCover); ImgProfile = view.FindViewById <AppCompatImageView>(Resource.Id.F_ProfileImage); FabCallFriend = view.FindViewById <FloatingActionButton>(Resource.Id.FabCallFriend); FabCallFriend.Click += FabCallFriend_Click; CrossCloudFirestore .Current .Instance .Collection("PEOPLE") .Document(id) .AddSnapshotListener((value, error) => { if (value.Exists) { var users = value.ToObject <AppUsers>(); Names.Text = users.Name; Surname.Text = users.Surname; ///InputUsername.Text = users.Username; Phone.Text = users.PhoneNumber; // InputEmail.Text = users.Email; } }); }
private void InitComponent() { try { RootView = MainView.FindViewById <RelativeLayout>(Resource.Id.root); Emojiicon = MainView.FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojiconEditTextView = MainView.FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); SendButton = MainView.FindViewById <CircleButton>(Resource.Id.sendButton); MRecycler = MainView.FindViewById <RecyclerView>(Resource.Id.commentRecyler); ProgressBarLoader = MainView.FindViewById <ProgressBar>(Resource.Id.sectionProgress); EmptyStateLayout = MainView.FindViewById <ViewStub>(Resource.Id.viewStub); CommentButtomLayout = MainView.FindViewById <RelativeLayout>(Resource.Id.commentonButtom); SwipeRefreshLayout = MainView.FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout); SwipeRefreshLayout.SetDefaultStyle(); SwipeRefreshLayout.Refresh += SwipeRefreshLayoutOnRefresh; EmojiconEditTextView.RequestFocus(); ProgressBarLoader.Visibility = ViewStates.Visible; EmojIconActions emojis = new EmojIconActions(Activity, RootView, EmojiconEditTextView, Emojiicon); emojis.ShowEmojIcon(); SendButton.Click += SendButton_Click; } catch (Exception e) { Console.WriteLine(e); } }
private void InitComponent(View contentView) { try { Image = contentView.FindViewById <ImageView>(Resource.Id.card_pro_pic); CommentText = contentView.FindViewById <AutoLinkTextView>(Resource.Id.active); UsernameTextView = contentView.FindViewById <TextView>(Resource.Id.username); TimeTextView = contentView.FindViewById <TextView>(Resource.Id.time); LikeiconView = contentView.FindViewById <ImageView>(Resource.Id.Likeicon); UnLikeiconView = contentView.FindViewById <ImageView>(Resource.Id.UnLikeicon); ReplyiconView = contentView.FindViewById <TextView>(Resource.Id.ReplyIcon); LikeNumber = contentView.FindViewById <TextView>(Resource.Id.LikeNumber); UnLikeNumber = contentView.FindViewById <TextView>(Resource.Id.UnLikeNumber); RepliesCount = contentView.FindViewById <TextView>(Resource.Id.RepliesCount); LikeButton = contentView.FindViewById <LinearLayout>(Resource.Id.LikeButton); UnLikeButton = contentView.FindViewById <LinearLayout>(Resource.Id.UnLikeButton); ReplyButton = contentView.FindViewById <LinearLayout>(Resource.Id.ReplyButton); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, ReplyiconView, IonIconsFonts.Reply); RootView = contentView.FindViewById <LinearLayout>(Resource.Id.root); EmojiconEditTextView = contentView.FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); Emojiicon = contentView.FindViewById <AppCompatImageView>(Resource.Id.emojiicon); SendButton = contentView.FindViewById <CircleButton>(Resource.Id.sendButton); ReplyRecyclerView = contentView.FindViewById <RecyclerView>(Resource.Id.recyler); EmptyStateLayout = contentView.FindViewById <ViewStub>(Resource.Id.viewStub); var emojisIcon = new EmojIconActions(Activity, RootView, EmojiconEditTextView, Emojiicon); emojisIcon.ShowEmojIcon(); } catch (Exception e) { Console.WriteLine(e); } }
private void InitComponent() { try { RootView = FindViewById <RelativeLayout>(Resource.Id.rootChatWindowView); ChatEmojiImage = FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojiconEditTextView = FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); ChatSendButton = FindViewById <CircleButton>(Resource.Id.sendButton); ChatBoxRecylerView = FindViewById <RecyclerView>(Resource.Id.recyler); SwipeRefreshLayout = FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout); SwipeRefreshLayout.SetProgressBackgroundColorSchemeColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#424242") : Color.ParseColor("#f7f7f7")); SwipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight, Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); ChatSendButton.Tag = "Text"; ChatSendButton.SetImageResource(Resource.Drawable.SendLetter); ModeCallback = new ActionModeCallback(this); var emojisIcon = new EmojIconActions(this, RootView, EmojiconEditTextView, ChatEmojiImage); emojisIcon.ShowEmojIcon(); } catch (Exception e) { Console.WriteLine(e); } }
private void Initialize(Context context) { LayoutInflater inflater = LayoutInflater.From(context); viewLayout = inflater.Inflate(Resource.Layout.weather_alert_panel, this); alertIcon = viewLayout.FindViewById <AppCompatImageView>(Resource.Id.alert_icon); alertTitle = viewLayout.FindViewById <TextView>(Resource.Id.alert_title); headerCard = viewLayout.FindViewById <CardView>(Resource.Id.header_card); bodyCard = viewLayout.FindViewById <CardView>(Resource.Id.body_card); expandIcon = viewLayout.FindViewById <TextView>(Resource.Id.expand_icon); bodyTextView = viewLayout.FindViewById <TextView>(Resource.Id.body_textview); bodyCard.Visibility = ViewStates.Gone; headerCard.Click += (sender, e) => { Expanded = !Expanded; expandIcon.Text = App.Context.GetString( Expanded ? Resource.String.materialicon_expand_less : Resource.String.materialicon_expand_more); bodyCard.Visibility = Expanded ? ViewStates.Visible : ViewStates.Gone; }; }
private void InitComponent() { try { RootView = MainView.FindViewById <RelativeLayout>(Resource.Id.root); Emojiicon = MainView.FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojiconEditTextView = MainView.FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); SendButton = MainView.FindViewById <CircleButton>(Resource.Id.sendButton); CommentRecyclerView = MainView.FindViewById <RecyclerView>(Resource.Id.recyler); XSwipeRefreshLayout = MainView.FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout); ProgressBarLoader = MainView.FindViewById <ProgressBar>(Resource.Id.sectionProgress); EmptyStateLayout = MainView.FindViewById <ViewStub>(Resource.Id.viewStub); ViewboxText = MainView.FindViewById <TextView>(Resource.Id.viewbox); ViewboxText.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black); XSwipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight, Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); XSwipeRefreshLayout.Refreshing = false; XSwipeRefreshLayout.Enabled = true; XSwipeRefreshLayout.SetProgressBackgroundColorSchemeColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#424242") : Color.ParseColor("#f7f7f7")); ProgressBarLoader.Visibility = ViewStates.Visible; EmojiconEditTextView.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Gray); EmojiconEditTextView.SetHintTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Gray); EmojIconActions emojis = new EmojIconActions(Activity, RootView, EmojiconEditTextView, Emojiicon); emojis.ShowEmojIcon(); } catch (Exception e) { Console.WriteLine(e); } }
private void InitComponent() { try { StoryImageView = FindViewById <ImageView>(Resource.Id.imagstoryDisplay); StoryVideoView = FindViewById <VideoView>(Resource.Id.VideoView); PlayIconVideo = FindViewById <CircleButton>(Resource.Id.Videoicon_button); EmojisView = FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojisIconEditText = FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); AddStoryButton = FindViewById <CircleButton>(Resource.Id.sendButton); RootView = FindViewById <RelativeLayout>(Resource.Id.storyDisplay); StoriesProgress = FindViewById <StoriesProgressView>(Resource.Id.stories); if (StoriesProgress != null) { StoriesProgress.Visibility = ViewStates.Gone; } Methods.SetColorEditText(EmojisIconEditText, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); var emojisIcon = new EmojIconActions(this, RootView, EmojisIconEditText, EmojisView); emojisIcon.ShowEmojIcon(); emojisIcon.SetIconsIds(Resource.Drawable.ic_action_keyboard, Resource.Drawable.ic_action_sentiment_satisfied_alt); PlayIconVideo.Visibility = ViewStates.Gone; PlayIconVideo.Tag = "Play"; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
private void InitComponent() { try { StoryImageView = FindViewById <ImageView>(Resource.Id.imagstoryDisplay); StoryVideoView = FindViewById <VideoView>(Resource.Id.VideoView); PlayIconVideo = FindViewById <CircleButton>(Resource.Id.Videoicon_button); EmojisView = FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojisIconEditText = FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); AddStoryButton = FindViewById <CircleButton>(Resource.Id.sendButton); RootView = FindViewById <RelativeLayout>(Resource.Id.storyDisplay); StoriesProgress = FindViewById <StoriesProgressView>(Resource.Id.stories); StoriesProgress.Visibility = ViewStates.Gone; EmojisView.Visibility = ViewStates.Gone; Methods.SetColorEditText(EmojisIconEditText, AppSettings.SetTabDarkTheme ? Color.White : Color.Black); var emojisIcon = new EmojIconActions(this, RootView, EmojisIconEditText, EmojisView); emojisIcon.ShowEmojIcon(); PlayIconVideo.Visibility = ViewStates.Gone; PlayIconVideo.Tag = "Play"; } catch (Exception e) { Console.WriteLine(e); } }
private void SetCustomBackButton() { //accessing toolbar from MainActivity var toolbar = (Toolbar)MainActivity.RootFindViewById <Toolbar>(Resource.Id.toolbar); // set Android Logo's image //toolbar.SetLogo(Resource.Drawable.AndroidBackButton); toolbar.SetLogo(Resource.Drawable.back); for (int i = 0; i < toolbar.ChildCount; i++) { var item = toolbar.GetChildAt(i); //if Android Logo if (item.GetType() == typeof(AppCompatImageView)) { AppCompatImageView image = (AppCompatImageView)item; image.Click += (sender, e) => { if (((CoolContentPage)Element)?.CustomBackButtonAction != null) { ((CoolContentPage)Element)?.CustomBackButtonAction.Invoke(); } }; } } }
private void ReferencesViews(View view) { EtDateOut = view.FindViewById <AppCompatTextView>(Resource.Id.et_date_out); EtTimeOut = view.FindViewById <AppCompatTextView>(Resource.Id.et_time_out); OutVehicle = view.FindViewById <AppCompatButton>(Resource.Id.mb_out_vehicle); Image = view.FindViewById <AppCompatImageView>(Resource.Id.receipt_image); Plate = view.FindViewById <AppCompatTextView>(Resource.Id.receipt_item_plate); Date = view.FindViewById <AppCompatTextView>(Resource.Id.receipt_item_date); Loader = view.FindViewById <FrameLayout>(Resource.Id.loader_out_vehicle); }
public SingleLineItemActionViewHolder(View itemView, Action <int> listener) : base(itemView) { PrimaryText = itemView.FindViewById <AppCompatTextView>(Resource.Id.text_primary); ActionImage = itemView.FindViewById <AppCompatImageView>(Resource.Id.action_image); //TODO: PT- What if the parent isn't a RelativeLayout? // Hook the event to the action icon's parent to have a reasonable touch/hit target. View parent = itemView.FindViewById <RelativeLayout>(Resource.Id.action_container); parent.Click += (sender, e) => listener(base.LayoutPosition); }
protected override ImageView CreatePlatformView() { var imageView = new AppCompatImageView(Context); // Enable view bounds adjustment on measure. // This allows the ImageView's OnMeasure method to account for the image's intrinsic // aspect ratio during measurement, which gives us more useful values during constrained // measurement passes. imageView.SetAdjustViewBounds(true); return(imageView); }
public override View GetView(int position, View convertView, ViewGroup parent) { View row = convertView; if (row == null) { row = LayoutInflater.From(mContext).Inflate(Resource.Layout.discover_row, null, false); } AppCompatImageView innovationImage = row.FindViewById <AppCompatImageView>(Resource.Id.innovationImage); innovationImage.SetBackgroundResource(mInnovations[position].ImageId); AppCompatTextView innovationTitle = row.FindViewById <AppCompatTextView>(Resource.Id.innovationTitle); innovationTitle.Text = mInnovations[position].Title; AppCompatTextView innovationDescription = row.FindViewById <AppCompatTextView>(Resource.Id.innovationDescription); innovationDescription.Text = mInnovations[position].DescriptionShort; AppCompatTextView innovationContributor = row.FindViewById <AppCompatTextView>(Resource.Id.innovationContributor); innovationContributor.Text = "Contributor: " + mInnovations[position].Contributor; AppCompatTextView innovationDate = row.FindViewById <AppCompatTextView>(Resource.Id.innovationDate); innovationDate.Text = "Date: " + String.Format("{0:MMMM d, yyy}", mInnovations[position].CreationDate); AppCompatTextView innovationLikes = row.FindViewById <AppCompatTextView>(Resource.Id.innovationLikes); innovationLikes.Text = "Likes: " + mInnovations[position].NumberOfLikes; innovationLikes.Click += delegate { likeButtonClicked = false; if (likeButtonClicked == false) { mInnovations[position].NumberOfLikes = mInnovations[position].NumberOfLikes + 1; likeButtonClicked = true; innovationLikes.Text = $"Likes: {mInnovations[position].NumberOfLikes.ToString()}"; } else { mInnovations[position].NumberOfLikes = mInnovations[position].NumberOfLikes - 1; likeButtonClicked = false; innovationLikes.Text = $"Likes: {mInnovations[position].NumberOfLikes.ToString()}"; } }; return(row); }
private void InitComponent() { try { CollapsingToolbar = (CollapsingToolbarLayout)FindViewById(Resource.Id.collapsingToolbar); CollapsingToolbar.Title = ""; AppBarLayout = FindViewById <AppBarLayout>(Resource.Id.appBarLayout); AppBarLayout.SetExpanded(true); AppBarLayout.AddOnOffsetChangedListener(this); MRecycler = (RecyclerView)FindViewById(Resource.Id.userRecyler); TxtGroupName = FindViewById <EmojiconEditText>(Resource.Id.groupName); ImageGroup = FindViewById <ImageView>(Resource.Id.groupCover); BtnImage = FindViewById <Button>(Resource.Id.btn_selectimage); ChatEmojImage = FindViewById <AppCompatImageView>(Resource.Id.emojiicon); BtnAdd = FindViewById <FloatingActionButton>(Resource.Id.fab); BtnDeleteGroup = FindViewById <Button>(Resource.Id.deleteGroupButton); BtnDeleteGroup.Visibility = ViewStates.Visible; BtnExitGroup = FindViewById <TextView>(Resource.Id.exitGroupButton); BtnExitGroup.Visibility = ViewStates.Visible; if (AppSettings.SetTabDarkTheme) { TxtGroupName.SetTextColor(Color.White); TxtGroupName.SetHintTextColor(Color.White); } else { TxtGroupName.SetTextColor(Color.ParseColor("#444444")); TxtGroupName.SetHintTextColor(Color.ParseColor("#444444")); } var emoticon = new EmojIconActions(this, CollapsingToolbar, TxtGroupName, ChatEmojImage); emoticon.ShowEmojIcon(); } catch (Exception e) { Console.WriteLine(e); } }
private void DestroyBasic() { try { StoryImageView = null !; StoryVideoView = null !; PlayIconVideo = null !; EmojisView = null !; EmojisIconEditText = null !; AddStoryButton = null !; RootView = null !; StoriesProgress = null !; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
private void DestroyBasic() { try { StoryImageView = null; StoryVideoView = null; PlayIconVideo = null; EmojisView = null; EmojisIconEditText = null; AddStoryButton = null; RootView = null; StoriesProgress = null; } catch (Exception e) { Console.WriteLine(e); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here SetContentView(Resource.Layout.tv_show_detail); appBarLayout = FindViewById <AppBarLayout>(Resource.Id.image_toolbar_appbar_layout); collapseToolbar = FindViewById <CollapsingToolbarLayout>(Resource.Id.image_toolbar_collapsing_layout); collapseToolbar.TitleEnabled = true; detailToolbar = FindViewById <Toolbar>(Resource.Id.image_toolbar_main_toolbar); seasonsHeader = FindViewById <TabLayout>(Resource.Id.main_tabs_header); seasonEpisodesPager = FindViewById <ViewPager>(Resource.Id.main_tabs_viewpager); seasonsHeader.Visibility = ViewStates.Gone; seasonEpisodesPager.Visibility = ViewStates.Gone; detailImage = FindViewById <AppCompatImageView>(Resource.Id.image_toolbar_main_image); titleText = FindViewById <AppCompatTextView>(Resource.Id.image_toolbar_main_title); descriptionText = FindViewById <AppCompatTextView>(Resource.Id.image_toolbar_main_description); releaseText = FindViewById <AppCompatTextView>(Resource.Id.image_toolbar_main_release); genreText = FindViewById <AppCompatTextView>(Resource.Id.image_toolbar_main_genre); titleContainer = FindViewById <Android.Widget.LinearLayout>(Resource.Id.image_toolbar_collapsing_root); loadingView = FindViewById <ContentLoadingProgressBar>(Resource.Id.image_toolbar_loading); AppView.SetActionBarForActivity(detailToolbar, this); appBarLayout.OffsetChanged += AppLayout_OffsetChanged; // load data from link if (savedInstanceState is null) { var link = Intent.Extras.GetString("itemLink"); LoadData(link); } else { // get saved show data var show = Newtonsoft.Json.JsonConvert.DeserializeObject <SeriesDetails>(savedInstanceState.GetString(ShowDetailSaveInstanceName)); LoadData(null, show); } }
private void ChangeImageVehicle(AppCompatImageView i, Vehicle vehicle) { int img; if (typeof(Car).IsInstanceOfType(vehicle)) { img = Resource.Drawable.ic_car; } else if (typeof(Motorcycle).IsInstanceOfType(vehicle)) { img = ((vehicle as Motorcycle).CylinderCapacity > (int)Parking.MAX_CYLINDER_MOTORCYCLE) ? Resource.Drawable.ic_moto500cc : Resource.Drawable.ic_scooter; } else { img = Resource.Drawable.ic_bicycle; } i.SetImageDrawable(i.Context.GetDrawable(img)); }
private void InitComponent() { try { ImageBlog = FindViewById <ImageView>(Resource.Id.imageBlog); TxtTitle = FindViewById <TextView>(Resource.Id.title); TxtHtml = FindViewById <WebView>(Resource.Id.LocalWebView); TxtViews = FindViewById <TextView>(Resource.Id.views); BtnMore = FindViewById <ImageButton>(Resource.Id.more); LoadMore = FindViewById <TextView>(Resource.Id.LoadMore); CategoryName = FindViewById <TextView>(Resource.Id.CategoryName); ClockIcon = FindViewById <TextView>(Resource.Id.ClockIcon); DateTimeTextView = FindViewById <TextView>(Resource.Id.DateTime); LikeIcon = FindViewById <TextView>(Resource.Id.LikeIcon); LikeCount = FindViewById <TextView>(Resource.Id.LikeCount); UnlikeIcon = FindViewById <TextView>(Resource.Id.UnlikeIcon); UnlikeNumber = FindViewById <TextView>(Resource.Id.UnlikeNumber); EmptyStateLayout = FindViewById <ViewStub>(Resource.Id.viewStub); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, ClockIcon, IonIconsFonts.AndroidTime); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, LikeIcon, IonIconsFonts.Thumbsup); FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, UnlikeIcon, IonIconsFonts.Thumbsdown); RootView = FindViewById <CoordinatorLayout>(Resource.Id.root); EmojIcon = FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojIconEditTextView = FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); SendButton = FindViewById <CircleButton>(Resource.Id.sendButton); MRecycler = FindViewById <RecyclerView>(Resource.Id.recyler); ProgressBarLoader = FindViewById <ProgressBar>(Resource.Id.sectionProgress); ProgressBarLoader.Visibility = ViewStates.Visible; EmojIconActions emojis = new EmojIconActions(this, RootView, EmojIconEditTextView, EmojIcon); emojis.ShowEmojIcon(); } catch (Exception e) { Console.WriteLine(e); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.VideoCall); Window.AddFlags(WindowManagerFlags.KeepScreenOn); _btnEndCall = FindViewById <AppCompatImageView>(Resource.VideoCall.btnEndCall); _cbMute = FindViewById <AppCompatCheckBox>(Resource.VideoCall.cbMute); _btnFlip = FindViewById <AppCompatCheckBox>(Resource.VideoCall.btnFlip); _lblUserName = FindViewById <TextView>(Resource.VideoCall.lblUserName); _lblStatus = FindViewById <TextView>(Resource.VideoCall.lblDuration); _primaryVideo = FindViewById <TwilioVideo.VideoView>(Resource.VideoCall.primaryVideo); _spinner = FindViewById <View>(Resource.VideoCall.pgLoading); _thumbnailVideo = FindViewById <TwilioVideo.VideoView>(Resource.VideoCall.thumbnailVideo); _root = FindViewById <ViewGroup>(Resource.VideoCall.root); _thumbnailContainer = FindViewById <ViewGroup>(Resource.VideoCall.thumbnailContainer); _primaryVideo.Visibility = ViewStates.Invisible; _thumbnailVideo.Visibility = ViewStates.Invisible; _btnFlip.Click += OnFlipButtonClick; _btnEndCall.Click += OnCancelButtonClick; bool twoOrMoreCameras = Cameras.Count() > 1; _btnFlip.Enabled = twoOrMoreCameras; _btnFlip.Visibility = twoOrMoreCameras ? ViewStates.Visible : ViewStates.Gone; VolumeControlStream = Stream.VoiceCall; bool granted = ContextCompat.CheckSelfPermission(ApplicationContext, Manifest.Permission.Camera) == Permission.Granted && ContextCompat.CheckSelfPermission(ApplicationContext, Manifest.Permission.RecordAudio) == Permission.Granted; CheckVideoCallPermissions(granted); TwilioVideo = TwilioVideoHelper.GetOrCreate(ApplicationContext); UpdateState(); ConnectToRoom(); }
private void InitComponent(View view) { try { Image = view.FindViewById <CircleImageView>(Resource.Id.card_pro_pic); CommentText = view.FindViewById <AutoLinkTextView>(Resource.Id.active); LikeIcon = view.FindViewById <ImageView>(Resource.Id.likeIcon); TimeTextView = view.FindViewById <TextView>(Resource.Id.time); LikeCount = view.FindViewById <TextView>(Resource.Id.Like); ReplyButton = view.FindViewById <TextView>(Resource.Id.reply); RootView = view.FindViewById <RelativeLayout>(Resource.Id.root); EmojiIcon = view.FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojIconEditTextView = view.FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); SendButton = view.FindViewById <CircleButton>(Resource.Id.sendButton); ViewboxText = view.FindViewById <TextView>(Resource.Id.viewbox); ViewboxText.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black); MRecycler = (RecyclerView)view.FindViewById(Resource.Id.recyler); EmptyStateLayout = view.FindViewById <ViewStub>(Resource.Id.viewStub); EmojIconEditTextView.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Gray); EmojIconEditTextView.SetHintTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Gray); EmojIconActions emojis = new EmojIconActions(Activity, RootView, EmojIconEditTextView, EmojiIcon); emojis.ShowEmojIcon(); if (AppSettings.SetTabDarkTheme) { LikeIcon.SetBackgroundResource(Resource.Drawable.Shape_Circle_Black); } } catch (Exception e) { Console.WriteLine(e); } }
private ViewGroup GetQRCodeCustomOverlay() { if (this.qrcodeOverlay != null) { return(this.qrcodeOverlay); } this.qrcodeOverlay = new RelativeLayout(this.Activity); TextView title = new TextView(this.Activity); title.SetTextColor(Android.Graphics.Color.White); title.SetText(Resource.String.scan_prompt); RelativeLayout.LayoutParams tl = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent); tl.TopMargin = (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 80, Context.Resources.DisplayMetrics); tl.AddRule(LayoutRules.CenterHorizontal); title.LayoutParameters = tl; this.qrcodeOverlay.AddView(title); int pixel = (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 200, Context.Resources.DisplayMetrics); RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(pixel, pixel); lp.AddRule(LayoutRules.CenterInParent); AppCompatImageView img = new AppCompatImageView(this.Activity); img.SetImageResource(Resource.Drawable.ic_qr_overlay); img.LayoutParameters = lp; this.qrcodeOverlay.AddView(img); return(this.qrcodeOverlay); }
private void InitComponent() { try { IconClose = CommentWindow.FindViewById <TextView>(Resource.Id.IconColse); RootView = CommentWindow.FindViewById <RelativeLayout>(Resource.Id.root); EmojisIcon = CommentWindow.FindViewById <AppCompatImageView>(Resource.Id.emojiicon); EmojisIconEditTextView = CommentWindow.FindViewById <EmojiconEditText>(Resource.Id.EmojiconEditText5); SendButton = CommentWindow.FindViewById <CircleButton>(Resource.Id.sendButton); MRecycler = CommentWindow.FindViewById <RecyclerView>(Resource.Id.recyler); SwipeRefreshLayout = CommentWindow.FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout); ProgressBarLoader = CommentWindow.FindViewById <ProgressBar>(Resource.Id.sectionProgress); EmptyStateLayout = CommentWindow.FindViewById <ViewStub>(Resource.Id.viewStub); SendButton.Click += SendButtonOnClick; IconClose.Click += IconCloseOnClick; SwipeRefreshLayout.SetColorSchemeResources(Android.Resource.Color.HoloBlueLight, Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); SwipeRefreshLayout.Refreshing = false; SwipeRefreshLayout.Enabled = true; SwipeRefreshLayout.SetProgressBackgroundColorSchemeColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#424242") : Color.ParseColor("#f7f7f7")); SwipeRefreshLayout.Refresh += SwipeRefreshLayout_Refresh; FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconClose, FontAwesomeIcon.Times); ProgressBarLoader.Visibility = ViewStates.Visible; var emojis = new EmojIconActions(ActivityContext, RootView, EmojisIconEditTextView, EmojisIcon); emojis.ShowEmojIcon(); EmojisIconEditTextView.RequestFocus(); } catch (Exception e) { Console.WriteLine(e); } }
private void BindResources() { _coordinatorLayout = FindViewById <CoordinatorLayout>(Resource.Id.nav_coordinator_content); _drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout); _toolbar = FindViewById <Toolbar>(Resource.Id.nav_toolbar); _customToolbarTitleWrapper = FindViewById <LinearLayout>(Resource.Id.toolbar_title_wrapper); _customToolbarTitle = FindViewById <AppCompatTextView>(Resource.Id.toolbar_title); _customToolbarSubtitle = FindViewById <AppCompatTextView>(Resource.Id.toolbar_subtitle); _profileView = FindViewById <CircularProfileView>(Resource.Id.img_profile); _profileNameView = FindViewById <AppCompatTextView>(Resource.Id.profile_name); _logoutButton = FindViewById <AppCompatTextView>(Resource.Id.logout_button); _page_container = FindViewById <FrameLayout>(Resource.Id.page_container); BottomSheet = FindViewById <LinearLayout>(Resource.Id.bottom_sheet); //BottomSheetBehaviour = Edison.Mobile.Android.Common.Behaviors.BottomSheetBehavior.From(_bottomSheet); // _bottomSheetBehaviour = BottomSheet4StateBehaviour.From(_bottomSheet); BottomSheetBehaviour = new Edison.Mobile.Android.Common.Behaviors.BottomSheetBehavior(); CoordinatorLayout.LayoutParams lp = BottomSheet.LayoutParameters as CoordinatorLayout.LayoutParams; lp.Behavior = BottomSheetBehaviour; BottomSheet.LayoutParameters = lp; _brightnessControlContainer = FindViewById <LinearLayout>(Resource.Id.brightness_slider_container); _brightnessControl = FindViewById <AppCompatSeekBar>(Resource.Id.brightness_slider); _moon = FindViewById <AppCompatImageView>(Resource.Id.moon); }
public override View GetGroupView(int groupPosition, bool isExpanded, View convertView, ViewGroup parent) { // Get text label and icon resource for the group string groupText = null; int groupIconResource = 0; if (ListDataGroups == null) { groupText = ListDataGroupText[groupPosition]; } else { groupText = ListDataGroups[groupPosition].Text; groupIconResource = ListDataGroups[groupPosition].ImageResource; } convertView = convertView ?? _context.LayoutInflater.Inflate(Resource.Layout.nav_list_group, null); // get the TextView for the label and assign the text TextView listGroupTextView = convertView.FindViewById <TextView>(Resource.Id.navlistgroup_text); listGroupTextView.Text = groupText; // If there is a resource if (groupIconResource != 0) { // get the ImageView for the icon and assign the image resource AppCompatImageView listGroupImageView = convertView.FindViewById <AppCompatImageView>(Resource.Id.navlistgroup_image); listGroupImageView.SetImageResource(groupIconResource); // var d = _context.Resources.GetDrawable(groupIconResource, null); // DrawableCompat.SetTint(d, Color.White); // listGroupImageView.SetImageDrawable(d); } // Indicator try { ImageView indicator = convertView.FindViewById <ImageView>(Resource.Id.navlistgroup_indicator); if (indicator != null) { if (GetChildrenCount(groupPosition) == 0) { indicator.Visibility = ViewStates.Gone; } else { indicator.Visibility = ViewStates.Visible; if (isExpanded) { indicator.Rotation = 90f; } else { indicator.Rotation = 0f; } } } // indicator.Visibility = GetChildrenCount(groupPosition) > 0 ? ViewStates.Visible : ViewStates.Gone; } catch { } // return the view for the group return(convertView); }
public MvxAppCompatImageViewBitmapTargetBinding(AppCompatImageView imageView) : base(imageView) { }
protected override void SetImageBitmap(AppCompatImageView imageView, Bitmap bitmap) { #warning ASK STEVE @ SEQUENCE - WHY IS THIS NEEDED? var drawable = new BitmapDrawable(Resources.System, bitmap); imageView.SetImageDrawable(drawable); }
public MvxAppCompatImageViewDrawableTargetBinding(AppCompatImageView imageView) : base(imageView) { }
public MvxAppCompatImageViewImageTargetBinding(AppCompatImageView imageView) : base(imageView) { }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); wallpaperManager = WallpaperManager.GetInstance(Application.Context); configurationManager = new ConfigurationManager(AppPreferences.Default); // Create your application here SetContentView(Resource.Layout.BackgroundSettings); using (toolbar = FindViewById <AndroidX.AppCompat.Widget.Toolbar>(Resource.Id.toolbar)) { SetSupportActionBar(toolbar); } pickwallpaper = FindViewById <Button>(Resource.Id.pickwallpaper); wallpaperPreview = FindViewById <AppCompatImageView>(Resource.Id.wallpaperPreview); blur = FindViewById <SeekBar>(Resource.Id.blur); opacity = FindViewById <SeekBar>(Resource.Id.opacity); wallpaperbeingsetted = FindViewById <Spinner>(Resource.Id.wallpaperbeingsetted); appliesToMusicWidget = FindViewById <CheckBox>(Resource.Id.appliesToMusicWidget); if (Build.VERSION.SdkInt >= BuildVersionCodes.Q) { enableblurandroid10 = FindViewById <Button>(Resource.Id.enableblurandroid10); enableblurandroid10warning = FindViewById <TextView>(Resource.Id.warningblurandroid10); if (configurationManager.RetrieveAValue(ConfigurationParameters.BlurEnabledForAndroid10)) { if (enableblurandroid10 != null) { enableblurandroid10.Text = Resources.GetString(Resource.String.disable); } } else { if (enableblurandroid10 != null) { enableblurandroid10.Text = Resources.GetString(Resource.String.enable); } } enableblurandroid10warning.Visibility = Android.Views.ViewStates.Visible; enableblurandroid10.Visibility = Android.Views.ViewStates.Visible; enableblurandroid10.Click += Enableblurandroid10_Click; } var spinnerAdapter = ArrayAdapter <string> .CreateFromResource(this, Resource.Array.listentriescurrentwallpapersetting, Android.Resource.Layout.SimpleSpinnerDropDownItem); wallpaperbeingsetted.Adapter = spinnerAdapter; wallpaperbeingsetted.ItemSelected += Wallpaperbeingsetted_ItemSelected; pickwallpaper.Click += Pickwallpaper_Click; appliesToMusicWidget.CheckedChange += AppliesToMusicWidget_CheckedChange; opacity.Max = 255; blur.Max = 25; blur.StopTrackingTouch += Blur_StopTrackingTouch; opacity.StopTrackingTouch += Opacity_StopTrackingTouch; //Precondition: Background must be black so we can set the opacity correctly of the wallpaper when being set. Window.DecorView.SetBackgroundColor(Color.Black); if (Checkers.ThisAppHasReadStoragePermission() == false) { Toast.MakeText(this, "You need the Storage permission", ToastLength.Long).Show(); StartActivity(new Intent(this, typeof(MainActivity))); } LoadConfiguration(); }
protected MvxAppCompatBaseImageViewTargetBinding(AppCompatImageView imageView) : base(imageView) { }
protected virtual void SetImageBitmap(AppCompatImageView imageView, Bitmap bitmap) { imageView.SetImageBitmap(bitmap); }
protected MvxAppCompatBaseStreamImageViewTargetBinding(AppCompatImageView imageView) : base(imageView) { }