Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FiredTVLauncher/FiredTVLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<AndroidApplication>True</AndroidApplication>
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
<AssemblyName>FiredTVLauncher</AssemblyName>
<TargetFrameworkVersion>v4.4</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.2</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
23 changes: 11 additions & 12 deletions FiredTVLauncher/Resources/Resource.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions FiredTVLauncher/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,20 @@ ISharedPreferencesEditor editPrefs ()
return prefs.Edit ();
}

/**
* Return the default wallpaper path
*/
public static string GetWallpaperPath()
{
var path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
return System.IO.Path.Combine(path, "wallpaper.png");
}


public static string GetWallpaperFilename()
{
try {
var path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
var filename = System.IO.Path.Combine(path, "wallpaper.png");
try {
var filename = Settings.GetWallpaperPath();

if (File.Exists (filename))
return filename;
Expand Down
16 changes: 9 additions & 7 deletions FiredTVLauncher/SettingsActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,22 @@ protected override void OnCreate (Bundle bundle)
prefWallpaperUrl.PreferenceChange += (sender, e) => {
AndHUD.Shared.Show(this, "Downloading Wallpaper...");

var url = prefWallpaperUrl.EditText.Text;
var url = prefWallpaperUrl.EditText.Text;

Task.Factory.StartNew (() => {
if(url.IndexOf("http://") == -1){
url = string.Concat("http://",url);
}

Task.Run (() => {
try {
var http = new System.Net.WebClient ();
var bytes = http.DownloadData (url);
var filename = Settings.GetWallpaperFilename ();
var http = new System.Net.WebClient();
var bytes = http.DownloadData(url);
var filename = Settings.GetWallpaperPath();
System.IO.File.WriteAllBytes (filename, bytes);
} catch (Exception ex) {

Settings.Instance.WallpaperUrl = string.Empty;

Toast.MakeText (this, "Failed to Download Wallpaper", ToastLength.Long).Show ();
//Toast.MakeText (this, "Failed to Download Wallpaper", ToastLength.Long).Show ();
Log.Error ("Downloading Wallpaper Failed", ex);
}

Expand Down
2 changes: 1 addition & 1 deletion Launchers.Common/AppInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Drawable GetIcon (Context context, Dictionary<string, int> overrideIcons
Drawable icon = null;

var metrics = new List<DisplayMetricsDensity> {
DisplayMetricsDensity.Xxxhigh,
//DisplayMetricsDensity.Xxxhigh,
DisplayMetricsDensity.Xxhigh,
DisplayMetricsDensity.Xhigh,
DisplayMetricsDensity.Tv
Expand Down
2 changes: 1 addition & 1 deletion Launchers.Common/Launchers.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
<AssemblyName>Launchers.Common</AssemblyName>
<TargetFrameworkVersion>v4.3</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
20 changes: 10 additions & 10 deletions Launchers.Common/Resources/Resource.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.