Add some suggestions from lint

This commit is contained in:
Christopher Eby 2012-01-22 00:27:22 -06:00
parent a46a1ad0a6
commit 5b69fef3f0
13 changed files with 89 additions and 54 deletions

View File

@ -73,7 +73,8 @@ THE SOFTWARE.
android:src="@drawable/play"
android:padding="5dip"
android:background="@null"
android:scaleType="centerInside" />
android:scaleType="centerInside"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:adjustViewBounds="true"
@ -82,5 +83,6 @@ THE SOFTWARE.
android:padding="5dip"
android:src="@drawable/next"
android:background="@null"
android:scaleType="centerInside" />
android:scaleType="centerInside"
android:contentDescription="@string/next_song" />
</LinearLayout>

View File

@ -79,7 +79,8 @@ THE SOFTWARE.
android:src="@drawable/play"
android:padding="5dip"
android:background="@null"
android:scaleType="centerInside" />
android:scaleType="centerInside"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:adjustViewBounds="true"
@ -89,6 +90,7 @@ THE SOFTWARE.
android:padding="5dip"
android:src="@drawable/next"
android:background="@null"
android:scaleType="centerInside" />
android:scaleType="centerInside"
android:contentDescription="@string/next_song" />
</LinearLayout>
</LinearLayout>

View File

@ -88,7 +88,8 @@ THE SOFTWARE.
android:background="@null"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1" />
android:layout_weight="1"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:adjustViewBounds="true"
@ -97,7 +98,8 @@ THE SOFTWARE.
android:background="@null"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1" />
android:layout_weight="1"
android:contentDescription="@string/next_song" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

View File

@ -64,43 +64,48 @@ THE SOFTWARE.
android:orientation="horizontal">
<ImageButton
android:id="@+id/shuffle"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/shuffle_inactive" />
android:src="@drawable/shuffle_inactive"
android:contentDescription="@string/cycle_shuffle_mode" />
<ImageButton
android:id="@+id/previous"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/previous" />
android:src="@drawable/previous"
android:contentDescription="@string/previous_song" />
<ImageButton
android:id="@+id/play_pause"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/play" />
android:src="@drawable/play"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/next" />
android:src="@drawable/next"
android:contentDescription="@string/next_song" />
<ImageButton
android:id="@+id/end_action"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/repeat_inactive" />
android:src="@drawable/repeat_inactive"
android:contentDescription="@string/cycle_repeat_mode" />
</LinearLayout>
</merge>

View File

@ -96,43 +96,48 @@ THE SOFTWARE.
android:orientation="horizontal">
<ImageButton
android:id="@+id/shuffle"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/shuffle_inactive" />
android:src="@drawable/shuffle_inactive"
android:contentDescription="@string/cycle_shuffle_mode" />
<ImageButton
android:id="@+id/previous"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/previous" />
android:src="@drawable/previous"
android:contentDescription="@string/previous_song" />
<ImageButton
android:id="@+id/play_pause"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/play" />
android:src="@drawable/play"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/next" />
android:src="@drawable/next"
android:contentDescription="@string/next_song" />
<ImageButton
android:id="@+id/end_action"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/repeat_inactive" />
android:src="@drawable/repeat_inactive"
android:contentDescription="@string/cycle_repeat_mode" />
</LinearLayout>
</merge>

View File

@ -69,7 +69,8 @@ THE SOFTWARE.
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@null"
android:src="@drawable/close" />
android:src="@drawable/close"
android:contentDescription="@string/clear_search" />
</LinearLayout>
</LinearLayout>

View File

@ -70,7 +70,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/shuffle_inactive" />
android:src="@drawable/shuffle_inactive"
android:contentDescription="@string/cycle_shuffle_mode" />
<ImageButton
android:id="@+id/previous"
android:layout_height="fill_parent"
@ -78,7 +79,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/previous" />
android:src="@drawable/previous"
android:contentDescription="@string/previous_song" />
<ImageButton
android:id="@+id/play_pause"
android:layout_height="fill_parent"
@ -86,7 +88,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/play" />
android:src="@drawable/play"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:layout_height="fill_parent"
@ -94,7 +97,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/next" />
android:src="@drawable/next"
android:contentDescription="@string/next_song" />
<ImageButton
android:id="@+id/end_action"
android:layout_height="fill_parent"
@ -102,7 +106,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/repeat_inactive" />
android:src="@drawable/repeat_inactive"
android:contentDescription="@string/cycle_repeat_mode" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -38,43 +38,48 @@ THE SOFTWARE.
android:orientation="horizontal">
<ImageButton
android:id="@+id/shuffle"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/shuffle_inactive" />
android:src="@drawable/shuffle_inactive"
android:contentDescription="@string/cycle_shuffle_mode" />
<ImageButton
android:id="@+id/previous"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/previous" />
android:src="@drawable/previous"
android:contentDescription="@string/previous_song" />
<ImageButton
android:id="@+id/play_pause"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/play" />
android:src="@drawable/play"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/next" />
android:src="@drawable/next"
android:contentDescription="@string/next_song" />
<ImageButton
android:id="@+id/end_action"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_width="0px"
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/repeat_inactive" />
android:src="@drawable/repeat_inactive"
android:contentDescription="@string/cycle_repeat_mode" />
</LinearLayout>
</LinearLayout>

View File

@ -53,7 +53,8 @@ THE SOFTWARE.
android:background="@null"
android:layout_height="0px"
android:layout_width="fill_parent"
android:layout_weight="1" />
android:layout_weight="1"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:adjustViewBounds="true"
@ -61,6 +62,7 @@ THE SOFTWARE.
android:background="@null"
android:layout_height="0px"
android:layout_width="fill_parent"
android:layout_weight="1" />
android:layout_weight="1"
android:contentDescription="@string/next_song" />
</LinearLayout>
</RelativeLayout>

View File

@ -68,7 +68,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/shuffle_inactive" />
android:src="@drawable/shuffle_inactive"
android:contentDescription="@string/cycle_shuffle_mode" />
<ImageButton
android:id="@+id/previous"
android:adjustViewBounds="true"
@ -77,7 +78,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/previous" />
android:src="@drawable/previous"
android:contentDescription="@string/previous_song" />
<ImageButton
android:id="@+id/play_pause"
android:adjustViewBounds="true"
@ -86,7 +88,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/play" />
android:src="@drawable/play"
android:contentDescription="@string/play_pause" />
<ImageButton
android:id="@+id/next"
android:adjustViewBounds="true"
@ -95,7 +98,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/next" />
android:src="@drawable/next"
android:contentDescription="@string/next_song" />
<ImageButton
android:id="@+id/end_action"
android:adjustViewBounds="true"
@ -104,7 +108,8 @@ THE SOFTWARE.
android:layout_weight="1"
android:background="@null"
android:scaleType="fitCenter"
android:src="@drawable/repeat_inactive" />
android:src="@drawable/repeat_inactive"
android:contentDescription="@string/cycle_repeat_mode" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

View File

@ -43,8 +43,8 @@ THE SOFTWARE.
<string name="play">Spill</string>
<string name="edit">Endre</string>
<string name="rename">Gi nytt navn</string>
<string name="add_to_playlist">Legg til spilleliste...</string>
<string name="new_playlist">Ny Spilleliste...</string>
<string name="add_to_playlist">Legg til spilleliste</string>
<string name="new_playlist">Ny Spilleliste</string>
<string name="expand">Utvid</string>
<string name="delete">Slett</string>
<string name="playback_view">Spilles Nå</string>

View File

@ -53,8 +53,8 @@ THE SOFTWARE.
<string name="play">Play</string>
<string name="edit">Edit</string>
<string name="rename">Rename</string>
<string name="add_to_playlist">Add to Playlist...</string>
<string name="new_playlist">New Playlist...</string>
<string name="add_to_playlist">Add to Playlist</string>
<string name="new_playlist">New Playlist</string>
<string name="expand">Expand</string>
<string name="delete">Delete</string>
<string name="playback_view">Now Playing</string>
@ -62,6 +62,7 @@ THE SOFTWARE.
<string name="search">Search</string>
<string name="done">Done</string>
<string name="remove">Remove</string>
<string name="clear_search">Clear search</string>
<plurals name="playing">
<item quantity="one">1 song playing.</item>

View File

@ -194,7 +194,7 @@ public class PlaylistActivity extends Activity
Intent intent = new Intent();
intent.putExtra("id", info.id);
intent.putExtra("position", info.position);
intent.putExtra("audioId", (Long)((MediaView)info.targetView).getTag());
intent.putExtra("audioId", (Long)info.targetView.getTag());
menu.add(0, MENU_PLAY, 0, R.string.play).setIntent(intent);
menu.add(0, MENU_PLAY_ALL, 0, R.string.play_all).setIntent(intent);