mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Switch map button accoding to map and list
This commit is contained in:
parent
bb47332a37
commit
dc1b04f3ed
13 changed files with 34 additions and 10 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue