1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-23 03:22:37 +01:00

Added dark theme

This commit is contained in:
59436419 2016-12-31 13:46:52 +05:30
parent 754bd82699
commit 141278e668

View 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);
}
}
}