Commit 9574028c authored by Alexandre Perraud's avatar Alexandre Perraud

UI : Make playlist button focussable

parent 1a6e6698
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="24"
id="svg4682"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="ic_playlist_pressed.svg"
inkscape:export-filename="/home/corbax/Dev/android/Icons/Test 1/ic_play_normal.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4684" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.4"
inkscape:cx="12.686704"
inkscape:cy="15.548271"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="960"
inkscape:window-height="1028"
inkscape:window-x="1920"
inkscape:window-y="24"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid3002" />
</sodipodi:namedview>
<metadata
id="metadata4687">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1028.3622)">
<path
style="color:#000000;fill:#ff8800;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 4 5 L 4 7 L 15 7 L 15 5 L 4 5 z M 17 5 L 17 14.0625 C 16.837256 14.029198 16.672589 14 16.5 14 C 15.119288 14 14 15.119288 14 16.5 C 14 17.880712 15.119288 19 16.5 19 C 17.880712 19 19 17.880712 19 16.5 L 19 7 L 21 7 L 21 5 L 19 5 L 17 5 z M 4 9 L 4 11 L 15 11 L 15 9 L 4 9 z M 4 13 L 4 15 L 12 15 L 12 13 L 4 13 z "
transform="translate(0,1028.3622)"
id="path5014" />
</g>
</svg>
......@@ -14,7 +14,7 @@
id="svg4682"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="ic_playlist_pressed.svg"
sodipodi:docname="ic_playlist_normal_o.svg"
inkscape:export-filename="/home/corbax/Dev/android/Icons/Test 1/ic_play_normal.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
......@@ -28,7 +28,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.4"
inkscape:cx="5.5438471"
inkscape:cx="11.972419"
inkscape:cy="15.548271"
inkscape:document-units="px"
inkscape:current-layer="layer1"
......@@ -50,7 +50,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
......@@ -60,7 +60,7 @@
id="layer1"
transform="translate(0,-1028.3622)">
<path
style="color:#000000;fill:#ff8800;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#ffb54c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 4 5 L 4 7 L 15 7 L 15 5 L 4 5 z M 17 5 L 17 14.0625 C 16.837256 14.029198 16.672589 14 16.5 14 C 15.119288 14 14 15.119288 14 16.5 C 14 17.880712 15.119288 19 16.5 19 C 17.880712 19 19 17.880712 19 16.5 L 19 7 L 21 7 L 21 5 L 19 5 L 17 5 z M 4 9 L 4 11 L 15 11 L 15 9 L 4 9 z M 4 13 L 4 15 L 12 15 L 12 13 L 4 13 z "
transform="translate(0,1028.3622)"
id="path5014" />
......
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_playlist_normal" android:state_focused="true" android:state_pressed="false"/>
<item android:drawable="@drawable/ic_playlist_pressed" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_playlist_pressed" android:state_focused="false" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_playlist_normal"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_playlist_normal_o" android:state_focused="true" android:state_pressed="false"/>
<item android:drawable="@drawable/ic_playlist_pressed" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_playlist_pressed" android:state_focused="false" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_playlist_normal_o"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_playlist_normal_w" android:state_focused="true" android:state_pressed="false"/>
<item android:drawable="@drawable/ic_playlist_pressed" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_playlist_pressed" android:state_focused="false" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_playlist_normal_w"/>
</selector>
\ No newline at end of file
......@@ -55,7 +55,7 @@
android:background="#00000000"
android:focusable="true"
android:scaleType="fitXY"
android:src="?attr/ic_playlist_pressed" />
android:src="?attr/ic_playlist_on" />
<ImageButton
android:id="@+id/adv_function"
......
......@@ -33,8 +33,8 @@
<attr name="ic_equalizer_normal_style" format="reference" />
<attr name="ic_down_style" format="reference" />
<attr name="ic_up_style" format="reference" />
<attr name="ic_playlist_normal" format="reference" />
<attr name="ic_playlist_pressed" format="reference" />
<attr name="ic_playlist" format="reference" />
<attr name="ic_playlist_on" format="reference" />
<attr name="ic_repeat_normal" format="reference" />
<attr name="ic_repeat_pressed" format="reference" />
<attr name="ic_repeat_one" format="reference" />
......
......@@ -40,8 +40,8 @@
<item name="list_title">@color/list_title</item>
<item name="android:windowBackground">@color/grey200</item>
<item name="ic_playlist_normal">@drawable/ic_playlist_normal</item>
<item name="ic_playlist_pressed">@drawable/ic_playlist_pressed</item>
<item name="ic_playlist">@drawable/ic_playlist</item>
<item name="ic_playlist_on">@drawable/ic_playlist_on</item>
<item name="ic_repeat_normal">@drawable/ic_repeat_normal</item>
<item name="ic_repeat_pressed">@drawable/ic_repeat_pressed</item>
<item name="ic_repeat_one">@drawable/ic_repeat_one</item>
......@@ -111,8 +111,8 @@
<item name="list_title">@color/bt_list_title</item>
<item name="android:windowBackground">@color/grey900</item>
<item name="ic_playlist_normal">@drawable/ic_playlist_normal_w</item>
<item name="ic_playlist_pressed">@drawable/ic_playlist_pressed</item>
<item name="ic_playlist">@drawable/ic_playlist_w</item>
<item name="ic_playlist_on">@drawable/ic_playlist_on</item>
<item name="ic_repeat_normal">@drawable/ic_repeat_normal_w</item>
<item name="ic_repeat_pressed">@drawable/ic_repeat_pressed</item>
<item name="ic_repeat_one">@drawable/ic_repeat_one</item>
......
......@@ -226,10 +226,10 @@ public class AudioPlayer extends Fragment implements IAudioPlayer, View.OnClickL
mSwitcher.showNext();
if (mSwitcher.getDisplayedChild() == 0)
mPlaylistSwitch.setImageResource(Util.getResourceFromAttribute(getActivity(),
R.attr.ic_playlist_pressed));
R.attr.ic_playlist_on));
else
mPlaylistSwitch.setImageResource(Util.getResourceFromAttribute(getActivity(),
R.attr.ic_playlist_normal));
R.attr.ic_playlist));
}
});
mSongsList.setOnItemClickListener(new OnItemClickListener() {
......
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