Commit 02bb9e5b authored by Alexandre Perraud's avatar Alexandre Perraud

UI : Make shuffle button focusable

parent 572448b0
<?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_shuffle_normal_w.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="13.40099"
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)">
<g
id="g5269"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Roboto;-inkscape-font-specification:Roboto"
transform="translate(-64,740.00002)" />
<path
style="color:#000000;fill:#ff8800;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.50000000000000000;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 5.4375,1032.3622 4,1033.7685 l 5.15625,5.1562 1.4375,-1.4062 -5.15625,-5.1563 z m 9.5625,0 1.78125,1.7813 L 4.5625,1046.3622 4,1046.9247 5.40625,1048.3622 6,1047.7685 l 12.1875,-12.2188 1.8125,1.8125 0,-5 -5,0 z m -0.15625,9.4063 -1.4375,1.4062 3.40625,3.375 -1.8125,1.8125 5,0 0,-5 -1.78125,1.7813 -3.375,-3.375 z"
id="path5005"
inkscape:connector-curvature="0" />
</g>
</svg>
......@@ -14,7 +14,7 @@
id="svg4682"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="ic_shuffle_normal_w.svg"
sodipodi:docname="ic_shuffle_normal.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="13.40099"
inkscape:cx="5.5438471"
inkscape:cy="15.548271"
inkscape:document-units="px"
inkscape:current-layer="layer1"
......@@ -64,7 +64,7 @@
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Roboto;-inkscape-font-specification:Roboto"
transform="translate(-64,740.00002)" />
<path
style="color:#000000;fill:#ff8800;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.50000000000000000;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:0.50000000000000000;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 5.4375,1032.3622 4,1033.7685 l 5.15625,5.1562 1.4375,-1.4062 -5.15625,-5.1563 z m 9.5625,0 1.78125,1.7813 L 4.5625,1046.3622 4,1046.9247 5.40625,1048.3622 6,1047.7685 l 12.1875,-12.2188 1.8125,1.8125 0,-5 -5,0 z m -0.15625,9.4063 -1.4375,1.4062 3.40625,3.375 -1.8125,1.8125 5,0 0,-5 -1.78125,1.7813 -3.375,-3.375 z"
id="path5005"
inkscape:connector-curvature="0" />
......
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_shuffle_normal" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_shuffle_pressed" android:state_focused="true"/>
<item android:drawable="@drawable/ic_shuffle_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_shuffle_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_shuffle_normal_o" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_shuffle_pressed" android:state_focused="true"/>
<item android:drawable="@drawable/ic_shuffle_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_shuffle_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_shuffle_normal_w" android:state_focused="true" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_shuffle_pressed" android:state_focused="true"/>
<item android:drawable="@drawable/ic_shuffle_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/ic_shuffle_normal_w"/>
</selector>
\ No newline at end of file
......@@ -198,7 +198,7 @@
android:contentDescription="@string/shuffle"
android:focusable="true"
android:scaleType="fitXY"
android:src="?attr/ic_shuffle_normal" />
android:src="?attr/ic_shuffle" />
<ImageButton
android:id="@+id/repeat"
......
......@@ -38,8 +38,8 @@
<attr name="ic_repeat" format="reference" />
<attr name="ic_repeat_on" format="reference" />
<attr name="ic_repeat_one" format="reference" />
<attr name="ic_shuffle_normal" format="reference" />
<attr name="ic_shuffle_pressed" format="reference" />
<attr name="ic_shuffle" format="reference" />
<attr name="ic_shuffle_on" format="reference" />
<attr name="ic_audio_player_more" format="reference" />
<attr name="ic_play" format="reference" />
<attr name="ic_pause" format="reference" />
......
......@@ -45,8 +45,8 @@
<item name="ic_repeat">@drawable/ic_repeat</item>
<item name="ic_repeat_on">@drawable/ic_repeat_on</item>
<item name="ic_repeat_one">@drawable/ic_repeat_one</item>
<item name="ic_shuffle_normal">@drawable/ic_shuffle_normal</item>
<item name="ic_shuffle_pressed">@drawable/ic_shuffle_pressed</item>
<item name="ic_shuffle">@drawable/ic_shuffle</item>
<item name="ic_shuffle_on">@drawable/ic_shuffle_on</item>
<item name="ic_audio_player_more">@drawable/ic_more_normal</item>
<item name="ic_play">@drawable/ic_play</item>
<item name="ic_pause">@drawable/ic_pause</item>
......@@ -116,8 +116,8 @@
<item name="ic_repeat">@drawable/ic_repeat_w</item>
<item name="ic_repeat_on">@drawable/ic_repeat_on</item>
<item name="ic_repeat_one">@drawable/ic_repeat_one</item>
<item name="ic_shuffle_normal">@drawable/ic_shuffle_normal_w</item>
<item name="ic_shuffle_pressed">@drawable/ic_shuffle_pressed</item>
<item name="ic_shuffle">@drawable/ic_shuffle_w</item>
<item name="ic_shuffle_on">@drawable/ic_shuffle_on</item>
<item name="ic_audio_player_more">@drawable/ic_more_normal_w</item>
<item name="ic_play">@drawable/ic_play_w</item>
<item name="ic_pause">@drawable/ic_pause_w</item>
......
......@@ -343,9 +343,9 @@ public class AudioPlayer extends Fragment implements IAudioPlayer, View.OnClickL
mHeaderPlayPause.setContentDescription(getString(R.string.play));
}
if (mAudioController.isShuffling()) {
mShuffle.setImageResource(Util.getResourceFromAttribute(act, R.attr.ic_shuffle_pressed));
mShuffle.setImageResource(Util.getResourceFromAttribute(act, R.attr.ic_shuffle_on));
} else {
mShuffle.setImageResource(Util.getResourceFromAttribute(act, R.attr.ic_shuffle_normal));
mShuffle.setImageResource(Util.getResourceFromAttribute(act, R.attr.ic_shuffle));
}
switch(mAudioController.getRepeatType()) {
case None:
......
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