Commit 5f1f8862 by Javier Piris

Adaptación del chat de preguntas al especialista

parent 363d5a57
...@@ -3,26 +3,34 @@ ...@@ -3,26 +3,34 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="inutralia.CustomCells.TextInViewCell"> x:Class="inutralia.CustomCells.TextInViewCell">
<Grid ColumnSpacing="2" Padding="5"> <Grid ColumnSpacing="2" RowSpacing="20" Padding="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="2"></ColumnDefinition> <ColumnDefinition Width="2"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Frame Grid.Row="0" Grid.Column="1" BackgroundColor="#0535f0" CornerRadius="15"> <Frame Grid.Row="0" Grid.Column="1" CornerRadius="15">
<Frame.HasShadow> <Frame.HasShadow>
<OnPlatform x:TypeArguments="x:Boolean" iOS="false" Android="true"/> <OnPlatform x:TypeArguments="x:Boolean" iOS="false" Android="true"/>
</Frame.HasShadow> </Frame.HasShadow>
<StackLayout> <StackLayout>
<Label TextColor="White" Text="{Binding Text}" /> <Label TextColor="White"
Text="{Binding Text}" />
</StackLayout> </StackLayout>
</Frame> </Frame>
<Label FontSize="Micro" Grid.Row="1" Grid.Column="1" Text="{Binding MessageDateTime, StringFormat='{0:MM/dd/yyyy hh:mm tt}'}" TextColor="Gray"></Label> <Label FontSize="Micro"
Grid.Row="1"
Grid.Column="1"
Text="{Binding MessageDateTime, StringFormat='{0:MM/dd/yyyy hh:mm tt}'}"
TextColor="Black">
</Label>
</Grid> </Grid>
</ViewCell> </ViewCell>
\ No newline at end of file
...@@ -3,19 +3,19 @@ ...@@ -3,19 +3,19 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="inutralia.CustomCells.TextOutViewCell"> x:Class="inutralia.CustomCells.TextOutViewCell">
<Grid ColumnSpacing="2" Padding="5"> <Grid ColumnSpacing="2" Padding="15,10,15,10">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="2"></ColumnDefinition> <ColumnDefinition Width="2"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Frame Grid.Row="0" Grid.Column="1" CornerRadius="15"> <Frame Grid.Row="0" Grid.Column="1" CornerRadius="15" BorderColor="#FFA2C300">
<Frame.HasShadow> <Frame.HasShadow>
<OnPlatform x:TypeArguments="x:Boolean" Android="true" iOS="True"/> <OnPlatform x:TypeArguments="x:Boolean" Android="true" iOS="True"/>
</Frame.HasShadow> </Frame.HasShadow>
...@@ -24,10 +24,19 @@ ...@@ -24,10 +24,19 @@
</Frame.BackgroundColor> </Frame.BackgroundColor>
<StackLayout> <StackLayout>
<Label TextColor="Black" Text="{Binding Text}" /> <Label TextColor="Black"
Text="{Binding Text}" />
</StackLayout> </StackLayout>
</Frame> </Frame>
<Label Grid.Row="1" FontSize="Micro" Grid.Column="1" HorizontalTextAlignment="End" Text="{Binding MessageDateTime, StringFormat='{0:MM/dd/yyyy hh:mm tt}'}" TextColor="Gray"></Label>
<Label Grid.Row="1"
FontSize="Micro"
Grid.Column="1"
HorizontalTextAlignment="End"
Text="{Binding MessageDateTime, StringFormat='{0:MM/dd/yyyy hh:mm tt}'}"
TextColor="Black">
</Label>
</Grid> </Grid>
</ViewCell> </ViewCell>
\ No newline at end of file
...@@ -14,6 +14,7 @@ namespace inutralia.ViewModels ...@@ -14,6 +14,7 @@ namespace inutralia.ViewModels
public NewQuestionViewModel() public NewQuestionViewModel()
{ {
IsBusy = true;
ListMessages = new ObservableRangeCollection<Message>(); ListMessages = new ObservableRangeCollection<Message>();
...@@ -34,6 +35,8 @@ namespace inutralia.ViewModels ...@@ -34,6 +35,8 @@ namespace inutralia.ViewModels
} }
}); });
IsBusy = false;
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
x:Name="newConsultationView" x:Name="newConsultationView"
Title="Nueva Consulta" Title="Nueva Consulta"
Icon="Add1" Icon="Add1"
BackgroundColor="{DynamicResource BasePageColor}"
NavigationPage.HasBackButton="True"> NavigationPage.HasBackButton="True">
<ContentPage.Resources> <ContentPage.Resources>
...@@ -17,20 +16,23 @@ ...@@ -17,20 +16,23 @@
</ContentPage.Resources> </ContentPage.Resources>
<ContentPage.Content> <ContentPage.Content>
<Grid RowSpacing="0" ColumnSpacing="0" > <Grid RowSpacing="0" ColumnSpacing="0" Padding="0,10,0,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ScrollView> <ScrollView >
<ListView x:Name="MessagesListView" <ListView x:Name="MessagesListView"
ItemTemplate="{StaticResource MessageTemplateSelector}" ItemTemplate="{StaticResource MessageTemplateSelector}"
ItemsSource="{Binding ListMessages}" ItemsSource="{Binding ListMessages}"
ItemTapped="ItemTapped"
BackgroundColor="White"
HasUnevenRows="True" HasUnevenRows="True"
SeparatorVisibility="None" SeparatorVisibility="None"
Footer="" CachingStrategy="RecycleElement"
/> Footer=""/>
</ScrollView> </ScrollView>
<StackLayout Orientation="Horizontal" Grid.Row="1" BackgroundColor="White" Padding="0,0,0,10"> <StackLayout Orientation="Horizontal" Grid.Row="1" BackgroundColor="White" Padding="0,0,0,10">
......
...@@ -32,6 +32,11 @@ namespace inutralia.Views.Question ...@@ -32,6 +32,11 @@ namespace inutralia.Views.Question
//buttonNewQuestion.Clicked += ButtonNewQuestion_Clicked; //buttonNewQuestion.Clicked += ButtonNewQuestion_Clicked;
} }
protected void ItemTapped(object sender, ItemTappedEventArgs e)
{
((ListView)sender).SelectedItem = null;
}
//protected override void OnBindingContextChanged() //protected override void OnBindingContextChanged()
//{ //{
// base.OnBindingContextChanged(); // base.OnBindingContextChanged();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment