RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=1}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2923}"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1583}"
- Source="img_tizen_apps_list_dimmed_check.png"
+ Source="img_apps_list_dimmed_check.png"
Opacity="0"
Scale="0" />
- <Image x:Name="CheckImage"
- RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=0.5853}"
- RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=0.5853}"
- RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.3918}"
- RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.3}"
- Source="ic_apps_launcher_pinmark.png"
+ <Image x:Name="StrokeImage"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Height, Factor=1}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonImage, Property=Width, Factor=1}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.2923}"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.1583}"
+ Source="img_apps_list_stroke.png"
Opacity="0" />
<Grid x:Name="TextArea"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.0936}"
/// </summary>
private int height2 = SizeUtils.GetHeightSize(2);
+ /// <summary>
+ /// 19 px height size
+ /// </summary>
+ private int height19 = SizeUtils.GetHeightSize(19);
+
/// <summary>
/// 28 px height size
/// </summary>
{
ButtonImage.ScaleTo(1.32, 150);
TextArea.TranslateTo(0.0, height28, 150);
- CheckImage.FadeTo((IsChecked) ? 0.99 : 0.0, 150);
+ StrokeImage.FadeTo((IsChecked) ? 0.99 : 0.0, 150);
DimImage.FadeTo((IsChecked) ? 0.99 : 0.0, 150);
DimImage.TranslateTo(0.0, (IsChecked) ? height2 : 0.0, 150);
+ StrokeImage.ScaleTo((IsChecked) ? 1.34 : 0.0, 300);
DimImage.ScaleTo((IsChecked) ? 1.34 : 0.0, 300);
});
}
else
{
- CheckImage.FadeTo((IsChecked) ? 0.99 : 0.0, 300);
+ StrokeImage.FadeTo((IsChecked) ? 0.99 : 0.0, 300);
DimImage.FadeTo((IsChecked) ? 0.99 : 0.0, 300);
DimImage.TranslateTo(0.0, (IsChecked) ? height2 : 0.0, 300);
DimImage.ScaleTo((IsChecked) ? 1.34 : 0.0, 300);
/// <param name="size">IconSize for change scale and position</param>
public void ChangeIconSize(IconSize size)
{
- ButtonImage.ScaleTo((size == IconSize.Normal) ? 1.0 : 1.32, 50);
- ButtonImage.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : height2, 100);
- TextArea.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : height28, 50);
+ ButtonImage.ScaleTo((size == IconSize.Normal) ? 1.0 : 1.32, 167);
+ ButtonImage.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : height2, 167);
+ TextArea.TranslateTo(0.0, (size == IconSize.Normal) ? 0.0 : height19, 167);
}
/// <summary>
/// <param name="isShow">A flag indicates whether the option menu should be showed or not</param>
public void ShowOptionMenu(bool isShow)
{
- ButtonImage.TranslateTo(0, (isShow) ? -height90 : 0, 100);
- TextArea.TranslateTo(0, (isShow) ? -height90 : 0, 100);
+ ButtonImage.ScaleTo((isShow) ? 1 : 1.32, 167);
+ ButtonImage.TranslateTo(0, (isShow) ? -height90 : 0, 334);
+ TextArea.TranslateTo(0, (isShow) ? -height19 : height19, 167);
TextArea.FadeTo((isShow) ? 0.0 : 0.99, 100);
- OptionMenuArea.TranslateTo(0, (isShow) ? -height144 : 0, 100);
+ OptionMenuArea.TranslateTo(0, (isShow) ? -height144 : 0, 334);
OptionMenuPinToggleButton.IsEnabled = (isShow) ? true : false;
OptionMenuDeleteButton.IsEnabled = (isShow) ? true : false;
}
OnFocusedCommand?.Execute("");
- if (!IsShowOptions)
+ if (IsChecked)
{
- ChangeIconSize(IconSize.Focused);
+ DimImage.ScaleTo(1.34, 167);
+ StrokeImage.ScaleTo(1.34, 167);
+ DimImage.TranslateTo(0.0, height2, 167);
}
- if (IsChecked)
+ if (!IsShowOptions)
{
- DimImage.ScaleTo(1.34, 300);
- DimImage.TranslateTo(0.0, height2, 300);
- CheckImage.TranslateTo(0.0, height2, 300);
+ ChangeIconSize(IconSize.Focused);
}
}
if (IsChecked)
{
- DimImage.ScaleTo(1.1, 300);
- DimImage.TranslateTo(0.0, 0.0, 300);
- CheckImage.TranslateTo(0.0, 0.0, 300);
+ DimImage.ScaleTo(1.1, 167);
+ DimImage.TranslateTo(0.0, 0.0, 167);
+ StrokeImage.ScaleTo(1.1, 167);
}
}
}
/// </summary>
public Dictionary<string, string> PinnedApps;
+ public string PinnedAppName;
+ public string UnpinnedAppName;
+
/// <summary>
/// A constructor
/// Initializes installed and pinned app list
selectedApp.IsChecked = false;
selectedApp.IsPinned = false;
PinnedApps.Remove(appID);
+ UnpinnedAppName = selectedApp.CurrentStateDescription.Label;
+ ViewModel.OnPropertyChanged("UnpinnedAppName");
}
else
{
selectedApp.IsChecked = true;
selectedApp.IsPinned = true;
PinnedApps.Add(appID, appID);
+ PinnedAppName = selectedApp.CurrentStateDescription.Label;
+ ViewModel.OnPropertyChanged("PinnedAppName");
}
UpdatePinnedApps();
List<AppShortcutInfo> pinnedAppList = new List<AppShortcutInfo>();
foreach (var item in PinnedApps)
{
- DebuggingUtils.Dbg("Pinned App : " + item.Key);
pinnedAppList.Add(new AppShortcutInfo()
{
AppID = item.Key,
set;
}
+ public string PinnedAppName
+ {
+ get
+ {
+ return appsHolder.PinnedAppName;
+ }
+ }
+
+ public string UnpinnedAppName
+ {
+ get
+ {
+ return appsHolder.UnpinnedAppName;
+ }
+ }
+
/// <summary>
/// A command will be executed if the cancel button in FooterDeleteStatus is clicked
/// </summary>
}
}
+ /// <summary>
+ /// Additional info font size
+ /// </summary>
int addtionalInfoTextSize;
+ /// <summary>
+ /// Additional info font size
+ /// </summary>
public int AddtionalInfoTextSize
{
get
}
}
+ /// <summary>
+ /// Additional info layout's spacing size
+ /// </summary>
+ public int AdditionalInfoSpacing
+ {
+ get
+ {
+ return SizeUtils.GetWidthSize(12);
+ }
+ }
+
/// <summary>
/// Regular text font size
/// </summary>
IsPinAppRequested="{Binding IsPinAppRequested}"
DeletePopupAppLabel="{Binding DeletePopupAppLabel}"
DeletePopupCommand="{Binding DeletePopupCommand}"
- SumOfCheckedApp="{Binding SumOfCheckedApp}">
+ SumOfCheckedApp="{Binding SumOfCheckedApp}"
+ PinnedAppName="{Binding PinnedAppName}"
+ UnpinnedAppName="{Binding UnpinnedAppName}">
<ContentPage.BindingContext>
<ViewModels:MainPageViewModel />
</ContentPage.BindingContext>
Text="APPS"
x:Name="TitleLabel"/>
- <Grid Grid.Row="0" x:Name="AddtionalInfo" IsVisible="false">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50*" />
- <ColumnDefinition Width="389*" />
- <ColumnDefinition Width="122*" />
- <ColumnDefinition Width="389*" />
- <ColumnDefinition Width="50*" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Row="0" Grid.Column="2" x:Name="AdditionalInfoText">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="48*" />
- <ColumnDefinition Width="52*" />
- </Grid.ColumnDefinitions>
- <Label Grid.Row="0" Grid.Column="0" x:Name="AdditionalInfoText1"
- Style="{StaticResource AddionalInfoTextMedium}"
- HorizontalTextAlignment="Center"
- VerticalOptions="CenterAndExpand"
- HorizontalOptions="CenterAndExpand"
- FontSize="{Binding AddtionalInfoTextSize}" />
- <Label Grid.Row="0" Grid.Column="1" x:Name="AdditionalInfoText2"
- Style="{StaticResource AddionalInfoTextLight}"
- HorizontalTextAlignment="Center"
- VerticalOptions="CenterAndExpand"
- HorizontalOptions="CenterAndExpand"
- FontSize="{Binding AddtionalInfoTextSize}" />
- </Grid>
- </Grid>
-
+ <StackLayout Grid.Row="0"
+ x:Name="AddtionalInfo"
+ IsVisible="false"
+ Orientation="Horizontal"
+ HorizontalOptions="CenterAndExpand"
+ Spacing="{Binding AdditionalInfoSpacing}">
+ <Label x:Name="AdditionalInfoText1"
+ Style="{StaticResource AddionalInfoTextMedium}"
+ HorizontalTextAlignment="Center"
+ VerticalOptions="CenterAndExpand"
+ FontSize="{Binding AddtionalInfoTextSize}" />
+ <Label Text="is"
+ Style="{StaticResource AddionalInfoTextLight}"
+ HorizontalTextAlignment="Center"
+ VerticalOptions="CenterAndExpand"
+ FontSize="{Binding AddtionalInfoTextSize}" />
+ <Label x:Name="AdditionalInfoText2"
+ Style="{StaticResource AddionalInfoTextLight}"
+ HorizontalTextAlignment="Center"
+ VerticalOptions="CenterAndExpand"
+ FontSize="{Binding AddtionalInfoTextSize}" />
+ </StackLayout>
<Grid Grid.Row="0" x:Name="Header">
<Grid.RowDefinitions>
private DropdownList sortList;
private Button doneButton;
private Button cancelButton;
+ private static int pinnedAppCount = 0;
/// <summary>
/// SubPanel icon's transition height value when it focused.
set { SetValue(SumOfCheckedAppProperty, value); }
}
+ /// <summary>
+ /// Identifies the PinnedAppName bindable property
+ /// </summary>
+ public static readonly BindableProperty PinnedAppNameProperty = BindableProperty.Create("PinnedAppName", typeof(string), typeof(MainPage), "");
- private async void PlayHideAnimation()
+ /// <summary>
+ /// Gets or sets name of pinned app
+ /// </summary>
+ public string PinnedAppName
+ {
+ get { return (string)GetValue(PinnedAppNameProperty); }
+ set { SetValue(PinnedAppNameProperty, value); }
+ }
+
+ /// <summary>
+ /// Identifies the PinnedAppName bindable property
+ /// </summary>
+ public static readonly BindableProperty UnpinnedAppNameProperty = BindableProperty.Create("UnpinnedAppName", typeof(string), typeof(MainPage), "");
+
+ /// <summary>
+ /// Gets or sets name of unpinned app
+ /// </summary>
+ public string UnpinnedAppName
+ {
+ get { return (string)GetValue(UnpinnedAppNameProperty); }
+ set { SetValue(UnpinnedAppNameProperty, value); }
+ }
+
+ private void PlayHideAnimation()
{
var animation = new Animation();
var headerAnimation = new Animation(v => Header.Opacity = v, 1, 0);
BackKeyInfoImage.HeightRequest = backKeyImageSize;
BackKeyInfo.FontSize = SizeUtils.GetFontSize(28);
BackKeyInfo.Margin = new Thickness(SizeUtils.GetWidthSize(6), 0, 0, 0);
-
+ AdditionalInfoText1.FontSize = SizeUtils.GetFontSize(32);
+ AdditionalInfoText2.FontSize = SizeUtils.GetFontSize(32);
PropertyChanged += MainPagePropertyChanged;
SetCurrentStatus(AppsStatus.Default);
await Task.Delay(1);
AppList.InitializeFocus();
MakeFocusChaining();
+
+ pinnedAppCount = SumOfCheckedApp;
}
private void MakeFocusChaining()
}
else if (e.PropertyName.Equals("SumOfCheckedApp"))
{
- AdditionalInfoText1.Text = SumOfCheckedApp.ToString() + " Apps";
- AdditionalInfoText2.Text = "Checked";
+ if (CurrentStatus == AppsStatus.Pin)
+ {
+ AddtionalInfo.IsVisible = true;
+ TitleLabel.IsVisible = false;
+ if (pinnedAppCount > SumOfCheckedApp)
+ {
+ AdditionalInfoText1.Text = UnpinnedAppName;
+ AdditionalInfoText2.Text = "Unpinned";
+ }
+ else
+ {
+ AdditionalInfoText1.Text = PinnedAppName;
+ AdditionalInfoText2.Text = "Pinned";
+ }
+
+ pinnedAppCount = SumOfCheckedApp;
+ }
}
}
<Content Include="res\img_apps_list_dimmed_85.9.png" />
<Content Include="res\img_apps_list_dimmed_95.9.png" />
<Content Include="res\img_apps_list_dimmed_check.png" />
+ <Content Include="res\img_apps_list_stroke.png" />
<Content Include="res\img_home_list_dimmed_apps_60.png" />
<Content Include="res\img_tizen_apps_list_dimmed.png" />
<Content Include="res\img_tizen_apps_list_dimmed_check.png" />