English 中文(简体)
c) 不工作
原标题:setVolumeControlStream() not working

I m calls set VolumeControlStream (AudioManager.STREAM_MUSIC); in the onCreate ( methods of my three Activities in the application, but no one is working. 事实上,当我要求控制批量时,根本就没有发生。 文件引文如下:

无法保证,硬件数量控制将永远改变这一溪流的数量(例如,如果呼吁正在发出,其下游量可能会改变)。

我申请的都是在背景中玩音乐,并玩一些声音。 为什么不工作? 提前感谢。

最佳回答

如果你凌驾于凯恩(KeyDown)等地方,就确保你确实称之为超级.onKeyDown()以及你不处理或至少处理积层/下钥匙的钥匙,例如,在你看来,子类:

public boolean onKeyDown(int keyCode, KeyEvent event) {
   // do your stuff here...
   if ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)) {
        return super.onKeyUp(keyCode, event);
    }   
    return true;
}
问题回答

暂无回答




相关问题
Moving a control around on the UI

We are developing in C#.Net. We are dynamically changing a .Net control s location based on mouse movement. The control moves on the screen as expected, but, if the mouse moved too quickly strange ...

iPhone MPMoviePlayer obtain buttons view

Can anyone suggest me how to obtain the view that contains all buttons from MPMoviePlayer ? If you don t know, at least how you obtain the main view/window of the MPMoviePlayer. UPDATE: I need to ...

C# Form Problem: new form losing control and randomly hiding

I m encountering strange behavior with forms on a c# 3.5 app. On a button click, my form1 hides itself, creates a new form2, and shows form2. Form1 also contains the event method triggered when ...

Synced Sliders in LabView

In LabView 2009, is there a way to have one control (slider) affect the output and display of another control (slider)? For example, there are two sliders that adjust two separate parameters. I ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Property binding across controls in WPF

I have two UserControls that I want to display in a Window. The value of the property "SelectedItem" of the first UserControl should be set to the second UserControl s "SelectedItem" property. How do ...

热门标签