mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-19 00:04:56 +00:00
Added dark theme
This commit is contained in:
parent
68e80e6054
commit
5458acfcad
20
app/src/main/java/org/schabi/newpipe/Themer.java
Normal file
20
app/src/main/java/org/schabi/newpipe/Themer.java
Normal file
@ -0,0 +1,20 @@
|
||||
package org.schabi.newpipe;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Themer extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
|
||||
.getString("theme", "1"), "0")) {
|
||||
setTheme(R.style.DarkTheme);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user