This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ContentView xmlns="http://xamarin.com/schemas/2014/forms" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
| x:Class="ChatUIXForms.Views.Partials.ChatInputBarView" | |
| xmlns:controls="clr-namespace:ChatUIXForms.Controls"> | |
| <Grid RowSpacing="0" | |
| ColumnSpacing="0"> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="Auto" /> | |
| </Grid.RowDefinitions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UIKit; | |
| using Xamarin.Forms; | |
| using Xamarin.Forms.Platform.iOS; | |
| using Foundation; | |
| using CoreGraphics; | |
| using ChatUIXForms.Views.Partials; | |
| using ChatUIXForms.iOS.Renderers; | |
| [assembly: ExportRenderer(typeof(ChatInputBarView), typeof(ChatEntryRenderer))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ContentView xmlns="http://xamarin.com/schemas/2014/forms" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
| x:Class="ChatUIXForms.Views.Partials.ChatInputBarView" | |
| xmlns:controls="clr-namespace:ChatUIXForms.Controls"> | |
| <Grid RowSpacing="0" | |
| ColumnSpacing="0"> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="Auto" /> | |
| </Grid.RowDefinitions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize); | |
| if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) | |
| { | |
| Window.DecorView.SystemUiVisibility = 0; | |
| var statusBarHeightInfo = typeof(Xamarin.Forms.Platform.Android.FormsAppCompatActivity).GetField("_statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); | |
| statusBarHeightInfo?.SetValue(this, 0); | |
| Window.SetStatusBarColor(new Android.Graphics.Color(0, 0, 0, 255)); // Change color as required. | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Xamarin.Forms; | |
| namespace ChatUIXForms.Controls | |
| { | |
| public class ExtendedEditorControl : Editor | |
| { | |
| public static BindableProperty PlaceholderProperty | |
| = BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(ExtendedEditorControl)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.ComponentModel; | |
| using Android.Content; | |
| using Android.Content.Res; | |
| using Android.Graphics.Drawables; | |
| using ChatUIXForms.Controls; | |
| using ChatUIXForms.Droid.Renderers; | |
| using Xamarin.Forms; | |
| using Xamarin.Forms.Platform.Android; | |
| [assembly: ExportRenderer(typeof(ExtendedEditorControl), typeof(CustomEditorRenderer))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) | |
| { | |
| base.OnElementPropertyChanged(sender, e); | |
| var customControl = (ExtendedEditorControl)Element; | |
| if (e.PropertyName == Editor.TextProperty.PropertyName) | |
| { | |
| if (customControl.IsExpandable) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using ChatUIXForms.Controls; | |
| using ChatUIXForms.iOS.Renderers; | |
| using CoreGraphics; | |
| using Foundation; | |
| using UIKit; | |
| using Xamarin.Forms; | |
| using Xamarin.Forms.Platform.iOS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Device.BeginInvokeOnMainThread(() => | |
| ChatList.ScrollTo((this.BindingContext as ChatPageViewModel).Messages.Last(), ScrollToPosition.End, false) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Windows.Input; | |
| using ChatUIXForms.ViewModels; | |
| using Xamarin.Forms; | |
| namespace ChatUIXForms.Views | |
| { | |
| public partial class ChatPage : ContentPage |