本文整理汇总了Java中android.media.VolumeProvider类的典型用法代码示例。如果您正苦于以下问题:Java VolumeProvider类的具体用法?Java VolumeProvider怎么用?Java VolumeProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VolumeProvider类属于android.media包,在下文中一共展示了VolumeProvider类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createVolumeProvider
import android.media.VolumeProvider; //导入依赖的package包/类
public static Object createVolumeProvider(int volumeControl, int maxVolume, int currentVolume, final Delegate delegate) {
return new VolumeProvider(volumeControl, maxVolume, currentVolume) {
public void onSetVolumeTo(int volume) {
delegate.onSetVolumeTo(volume);
}
public void onAdjustVolume(int direction) {
delegate.onAdjustVolume(direction);
}
};
}
示例2: createVolumeProvider
import android.media.VolumeProvider; //导入依赖的package包/类
public static Object createVolumeProvider(int volumeControl, int maxVolume, int currentVolume,
final Delegate delegate) {
return new VolumeProvider(volumeControl, maxVolume, currentVolume) {
@Override
public void onSetVolumeTo(int volume) {
delegate.onSetVolumeTo(volume);
}
@Override
public void onAdjustVolume(int direction) {
delegate.onAdjustVolume(direction);
}
};
}
示例3: setCurrentVolume
import android.media.VolumeProvider; //导入依赖的package包/类
public static void setCurrentVolume(Object volumeProviderObj, int currentVolume) {
((VolumeProvider) volumeProviderObj).setCurrentVolume(currentVolume);
}
示例4: setPlaybackToRemote
import android.media.VolumeProvider; //导入依赖的package包/类
public static void setPlaybackToRemote(Object sessionObj, Object volumeProviderObj) {
((MediaSession) sessionObj).setPlaybackToRemote((VolumeProvider) volumeProviderObj);
}
示例5: setPlaybackToRemote
import android.media.VolumeProvider; //导入依赖的package包/类
public static void setPlaybackToRemote(Object obj, Object obj1)
{
((MediaSession)obj).setPlaybackToRemote((VolumeProvider)obj1);
}
示例6: setCurrentVolume
import android.media.VolumeProvider; //导入依赖的package包/类
public static void setCurrentVolume(Object obj, int i)
{
((VolumeProvider)obj).setCurrentVolume(i);
}
示例7: setPlaybackToRemote
import android.media.VolumeProvider; //导入依赖的package包/类
public static void setPlaybackToRemote(Object sessionObj, Object volumeProviderObj) {
((MediaSession)sessionObj).setPlaybackToRemote((VolumeProvider)volumeProviderObj);
}
示例8: setPlaybackToRemote
import android.media.VolumeProvider; //导入依赖的package包/类
@Override
public void setPlaybackToRemote(VolumeProviderCompat volumeProviderCompat) {
mSession.setPlaybackToRemote((VolumeProvider)volumeProviderCompat.getVolumeProvider());
}