Commit d9952a7c authored by Alexandre Perraud's avatar Alexandre Perraud

UI : enlightened menu item when selected

parent bb50c4df
......@@ -10,6 +10,7 @@
<attr name="background_actionbar" format="reference|color" />
<attr name="background_menu_divider" format="reference|color" />
<attr name="background_menu" format="reference|color" />
<attr name="background_menu_selected" format="reference|color" />
<attr name="background_header" format="reference|color" />
<attr name="background_player" format="reference|color" />
<attr name="background_playlist" format="reference|color" />
......
......@@ -32,7 +32,8 @@
<item name="background_default_darker">@color/grey100</item>
<item name="background_actionbar">@color/darkorange</item>
<item name="background_menu_divider">@color/background_menu_divider</item>
<item name="background_menu">@color/background_menu</item>
<item name="background_menu">@color/grey200</item>
<item name="background_menu_selected">@color/grey300</item>
<item name="background_player">@color/grey100</item>
<item name="background_playlist">@color/background_playlist</item>
<item name="background_header">@color/background_menu</item>
......@@ -106,6 +107,7 @@
<item name="background_actionbar">@color/grey875</item>
<item name="background_menu_divider">@color/grey1</item>
<item name="background_menu">@color/grey850</item>
<item name="background_menu_selected">@color/grey800</item>
<item name="background_player">@color/grey850</item>
<item name="background_playlist">@color/black2</item>
<item name="background_header">@color/black3</item>
......
......@@ -134,11 +134,14 @@ public class SidebarAdapter extends BaseAdapter {
img.setBounds(0, 0, dp_32, dp_32);
textView.setCompoundDrawables(img, null, null, null);
}
// Set in bold the current item.
if (TextUtils.equals(mCurrentFragmentId,sidebarEntry.id))
// Set in selected the current item.
if (TextUtils.equals(mCurrentFragmentId,sidebarEntry.id)) {
textView.setTypeface(null, Typeface.BOLD);
else
v.setBackgroundColor(Util.getColorFromAttribute(mContext, R.attr.background_menu_selected));
} else {
textView.setTypeface(null, Typeface.NORMAL);
v.setBackgroundColor(Util.getColorFromAttribute(mContext, R.attr.background_menu));
}
return v;
}
......
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