Commit 5f1f8862 by Javier Piris

Adaptación del chat de preguntas al especialista

parent 363d5a57
......@@ -3,26 +3,34 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="inutralia.CustomCells.TextInViewCell">
<Grid ColumnSpacing="2" Padding="5">
<Grid ColumnSpacing="2" RowSpacing="20" Padding="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Frame Grid.Row="0" Grid.Column="1" BackgroundColor="#0535f0" CornerRadius="15">
<Frame Grid.Row="0" Grid.Column="1" CornerRadius="15">
<Frame.HasShadow>
<OnPlatform x:TypeArguments="x:Boolean" iOS="false" Android="true"/>
</Frame.HasShadow>
<StackLayout>
<Label TextColor="White" Text="{Binding Text}" />
<Label TextColor="White"
Text="{Binding Text}" />
</StackLayout>
</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>
</ViewCell>
\ No newline at end of file
......@@ -3,19 +3,19 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="inutralia.CustomCells.TextOutViewCell">
<Grid ColumnSpacing="2" Padding="5">
<Grid ColumnSpacing="2" Padding="15,10,15,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="2"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Frame Grid.Row="0" Grid.Column="1" CornerRadius="15">
<Frame Grid.Row="0" Grid.Column="1" CornerRadius="15" BorderColor="#FFA2C300">
<Frame.HasShadow>
<OnPlatform x:TypeArguments="x:Boolean" Android="true" iOS="True"/>
</Frame.HasShadow>
......@@ -24,10 +24,19 @@
</Frame.BackgroundColor>
<StackLayout>
<Label TextColor="Black" Text="{Binding Text}" />
<Label TextColor="Black"
Text="{Binding Text}" />
</StackLayout>
</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>
</ViewCell>
\ No newline at end of file
......@@ -14,6 +14,7 @@ namespace inutralia.ViewModels
public NewQuestionViewModel()
{
IsBusy = true;
ListMessages = new ObservableRangeCollection<Message>();
......@@ -34,6 +35,8 @@ namespace inutralia.ViewModels
}
});
IsBusy = false;
}
......
......@@ -6,8 +6,7 @@
x:Class="inutralia.Views.Question.NewConsultationView"
x:Name="newConsultationView"
Title="Nueva Consulta"
Icon="Add1"
BackgroundColor="{DynamicResource BasePageColor}"
Icon="Add1"
NavigationPage.HasBackButton="True">
<ContentPage.Resources>
......@@ -17,20 +16,23 @@
</ContentPage.Resources>
<ContentPage.Content>
<Grid RowSpacing="0" ColumnSpacing="0" >
<Grid RowSpacing="0" ColumnSpacing="0" Padding="0,10,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ScrollView>
<ScrollView >
<ListView x:Name="MessagesListView"
ItemTemplate="{StaticResource MessageTemplateSelector}"
ItemsSource="{Binding ListMessages}"
HasUnevenRows="True"
SeparatorVisibility="None"
Footer=""
/>
ItemTemplate="{StaticResource MessageTemplateSelector}"
ItemsSource="{Binding ListMessages}"
ItemTapped="ItemTapped"
BackgroundColor="White"
HasUnevenRows="True"
SeparatorVisibility="None"
CachingStrategy="RecycleElement"
Footer=""/>
</ScrollView>
<StackLayout Orientation="Horizontal" Grid.Row="1" BackgroundColor="White" Padding="0,0,0,10">
......
......@@ -32,6 +32,11 @@ namespace inutralia.Views.Question
//buttonNewQuestion.Clicked += ButtonNewQuestion_Clicked;
}
protected void ItemTapped(object sender, ItemTappedEventArgs e)
{
((ListView)sender).SelectedItem = null;
}
//protected override void 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