This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport the AudioPreview activity from Music2 to Music
Change-Id: I1e1ec54a4613ef60e9a4539d5c50ed0874764b93
- Loading branch information
Showing
30 changed files
with
638 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-keep class com.android.music.AudioPreview { | ||
public void playPauseClicked(android.view.View); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2008 The Android Open Source Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item android:id="@android:id/background"> | ||
<shape> | ||
<gradient | ||
android:startColor="#3f808080" | ||
android:endColor="#7f000000" | ||
android:angle="270" | ||
/> | ||
</shape> | ||
</item> | ||
|
||
<item android:id="@android:id/secondaryProgress"> | ||
<clip android:drawable="@drawable/panel_now_playing_progress_bg"/> | ||
</item> | ||
|
||
<!-- Can't actually use | ||
android:drawable="@drawable/panel_now_playing_progress_bar" | ||
here, so fake it with a similar looking gradient. | ||
--> | ||
<item android:id="@android:id/progress"> | ||
<clip> | ||
<shape> | ||
<gradient | ||
android:startColor="#ff85d20f" | ||
android:endColor="#ff466607" | ||
android:angle="270" | ||
/> | ||
</shape> | ||
</clip> | ||
</item> | ||
|
||
|
||
|
||
</layer-list> | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2010 The Android Open Source Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_pressed="true" android:drawable="@drawable/btn_playback_small_pressed" /> | ||
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_playback_small_selected" /> | ||
<item android:drawable="@drawable/btn_playback_small_normal" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2008 The Android Open Source Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<!-- This is the thumb on the seek bar. --> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item android:state_pressed="true" | ||
android:state_window_focused="true" | ||
android:drawable="@drawable/now_playing_progress_handle_pressed" /> | ||
|
||
<item android:state_focused="true" | ||
android:state_window_focused="true" | ||
android:drawable="@drawable/now_playing_progress_handle_selected" /> | ||
|
||
<item android:state_selected="true" | ||
android:state_window_focused="true" | ||
android:drawable="@drawable/now_playing_progress_handle_selected" /> | ||
|
||
<item android:drawable="@drawable/now_playing_progress_handle_normal" /> | ||
|
||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2008 The Android Open Source Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="10dip"> | ||
|
||
<ProgressBar android:id="@+id/spinner" | ||
style="?android:attr/progressBarStyleLarge" | ||
android:layout_gravity="center" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" /> | ||
|
||
<TextView android:id="@+id/loading" | ||
android:paddingTop="5dip" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:textSize="14sp" | ||
android:textColor="#ffffffff" /> | ||
|
||
<SeekBar android:id="@+id/progress" | ||
android:background="#000000f0" | ||
android:progressDrawable="@drawable/progress_horizontal" | ||
android:thumb="@drawable/seek_thumb" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingLeft="8dip" | ||
android:paddingRight="8dip" | ||
android:visibility="gone" /> | ||
|
||
<LinearLayout | ||
android:id="@+id/titleandbuttons" | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:visibility="gone" > | ||
|
||
<LinearLayout | ||
android:orientation="vertical" | ||
android:layout_width="0dip" | ||
android:layout_weight="1" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="8dip"> | ||
|
||
<TextView android:id="@+id/line1" | ||
android:paddingTop="5dip" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ellipsize="end" | ||
android:textSize="14sp" | ||
android:textColor="#ffffffff" /> | ||
|
||
<TextView android:id="@+id/line2" | ||
android:paddingTop="5dip" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ellipsize="end" | ||
android:textSize="14sp" | ||
android:textColor="#ffffffff" /> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:orientation="horizontal" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"> | ||
|
||
<ImageButton | ||
android:id="@+id/playpause" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_vertical" | ||
android:layout_marginLeft="16dip" | ||
android:background="@drawable/btn_nowplaying_background_small" | ||
android:src="@drawable/btn_playback_ic_play_small" | ||
android:onClick="playPauseClicked" | ||
/> | ||
|
||
</LinearLayout> | ||
</LinearLayout> | ||
|
||
</LinearLayout> | ||
|
Oops, something went wrong.