Removing hard codded theme references and adding theme variables.

This commit is contained in:
Anonymus Raccoon
2019-06-20 21:08:48 +02:00
parent c70e2495ea
commit 4d1d6234b7
36 changed files with 90 additions and 232 deletions

View File

@@ -60,7 +60,7 @@ namespace Opus.DataStructure
int pathID = cursor.GetColumnIndex(MediaStore.Audio.Media.InterfaceConsts.Data);
int playOrderID = cursor.GetColumnIndex(MediaStore.Audio.Playlists.Members.PlayOrder);
string playOrder = PlaylistTracks.instance != null ? cursor.GetString(playOrderID) : "";
string playOrder = PlaylistTracks.instance != null ? cursor.GetString(playOrderID) : null;
string Artist = cursor.GetString(artistID);
string Title = cursor.GetString(titleID);
string Album = cursor.GetString(albumID);
@@ -75,7 +75,7 @@ namespace Opus.DataStructure
if (Album == null)
Album = "Unknow Album";
return new Song(Title, playOrder, Album, null, AlbumArt, id, path);
return new Song(Title, playOrder ?? Artist, Album, null, AlbumArt, id, path);
}

View File

@@ -80,8 +80,7 @@ namespace Opus
{
base.OnCreate(savedInstanceState);
ISharedPreferences pref = PreferenceManager.GetDefaultSharedPreferences(this);
SwitchTheme(pref.GetInt("theme", 0));
SwitchTheme(GetThemeID(this));
SetContentView(Resource.Layout.Main);
instance = this;
@@ -242,6 +241,28 @@ namespace Opus
HandleIntent(intent);
}
public static int GetThemeID(Context context)
{
ISharedPreferences pref = PreferenceManager.GetDefaultSharedPreferences(context);
return pref.GetInt("theme", 0);
}
public static void SetTheme(Context context)
{
int themeID;
switch (GetThemeID(context))
{
case 0:
default:
themeID = Resource.Style.Theme;
break;
case 1:
themeID = Resource.Style.DarkTheme;
break;
}
context.SetTheme(themeID);
}
public void SwitchTheme(int themeID)
{
Theme = themeID;

View File

@@ -41,14 +41,6 @@ namespace Opus.Adapter
{
SongHolder holder = (SongHolder)viewHolder;
if (MainActivity.Theme == 1)
{
holder.more.SetColorFilter(Color.White);
holder.Title.SetTextColor(Color.White);
holder.Artist.SetTextColor(Color.White);
holder.Artist.Alpha = 0.7f;
}
holder.Title.Text = song.Title;
holder.Artist.Text = song.Artist;

View File

@@ -27,10 +27,6 @@ namespace Opus.Adapter
holder.Progress.Visibility = ViewStates.Visible;
holder.Progress.Indeterminate = true;
holder.Title.Alpha = 1f;
if (MainActivity.Theme == 1)
holder.Title.SetTextColor(Color.White);
else
holder.Title.SetTextColor(Color.Black);
break;
case DownloadState.MetaData:
holder.Status.Text = Downloader.instance.GetString(Resource.String.metadata);
@@ -38,10 +34,6 @@ namespace Opus.Adapter
holder.Progress.Visibility = ViewStates.Visible;
holder.Progress.Indeterminate = true;
holder.Title.Alpha = 1f;
if (MainActivity.Theme == 1)
holder.Title.SetTextColor(Color.White);
else
holder.Title.SetTextColor(Color.Black);
break;
case DownloadState.Playlist:
holder.Status.Text = Downloader.instance.GetString(Resource.String.downloader_playlist);
@@ -49,10 +41,6 @@ namespace Opus.Adapter
holder.Progress.Visibility = ViewStates.Visible;
holder.Progress.Indeterminate = true;
holder.Title.Alpha = 1f;
if (MainActivity.Theme == 1)
holder.Title.SetTextColor(Color.White);
else
holder.Title.SetTextColor(Color.Black);
break;
case DownloadState.Downloading:
holder.Status.Text = Downloader.instance.GetString(Resource.String.downloading_status);
@@ -61,19 +49,11 @@ namespace Opus.Adapter
holder.Title.Alpha = 1f;
holder.Progress.Indeterminate = false;
holder.Progress.Progress = Downloader.queue[position].progress;
if (MainActivity.Theme == 1)
holder.Title.SetTextColor(Color.White);
else
holder.Title.SetTextColor(Color.Black);
break;
case DownloadState.None:
holder.Progress.Visibility = ViewStates.Invisible;
holder.Status.Visibility = ViewStates.Gone;
holder.Title.Alpha = 1f;
if (MainActivity.Theme == 1)
holder.Title.SetTextColor(Color.White);
else
holder.Title.SetTextColor(Color.Black);
break;
case DownloadState.Completed:
holder.Status.Text = Downloader.instance.GetString(Resource.String.completed);
@@ -104,10 +84,6 @@ namespace Opus.Adapter
DownloadQueue.instance.More(tagPosition);
};
}
if (MainActivity.Theme == 1)
holder.more.SetColorFilter(Color.White);
}
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)

View File

@@ -1,6 +1,4 @@
using Android.Content;
using Android.Content.Res;
using Android.Graphics;
using Android.Views;
using Android.Widget;
using Opus.DataStructure;
@@ -13,10 +11,10 @@ namespace Opus.Adapter
{
public int selectedPosition;
private Context context;
private List<Folder> folders;
private readonly Context context;
private readonly List<Folder> folders;
private LayoutInflater inflater;
private int resource;
private readonly int resource;
public FolderAdapter(Context context, int resource, List<Folder> folders) : base(context, resource, folders)
@@ -30,7 +28,7 @@ namespace Opus.Adapter
{
if (inflater == null)
{
inflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService);
inflater = Preferences.instance.LayoutInflater;
}
if (convertView == null)
{
@@ -58,17 +56,6 @@ namespace Opus.Adapter
holder.used.Checked = position == selectedPosition;
holder.used.SetTag(Resource.Id.folderName, position);
if(MainActivity.Theme == 1)
{
holder.Name.SetTextColor(Color.White);
holder.expandChild.SetColorFilter(Color.White);
holder.used.ButtonTintList = ColorStateList.ValueOf(Color.White);
}
else
{
convertView.SetBackgroundColor(Color.White);
}
return convertView;
}
}

View File

@@ -85,9 +85,6 @@ namespace Opus.Adapter
MainActivity.instance.SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, PlaylistTracks.NewInstance(items[position].contentValue, items[position].SectionTitle)).AddToBackStack(null).Commit();
};
}
if (MainActivity.Theme == 1)
holder.ItemView.SetBackgroundColor(Color.Argb(255, 62, 62, 62));
}
else if(items[position].contentType == SectionType.ChannelList)
{
@@ -118,9 +115,6 @@ namespace Opus.Adapter
holder.more.Text = "View More";
}
};
if (MainActivity.Theme == 1)
holder.ItemView.SetBackgroundColor(Color.Argb(255, 62, 62, 62));
}
else if (items[position].contentType == SectionType.PlaylistList)
{
@@ -129,10 +123,6 @@ namespace Opus.Adapter
holder.recycler.SetLayoutManager(new LinearLayoutManager(MainActivity.instance, LinearLayoutManager.Vertical, false));
holder.recycler.SetAdapter(new HomeListAdapter(items[position].playlistContent.GetRange(0, items[position].playlistContent.Count > 4 ? 4 : items[position].playlistContent.Count), holder.recycler));
holder.more.Click += (sender, e) => { MainActivity.instance.FindViewById<BottomNavigationView>(Resource.Id.bottomView).SelectedItemId = Resource.Id.playlistLayout; };
if (MainActivity.Theme == 1)
holder.ItemView.SetBackgroundColor(Color.Argb(255, 62, 62, 62));
}
//else if(items[position].contentType == SectionType.TopicSelector)
//{
@@ -148,16 +138,14 @@ namespace Opus.Adapter
// MainActivity.instance.StartActivity(intent);
// };
// if (MainActivity.Theme == 1)
// holder.ItemView.SetBackgroundColor(Color.Argb(255, 62, 62, 62));
//}
else if (items[position].contentType == SectionType.Shuffle)
{
if (MainActivity.Theme == 1)
((CardView)viewHolder.ItemView).SetCardBackgroundColor(Color.ParseColor("#212121"));
else
((CardView)viewHolder.ItemView).SetCardBackgroundColor(Color.White);
}
//else if (items[position].contentType == SectionType.Shuffle)
//{
// if (MainActivity.Theme == 1)
// ((CardView)viewHolder.ItemView).SetCardBackgroundColor(Color.ParseColor("#212121"));
// else
// ((CardView)viewHolder.ItemView).SetCardBackgroundColor(Color.White);
//}
}
void OnClick(int position)

View File

@@ -60,17 +60,6 @@ namespace Opus.Adapter
holder.RightButtons.FindViewById<ImageButton>(Resource.Id.play).Click += (sender, e) => { PlaylistManager.PlayInOrder(playlists[position]); };
holder.RightButtons.FindViewById<ImageButton>(Resource.Id.shuffle).Click += (sender, e) => { PlaylistManager.Shuffle(playlists[position]); };
}
if(MainActivity.Theme == 1)
{
holder.RightButtons.FindViewById<ImageButton>(Resource.Id.play).ImageTintList = ColorStateList.ValueOf(Color.White);
holder.RightButtons.FindViewById<ImageButton>(Resource.Id.shuffle).ImageTintList = ColorStateList.ValueOf(Color.White);
}
else
{
holder.RightButtons.FindViewById<ImageButton>(Resource.Id.play).ImageTintList = ColorStateList.ValueOf(Color.Black);
holder.RightButtons.FindViewById<ImageButton>(Resource.Id.shuffle).ImageTintList = ColorStateList.ValueOf(Color.Black);
}
}
}

View File

@@ -62,11 +62,6 @@ namespace Opus.Adapter
else if (position == LocalPlaylists.Count + YoutubePlaylists.Count)
{
UslessHolder holder = (UslessHolder)viewHolder;
if (MainActivity.Theme == 1)
((CardView)viewHolder.ItemView).SetCardBackgroundColor(Color.ParseColor("#212121"));
else
((CardView)viewHolder.ItemView).SetCardBackgroundColor(Color.White);
holder.ItemView.FindViewById<ImageView>(Resource.Id.icon).SetImageResource(Resource.Drawable.PlaylistAdd);
holder.ItemView.FindViewById<TextView>(Resource.Id.text).Text = MainActivity.instance.GetString(Resource.String.add_playlist);
@@ -127,21 +122,11 @@ namespace Opus.Adapter
if (LocalPlaylists[position].SyncState == SyncState.Error)
{
holder.sync.Visibility = ViewStates.Visible;
if (MainActivity.Theme == 1)
holder.sync.SetColorFilter(Color.White);
}
else
{
holder.sync.Visibility = ViewStates.Gone;
}
if (MainActivity.Theme == 1)
{
holder.more.SetColorFilter(Color.White);
holder.Line1.SetTextColor(Color.White);
holder.Line2.SetTextColor(Color.White);
holder.Line2.Alpha = 0.7f;
}
}
else if (position > LocalPlaylists.Count && YoutubePlaylists.Count >= position - LocalPlaylists.Count)
{
@@ -168,11 +153,7 @@ namespace Opus.Adapter
}
if (playlist.HasWritePermission)
{
holder.edit.Visibility = ViewStates.Visible;
if (MainActivity.Theme == 1)
holder.edit.SetColorFilter(Color.White);
}
else
holder.edit.Visibility = ViewStates.Gone;
@@ -180,24 +161,18 @@ namespace Opus.Adapter
{
holder.sync.Visibility = ViewStates.Gone;
holder.SyncLoading.Visibility = ViewStates.Visible;
if (MainActivity.Theme == 1)
holder.SyncLoading.IndeterminateTintList = ColorStateList.ValueOf(Color.White);
}
else if (playlist.SyncState == SyncState.True)
{
holder.sync.SetImageResource(Resource.Drawable.Sync);
holder.sync.Visibility = ViewStates.Visible;
holder.SyncLoading.Visibility = ViewStates.Gone;
if (MainActivity.Theme == 1)
holder.sync.SetColorFilter(Color.White);
}
else if (playlist.SyncState == SyncState.Error)
{
holder.sync.SetImageResource(Resource.Drawable.SyncError);
holder.sync.Visibility = ViewStates.Visible;
holder.SyncLoading.Visibility = ViewStates.Gone;
if (MainActivity.Theme == 1)
holder.sync.SetColorFilter(Color.White);
}
else if (playlist.SyncState == SyncState.False)
{
@@ -212,14 +187,6 @@ namespace Opus.Adapter
Playlist.instance.More(holder.AdapterPosition);
};
}
if (MainActivity.Theme == 1)
{
holder.more.SetColorFilter(Color.White);
holder.Title.SetTextColor(Color.White);
holder.Owner.SetTextColor(Color.White);
holder.Owner.Alpha = 0.7f;
}
}
}

View File

@@ -78,14 +78,6 @@ namespace Opus.Adapter
menu.Show();
};
}
if (MainActivity.Theme != 1)
{
header.SetBackgroundColor(Color.Argb(255, 255, 255, 255));
header.FindViewById<ImageButton>(Resource.Id.headerPlay).ImageTintList = ColorStateList.ValueOf(Color.Black);
header.FindViewById<ImageButton>(Resource.Id.headerShuffle).ImageTintList = ColorStateList.ValueOf(Color.Black);
header.FindViewById<ImageButton>(Resource.Id.headerMore).ImageTintList = ColorStateList.ValueOf(Color.Black);
}
}
else if (BaseCount == 0)
{
@@ -149,17 +141,6 @@ namespace Opus.Adapter
MainActivity.instance.contentRefresh.Enabled = false;
};
}
float scale = MainActivity.instance.Resources.DisplayMetrics.Density;
if (MainActivity.Theme == 1)
{
holder.more.SetColorFilter(Color.White);
holder.reorder.SetColorFilter(Color.White);
holder.Title.SetTextColor(Color.White);
holder.Artist.SetTextColor(Color.White);
holder.Artist.Alpha = 0.7f;
}
}
public override Song GetItem(int position)

View File

@@ -44,12 +44,6 @@ namespace Opus.Adapter
if (!convertView.FindViewById<ImageView>(Resource.Id.refine).HasOnClickListeners)
convertView.FindViewById<ImageView>(Resource.Id.refine).Click += (sender, e) => { SearchableActivity.instance.Refine(position); };
if (MainActivity.Theme == 1)
{
convertView.FindViewById<ImageView>(Resource.Id.icon1).SetColorFilter(Color.White);
convertView.FindViewById<ImageView>(Resource.Id.refine).SetColorFilter(Color.White);
}
return convertView;
}
}

View File

@@ -41,14 +41,6 @@ namespace Opus.Adapter
FolderBrowse.instance.More(pos);
};
}
if (MainActivity.Theme == 1)
{
holder.more.SetColorFilter(Color.White);
holder.Line1.SetTextColor(Color.White);
holder.Line2.SetTextColor(Color.White);
holder.Line2.Alpha = 0.7f;
}
}
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)

View File

@@ -55,15 +55,6 @@ namespace Opus.Adapter
else
holder.Live.Visibility = ViewStates.Gone;
if (MainActivity.Theme == 1)
{
holder.more.SetColorFilter(Color.White);
holder.reorder.SetColorFilter(Color.White);
holder.Title.SetTextColor(Color.White);
holder.Artist.SetTextColor(Color.White);
holder.Artist.Alpha = 0.7f;
}
float scale = MainActivity.instance.Resources.DisplayMetrics.Density;
if (position + 1 == items.Count)
{
@@ -100,14 +91,6 @@ namespace Opus.Adapter
YoutubeSearch.instances[0].PlaylistMore(items[tagPosition].playlist);
};
}
if (MainActivity.Theme == 1)
{
holder.more.SetColorFilter(Color.White);
holder.Title.SetTextColor(Color.White);
holder.Owner.SetTextColor(Color.White);
holder.Owner.Alpha = 0.7f;
}
}
else if(items[position].Kind == YtKind.Channel)
{
@@ -124,11 +107,6 @@ namespace Opus.Adapter
YoutubeManager.MixFromChannel(channel.YoutubeID);
};
}
if (MainActivity.Theme == 1)
{
holder.Title.SetTextColor(Color.White);
}
}
else if(items[position].Kind == YtKind.ChannelPreview)
{

View File

@@ -206,8 +206,8 @@ namespace Opus.Fragments
public override void OnViewCreated(View view, Bundle savedInstanceState)
{
if (MainActivity.Theme == 1)
view.SetBackgroundColor(Color.Argb(225, 33, 33, 33));
//if (MainActivity.Theme == 1)
// view.SetBackgroundColor(Color.Argb(225, 33, 33, 33));
base.OnViewCreated(view, savedInstanceState);
}
}

View File

@@ -22,9 +22,7 @@ namespace Opus.Fragments
{
base.OnCreate(savedInstanceState);
if (MainActivity.Theme == 1)
SetTheme(Resource.Style.DarkTheme);
MainActivity.SetTheme(this);
instance = this;
SetContentView(Resource.Layout.DownloadQueue);

View File

@@ -45,9 +45,7 @@ namespace Opus.Fragments
{
base.OnCreate(savedInstanceState);
if(MainActivity.Theme == 1)
SetTheme(Resource.Style.DarkTheme);
MainActivity.SetTheme(this);
SetContentView(Resource.Layout.EditMetaData);
Window.SetStatusBarColor(Color.Argb(70, 00, 00, 00));
@@ -62,12 +60,6 @@ namespace Opus.Fragments
toolbar.Parent.RequestLayout();
toolbar.LayoutParameters.Height = metrics.WidthPixels / 3;
toolbar.RequestLayout();
if (MainActivity.Theme == 1)
{
toolbar.PopupTheme = Resource.Style.DarkPopup;
}
SetSupportActionBar(toolbar);
SupportActionBar.SetDisplayShowTitleEnabled(false);
SupportActionBar.SetDisplayHomeAsUpEnabled(true);

View File

@@ -192,8 +192,6 @@ namespace Opus.Fragments
PlaylistHolder holder = (PlaylistHolder)ListView.GetChildViewHolder(ListView.GetChildAt(LocalPlaylists.Count + YoutubeIndex));
holder.sync.Visibility = ViewStates.Gone;
holder.SyncLoading.Visibility = ViewStates.Visible;
if (MainActivity.Theme == 1)
holder.SyncLoading.IndeterminateTintList = ColorStateList.ValueOf(Color.White);
}
}
@@ -208,8 +206,6 @@ namespace Opus.Fragments
holder.sync.SetImageResource(Resource.Drawable.SyncError);
holder.sync.Visibility = ViewStates.Visible;
holder.SyncLoading.Visibility = ViewStates.Gone;
if (MainActivity.Theme == 1)
holder.sync.SetColorFilter(Color.White);
}
}
}
@@ -231,17 +227,11 @@ namespace Opus.Fragments
Picasso.With(Application.Context).Load(item.ImageURL).Placeholder(Resource.Color.background_material_dark).Resize(400, 400).CenterCrop().Into(holder.AlbumArt);
if (item.HasWritePermission)
{
holder.edit.Visibility = ViewStates.Visible;
if (MainActivity.Theme == 1)
holder.edit.SetColorFilter(Color.White);
}
holder.sync.SetImageResource(Resource.Drawable.Sync);
holder.sync.Visibility = ViewStates.Visible;
holder.SyncLoading.Visibility = ViewStates.Gone;
if (MainActivity.Theme == 1)
holder.sync.SetColorFilter(Color.White);
}
}
@@ -514,8 +504,6 @@ namespace Opus.Fragments
holder.SyncLoading.Visibility = ViewStates.Gone;
holder.sync.SetImageResource(Resource.Drawable.Sync);
holder.sync.Visibility = ViewStates.Visible;
if (MainActivity.Theme == 1)
holder.sync.SetColorFilter(Color.White);
}
}
}

View File

@@ -34,9 +34,7 @@ namespace Opus.Fragments
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
if (MainActivity.Theme == 1)
SetTheme(Resource.Style.DarkPreferences);
MainActivity.SetTheme(this);
SetContentView(Resource.Layout.PreferenceRoot);
toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);
SetSupportActionBar(toolbar);
@@ -232,8 +230,6 @@ namespace Opus.Fragments
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
view = base.OnCreateView(inflater, container, savedInstanceState);
if (MainActivity.Theme == 1)
view.SetBackgroundColor(Color.Argb(225, 33, 33, 33));
return view;
}

View File

@@ -34,9 +34,8 @@ namespace Opus.Fragments
{
instance = this;
base.OnCreate(savedInstanceState);
if (MainActivity.Theme == 1)
SetTheme(Resource.Style.DarkTheme);
MainActivity.SetTheme(this);
SetContentView(Resource.Layout.SearchLayout);
SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
@@ -99,7 +98,7 @@ namespace Opus.Fragments
IMenuItem searchItem = menu.FindItem(Resource.Id.search);
searchItem.ExpandActionView();
searchView = searchItem.ActionView.JavaCast<SearchView>();
//searchView.MaxWidth = int.MaxValue;
searchView.MaxWidth = int.MaxValue;
searchView.QueryHint = GetString(Resource.String.youtube_search);
searchView.QueryTextChange += (s, e) =>
{

View File

@@ -1,6 +1,6 @@
using Android.Content;
using Android.Gms.Auth.Api;
using Android.Gms.Auth.Api.SignIn;
//using Android.Gms.Auth.Api;
//using Android.Gms.Auth.Api.SignIn;
using Android.Gms.Common.Apis;
using Android.Graphics;
using Android.Runtime;
@@ -9,14 +9,14 @@ using Android.Support.V7.Preferences;
using Android.Util;
using Android.Views;
using Android.Widget;
using Google.Apis.YouTube.v3;
//using Google.Apis.YouTube.v3;
using Opus;
using Opus.Api;
//using Opus.Api;
using Opus.Fragments;
using Opus.Others;
using Square.Picasso;
using System;
using System.Threading.Tasks;
//using System.Threading.Tasks;
public class AccountPreference : Preference, IResultCallback
{

View File

@@ -333,6 +333,9 @@ namespace Opus
// aapt resource value: 0x7f010090
public const int background = 2130772112;
// aapt resource value: 0x7f01027f
public const int backgroundAccent = 2130772607;
// aapt resource value: 0x7f010092
public const int backgroundSplit = 2130772114;

View File

@@ -29,6 +29,5 @@
android:layout_toLeftOf="@id/action"
android:paddingLeft="70dp"
android:textSize="14dip"
android:textColor="#000"
android:textStyle="bold" />
</RelativeLayout >

View File

@@ -10,6 +10,7 @@
android:layout_height="wrap_content"
android:src="@drawable/More"
android:background="@null"
android:tint="?iconColor"
android:layout_alignParentRight="true"
android:paddingBottom="10dp"
android:id="@+id/more" />

View File

@@ -15,7 +15,6 @@
android:layout_height="match_parent"
android:id="@+id/collapsingToolbar"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true">
<ImageView
android:layout_width="match_parent"
@@ -28,7 +27,6 @@
android:layout_width="match_parent"
android:id="@+id/backToolbar"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="pin"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>

View File

@@ -5,7 +5,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:elevation="6dp"
android:background="#fafafa"
android:background="?backgroundAccent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">

View File

@@ -26,6 +26,7 @@
android:layout_height="30dp"
android:layout_margin="6dp"
android:src="@drawable/play"
android:tint="?iconColor"
android:background="@null"
android:id="@+id/play" />
<ImageButton
@@ -33,6 +34,7 @@
android:layout_height="30dp"
android:layout_margin="6dp"
android:src="@drawable/shuffle"
android:tint="?iconColor"
android:background="@null"
android:id="@+id/shuffle" />
</LinearLayout>

View File

@@ -5,7 +5,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:elevation="6dp"
android:background="#fafafa"
android:background="?backgroundAccent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">

View File

@@ -5,7 +5,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:elevation="6dp"
android:background="#fafafa"
android:background="?backgroundAccent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">

View File

@@ -28,7 +28,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dip"
android:textColor="#000"
android:ellipsize="end"
android:maxLines="1"
android:textStyle="bold" />
@@ -37,8 +36,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12dip"
android:maxLines="1"
android:textColor="#000" />
android:alpha="0.7"
android:maxLines="1" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
@@ -53,6 +52,7 @@
android:layout_height="30dp"
android:padding="5dp"
android:background="@null"
android:tint="?iconColor"
android:src="@drawable/Edit"
android:visibility="gone" />
<ProgressBar
@@ -63,12 +63,13 @@
android:background="@null"
android:src="@drawable/Sync"
android:indeterminate="true"
android:indeterminateTint="@android:color/black"
android:indeterminateTint="?iconColor"
android:visibility="gone" />
<ImageView
android:id="@+id/sync"
android:layout_width="30dp"
android:layout_height="30dp"
android:tint="?iconColor"
android:padding="5dp"
android:visibility="gone" />
<ImageView
@@ -77,6 +78,7 @@
android:layout_height="30dp"
android:padding="5dp"
android:clickable="true"
android:tint="?iconColor"
android:background="@null"
android:src="@drawable/More"
android:gravity="center_vertical"/>

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:background="#424242"
android:background="?backgroundAccent"
android:id="@+id/playlistHeader"
android:elevation="6dp" >
<TextView
@@ -25,7 +25,7 @@
android:id="@+id/headerPlay"
android:layout_width="60dp"
android:layout_height="60dp"
android:tint="#ffffff"
android:tint="?iconColor"
android:src="@drawable/Play"
android:clickable="true"
android:background="@null" />
@@ -33,7 +33,7 @@
android:id="@+id/headerShuffle"
android:layout_width="60dp"
android:layout_height="60dp"
android:tint="#ffffff"
android:tint="?iconColor"
android:clickable="true"
android:src="@drawable/Shuffle"
android:background="@null"/>
@@ -41,7 +41,7 @@
android:id="@+id/headerMore"
android:layout_width="60dp"
android:layout_height="60dp"
android:tint="#ffffff"
android:tint="?iconColor"
android:clickable="true"
android:src="@drawable/More"
android:background="@null" />

View File

@@ -22,6 +22,6 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="?android:colorBackground"
android:background="?backgroundAccent"
android:id="@android:id/list_container" />
</LinearLayout>

View File

@@ -27,7 +27,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dip"
android:textColor="#000"
android:ellipsize="end"
android:maxLines="1"
android:textStyle="bold" />
@@ -36,8 +35,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12dip"
android:maxLines="1"
android:textColor="#000" />
android:alpha="0.7"
android:maxLines="1" />
<TextView
android:id="@+id/isLive"
android:layout_width="wrap_content"
@@ -75,6 +74,7 @@
android:layout_height="30dp"
android:padding="5dp"
android:background="@null"
android:tint="?iconColor"
android:src="@drawable/PublicIcon"
android:layout_gravity="center_vertical"
android:visibility="gone" />
@@ -85,6 +85,7 @@
android:padding="5dp"
android:clickable="true"
android:visibility="gone"
android:tint="?iconColor"
android:layout_gravity="center_vertical"
android:src="@drawable/Reorder" />
<ImageView
@@ -94,6 +95,7 @@
android:padding="5dp"
android:clickable="true"
android:background="@null"
android:tint="?iconColor"
android:src="@drawable/More"
android:gravity="center_vertical" />
</LinearLayout>

View File

@@ -10,6 +10,7 @@
android:layout_marginLeft="18dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:tint="?iconColor"
android:layout_alignParentStart="true"
android:layout_centerVertical="true" />
<ImageView
@@ -19,6 +20,7 @@
android:layout_marginRight="5dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:tint="?iconColor"
android:src="@drawable/Refine"/>
<TextView
android:id="@+id/text"

View File

@@ -15,7 +15,6 @@
android:id="@+id/line1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000"
android:textSize="16dip"
android:textStyle="bold" />
<TextView
@@ -23,7 +22,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dip"
android:textColor="#000" />
android:alpha="0.7"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
@@ -38,6 +37,7 @@
android:layout_height="30dp"
android:padding="5dp"
android:background="@null"
android:tint="?iconColor"
android:src="@drawable/SyncError"
android:visibility="gone" />
<ImageView
@@ -46,6 +46,7 @@
android:layout_height="30dp"
android:padding="5dp"
android:clickable="true"
android:tint="?iconColor"
android:background="@null"
android:src="@drawable/More" />
</LinearLayout>

View File

@@ -2,6 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?backgroundAccent"
android:id="@+id/folderList">
<LinearLayout
android:orientation="horizontal"
@@ -11,20 +12,20 @@
android:id="@+id/expendChilds"
android:layout_width="36dp"
android:layout_height="36dp"
android:tint="?iconColor"
android:src="@drawable/ArrowDown"
android:layout_alignParentRight="true" />
<TextView
android:id="@+id/folderName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000"
android:textSize="16dip"
android:singleLine="true"
android:ellipsize="marquee" />
</LinearLayout>
<RadioButton
android:id="@+id/folderUsed"
android:buttonTint="@android:color/black"
android:buttonTint="?iconColor"
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_width="wrap_content"

View File

@@ -2,4 +2,5 @@
<resources>
<attr name="defaultColor" format="reference|color" />
<attr name="iconColor" format="reference|color" />
<attr name="backgroundAccent" format="reference|color" />
</resources>

View File

@@ -15,6 +15,7 @@
<item name="android:textColor">#000</item>
<item name="android:textColorPrimary">#000</item>
<item name="defaultColor">#ffffff</item>
<item name="backgroundAccent">#fafafa</item>
</style>
<style name="DarkTheme" parent="Theme.AppCompat">
@@ -30,6 +31,7 @@
<item name="android:textColor">#ffffff</item>
<item name="android:textColorPrimary">#ffffff</item>
<item name="defaultColor">#212121</item>
<item name="backgroundAccent">#424242</item>
</style>
<style name="SplashScreen" parent="DarkTheme">
@@ -57,6 +59,9 @@
<style name="LightPreferences" parent="PreferenceThemeOverlay">
<item name="preferenceCategoryStyle">@style/PreferenceCategoryStyle</item>
<item name="defaultColor">#ffffff</item>
<item name="iconColor">#000</item>
<item name="backgroundAccent">#fafafa</item>
</style>
<style name="DarkPreferences" parent="PreferenceThemeOverlay">
@@ -69,6 +74,9 @@
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentTransitions">true</item>
<item name="defaultColor">#212121</item>
<item name="iconColor">#ffffff</item>
<item name="backgroundAccent">#424242</item>
</style>
<style name="PreferenceCategoryStyle" parent="@style/Preference.Category.Material">