Add stop button to remote screen

This commit is contained in:
Synced Synapse 2015-06-22 22:28:55 +01:00
parent 717498b846
commit 38325be14a
3 changed files with 23 additions and 0 deletions

View File

@ -126,6 +126,7 @@ public class RemoteFragment extends Fragment
@InjectView(R.id.details) TextView nowPlayingDetails; @InjectView(R.id.details) TextView nowPlayingDetails;
@InjectView(R.id.play) ImageButton playButton; @InjectView(R.id.play) ImageButton playButton;
@InjectView(R.id.stop) ImageButton stopButton;
@InjectView(R.id.rewind) ImageButton rewindButton; @InjectView(R.id.rewind) ImageButton rewindButton;
@InjectView(R.id.fast_forward) ImageButton fastForwardButton; @InjectView(R.id.fast_forward) ImageButton fastForwardButton;
@ -424,6 +425,12 @@ public class RemoteFragment extends Fragment
action.execute(hostManager.getConnection(), defaultPlaySpeedChangedCallback, callbackHandler); action.execute(hostManager.getConnection(), defaultPlaySpeedChangedCallback, callbackHandler);
} }
@OnClick(R.id.stop)
public void onStopClicked(View v) {
Player.Stop action = new Player.Stop(currentActivePlayerId);
action.execute(hostManager.getConnection(), defaultActionCallback, callbackHandler);
}
/** /**
* Callback for methods that change the play speed * Callback for methods that change the play speed
*/ */

View File

@ -100,6 +100,14 @@
style="@style/Widget.Button.Borderless" style="@style/Widget.Button.Borderless"
android:src="?attr/iconRewind" android:src="?attr/iconRewind"
android:contentDescription="@string/rewind"/> android:contentDescription="@string/rewind"/>
<ImageButton
android:id="@+id/stop"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
style="@style/Widget.Button.Borderless"
android:src="?attr/iconStop"
android:contentDescription="@string/stop"/>
<ImageButton <ImageButton
android:id="@+id/play" android:id="@+id/play"
android:layout_width="0dp" android:layout_width="0dp"

View File

@ -59,6 +59,14 @@
style="@style/Widget.Button.Borderless" style="@style/Widget.Button.Borderless"
android:src="?attr/iconRewind" android:src="?attr/iconRewind"
android:contentDescription="@string/rewind"/> android:contentDescription="@string/rewind"/>
<ImageButton
android:id="@+id/stop"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
style="@style/Widget.Button.Borderless"
android:src="?attr/iconStop"
android:contentDescription="@string/stop"/>
<ImageButton <ImageButton
android:id="@+id/play" android:id="@+id/play"
android:layout_width="0dp" android:layout_width="0dp"