Merge pull request #1076 from wojcik-online/patch-1
Control media volume with the hardware buttons.
This commit is contained in:
commit
de65d1e1fc
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,7 @@ package org.schabi.newpipe;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.media.AudioManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
@ -96,6 +97,8 @@ public class MainActivity extends AppCompatActivity implements HistoryListener {
|
||||||
initFragments();
|
initFragments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||||
|
|
||||||
setSupportActionBar(findViewById(R.id.toolbar));
|
setSupportActionBar(findViewById(R.id.toolbar));
|
||||||
setupDrawer();
|
setupDrawer();
|
||||||
initHistory();
|
initHistory();
|
||||||
|
|
Loading…
Add table
Reference in a new issue