mirror of
https://github.com/gsantner/dandelion
synced 2024-11-24 21:32:07 +01:00
Added missing onClick options to NavSlider settings fragment and added missing license headers
This commit is contained in:
parent
06c8b06feb
commit
fc26af5844
7 changed files with 174 additions and 2 deletions
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
This file is part of the Diaspora for Android.
|
||||||
|
|
||||||
|
Diaspora for Android is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Diaspora for Android is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with the Diaspora for Android.
|
||||||
|
|
||||||
|
If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package com.github.dfa.diaspora_android.activity;
|
package com.github.dfa.diaspora_android.activity;
|
||||||
|
|
||||||
import android.app.AlarmManager;
|
import android.app.AlarmManager;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
This file is part of the Diaspora for Android.
|
||||||
|
|
||||||
|
Diaspora for Android is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Diaspora for Android is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with the Diaspora for Android.
|
||||||
|
|
||||||
|
If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package com.github.dfa.diaspora_android.fragment;
|
package com.github.dfa.diaspora_android.fragment;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
This file is part of the Diaspora for Android.
|
||||||
|
|
||||||
|
Diaspora for Android is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Diaspora for Android is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with the Diaspora for Android.
|
||||||
|
|
||||||
|
If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package com.github.dfa.diaspora_android.fragment;
|
package com.github.dfa.diaspora_android.fragment;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -7,7 +25,6 @@ import android.view.MenuInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
@ -157,6 +174,46 @@ public class SettingsFragment__NavigationSlider extends ThemedSettingsFragment {
|
||||||
checkboxActivities.setChecked(!getAppSettings().isVisibleInNavActivities());
|
checkboxActivities.setChecked(!getAppSettings().isVisibleInNavActivities());
|
||||||
getAppSettings().setVisibleInNavActivities(!getAppSettings().isVisibleInNavActivities());
|
getAppSettings().setVisibleInNavActivities(!getAppSettings().isVisibleInNavActivities());
|
||||||
break;
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_aspects:
|
||||||
|
case R.id.settings_activity__navigation_slider_aspects_checkbox:
|
||||||
|
checkboxAspects.setChecked(!getAppSettings().isVisibleInNavAspects());
|
||||||
|
getAppSettings().setVisibleInNavAspects(!getAppSettings().isVisibleInNavAspects());
|
||||||
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_commented:
|
||||||
|
case R.id.settings_activity__navigation_slider_commented_checkbox:
|
||||||
|
checkboxCommented.setChecked(!getAppSettings().isVisibleInNavCommented());
|
||||||
|
getAppSettings().setVisibleInNavCommented(!getAppSettings().isVisibleInNavCommented());
|
||||||
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_exit:
|
||||||
|
case R.id.settings_activity__navigation_slider_exit_checkbox:
|
||||||
|
checkboxExit.setChecked(!getAppSettings().isVisibleInNavExit());
|
||||||
|
getAppSettings().setVisibleInNavExit(!getAppSettings().isVisibleInNavExit());
|
||||||
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_followed:
|
||||||
|
case R.id.settings_activity__navigation_slider_followed_checkbox:
|
||||||
|
checkboxFollowed.setChecked(!getAppSettings().isVisibleInNavFollowed_tags());
|
||||||
|
getAppSettings().setVisibleInNavFollowedTags(!getAppSettings().isVisibleInNavFollowed_tags());
|
||||||
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_liked:
|
||||||
|
case R.id.settings_activity__navigation_slider_liked_checkbox:
|
||||||
|
checkboxLiked.setChecked(!getAppSettings().isVisibleInNavLiked());
|
||||||
|
getAppSettings().setVisibleInNavLiked(!getAppSettings().isVisibleInNavLiked());
|
||||||
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_mentions:
|
||||||
|
case R.id.settings_activity__navigation_slider_mentions_checkbox:
|
||||||
|
checkboxMentions.setChecked(!getAppSettings().isVisibleInNavMentions());
|
||||||
|
getAppSettings().setVisibleInNavMentions(!getAppSettings().isVisibleInNavMentions());
|
||||||
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_profile:
|
||||||
|
case R.id.settings_activity__navigation_slider_profile_checkbox:
|
||||||
|
checkboxProfile.setChecked(!getAppSettings().isVisibleInNavProfile());
|
||||||
|
getAppSettings().setVisibleInNavProfile(!getAppSettings().isVisibleInNavProfile());
|
||||||
|
break;
|
||||||
|
case R.id.settings_activity__navigation_slider_public:
|
||||||
|
case R.id.settings_activity__navigation_slider_public_checkbox:
|
||||||
|
checkboxPublic.setChecked(!getAppSettings().isVisibleInNavPublic_activities());
|
||||||
|
getAppSettings().setVisibleInNavPublic_activities(!getAppSettings().isVisibleInNavPublic_activities());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
This file is part of the Diaspora for Android.
|
||||||
|
|
||||||
|
Diaspora for Android is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Diaspora for Android is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with the Diaspora for Android.
|
||||||
|
|
||||||
|
If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package com.github.dfa.diaspora_android.fragment;
|
package com.github.dfa.diaspora_android.fragment;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
This file is part of the Diaspora for Android.
|
||||||
|
|
||||||
|
Diaspora for Android is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Diaspora for Android is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with the Diaspora for Android.
|
||||||
|
|
||||||
|
If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package com.github.dfa.diaspora_android.fragment;
|
package com.github.dfa.diaspora_android.fragment;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
This file is part of the Diaspora for Android.
|
||||||
|
|
||||||
|
Diaspora for Android is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Diaspora for Android is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with the Diaspora for Android.
|
||||||
|
|
||||||
|
If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package com.github.dfa.diaspora_android.fragment;
|
package com.github.dfa.diaspora_android.fragment;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
|
@ -1,9 +1,28 @@
|
||||||
|
/*
|
||||||
|
This file is part of the Diaspora for Android.
|
||||||
|
|
||||||
|
Diaspora for Android is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Diaspora for Android is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with the Diaspora for Android.
|
||||||
|
|
||||||
|
If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package com.github.dfa.diaspora_android.fragment;
|
package com.github.dfa.diaspora_android.fragment;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Abstract class of a SettingsFragment that is themed and listens for clicks on views
|
||||||
* Created by vanitas on 16.10.16.
|
* Created by vanitas on 16.10.16.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -17,7 +36,13 @@ public abstract class ThemedSettingsFragment extends ThemedFragment implements V
|
||||||
setOnClickListenersOnViews();
|
setOnClickListenersOnViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void applyColorToViews();
|
/**
|
||||||
|
* Apply current settings to views (like checked checkboxes...)
|
||||||
|
*/
|
||||||
protected abstract void applySettingsToViews();
|
protected abstract void applySettingsToViews();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the onClickListener (normally this) on views.
|
||||||
|
*/
|
||||||
protected abstract void setOnClickListenersOnViews();
|
protected abstract void setOnClickListenersOnViews();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue