解决方案 »
- android系统访问web站点出现404的问题
- 关于平板LCD调试的一个问题
- Expandlistview中统计item条目数
- 在做手机微博,遇到一个问题,求解
- 初学者hello world的问题。。。
- getWindow()方法得到的是什么类的对象?
- 一个activity,两个layout,source not found
- 如何在一行TableRow里面如何设置三个选项?
- 如果将一个数据数据通过ContentProvider给其他分享?
- webView打开的页面和手机浏览器打开的不一样
- 求助,eclipse3.5.0 中 wst插件 缺失!用http://download.eclipse.org/release/galileo/又找不到资源!!
- 华为的C8500做开发机怎么样
要用AudioManager.STREAM_MUSIC,不能用AudioManager.STREAM_RING
} else if (v == mVolumeDecrease) {
int index = mAM.getStreamVolume(AudioManager.STREAM_MUSIC) - 1;
if (index < 0) {
index = 0;
}
Log.i(TAG, "index = " + index);
mAM.setStreamVolume(AudioManager.STREAM_MUSIC, index, 0);
mVolume = mAM.getStreamVolume(AudioManager.STREAM_MUSIC);
Log.i(TAG, "down volume is " + mVolume);
mProgressBarVolume.setProgress(mVolume);
} else if (v == mVolumeIncrease) {
int index = mAM.getStreamVolume(AudioManager.STREAM_MUSIC) + 1;
int maxIndex = mAM.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
if (index > maxIndex) {
index = maxIndex;
}
Log.i(TAG, "index = " + index + ", maxIndex = " + maxIndex);
mAM.setStreamVolume(AudioManager.STREAM_MUSIC, index, 0);
mVolume = mAM.getStreamVolume(AudioManager.STREAM_MUSIC);
Log.i(TAG, "up volume is " + mVolume);
mProgressBarVolume.setProgress(mVolume);
}
学习了