Switch map button accoding to map and list

This commit is contained in:
Neslihan 2017-05-14 15:51:50 +03:00
parent bb47332a37
commit dc1b04f3ed
13 changed files with 34 additions and 10 deletions

View file

@ -6,16 +6,17 @@ import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
public class BaseActivity extends AppCompatActivity {
boolean currentTheme;
@Override
protected void onCreate(Bundle savedInstanceState) {
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("theme",true)) {
if(Utils.isDarkTheme(this)){
currentTheme = true;
setTheme(R.style.DarkAppTheme);
}else {
} else {
currentTheme = false;
setTheme(R.style.LightAppTheme); // default
}