display replay gain values in extended song infos
This commit is contained in:
parent
abc7941daa
commit
ca28633e6a
@ -98,6 +98,13 @@ THE SOFTWARE.
|
||||
android:gravity="right" />
|
||||
<TextView android:id="@+id/format" />
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:text="@string/_replaygain"
|
||||
android:paddingRight="5dip"
|
||||
android:gravity="right" />
|
||||
<TextView android:id="@+id/replaygain" />
|
||||
</TableRow>
|
||||
<LinearLayout android:id="@+id/controls_top">
|
||||
<TextView
|
||||
android:id="@+id/elapsed"
|
||||
|
@ -49,7 +49,7 @@ THE SOFTWARE.
|
||||
<string name="_artist">artist</string>
|
||||
<string name="_album">album</string>
|
||||
<string name="_year">year</string>
|
||||
|
||||
<string name="_replaygain">rgain</string>
|
||||
<!-- New Playlist Dialog -->
|
||||
<string name="choose_playlist_name">Choose Playlist Name</string>
|
||||
<string name="create">Create</string>
|
||||
|
@ -113,6 +113,8 @@ public class FullPlaybackActivity extends PlaybackActivity
|
||||
private TextView mComposerView;
|
||||
private String mFormat;
|
||||
private TextView mFormatView;
|
||||
private String mReplayGain;
|
||||
private TextView mReplayGainView;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle)
|
||||
@ -184,6 +186,7 @@ public class FullPlaybackActivity extends PlaybackActivity
|
||||
mYearView = (TextView)findViewById(R.id.year);
|
||||
mComposerView = (TextView)findViewById(R.id.composer);
|
||||
mFormatView = (TextView)findViewById(R.id.format);
|
||||
mReplayGainView = (TextView)findViewById(R.id.replaygain);
|
||||
|
||||
mShuffleButton = (ImageButton)findViewById(R.id.shuffle);
|
||||
mShuffleButton.setOnClickListener(this);
|
||||
@ -534,7 +537,8 @@ public class FullPlaybackActivity extends PlaybackActivity
|
||||
mYear = null;
|
||||
mComposer = null;
|
||||
mFormat = null;
|
||||
|
||||
mReplayGain = null;
|
||||
|
||||
if(song != null) {
|
||||
|
||||
MediaMetadataRetriever data = new MediaMetadataRetriever();
|
||||
@ -571,6 +575,10 @@ public class FullPlaybackActivity extends PlaybackActivity
|
||||
sb.append("kbps");
|
||||
}
|
||||
mFormat = sb.toString();
|
||||
|
||||
float[] rg = PlaybackService.get(this).getReplayGainValues(song.path);
|
||||
mReplayGain = "track="+rg[0]+"dB, album="+rg[1]+"dB";
|
||||
|
||||
data.release();
|
||||
}
|
||||
|
||||
@ -639,6 +647,7 @@ public class FullPlaybackActivity extends PlaybackActivity
|
||||
mYearView.setText(mYear);
|
||||
mComposerView.setText(mComposer);
|
||||
mFormatView.setText(mFormat);
|
||||
mReplayGainView.setText(mReplayGain);
|
||||
break;
|
||||
}
|
||||
case MSG_UPDATE_POSITION:
|
||||
|
Loading…
x
Reference in New Issue
Block a user