Simplify 'Reset all notifications' button.

This commit is contained in:
B. Petersen
2017-04-22 14:36:04 +02:00
parent 1add172770
commit ec29371d3f
12 changed files with 6 additions and 28 deletions
@@ -50,7 +50,6 @@ import com.b44t.ui.Adapters.BaseFragmentAdapter;
import com.b44t.ui.Cells.HeaderCell;
import com.b44t.ui.Cells.ShadowSectionCell;
import com.b44t.ui.Cells.TextCheckCell;
import com.b44t.ui.Cells.TextDetailSettingsCell;
import com.b44t.ui.ActionBar.ActionBar;
import com.b44t.ui.ActionBar.BaseFragment;
import com.b44t.ui.Cells.TextSettingsCell;
@@ -90,10 +89,9 @@ public class SettingsNotificationsActivity extends BaseFragment implements Notif
private final int TYPE_HEADER = 0;
private final int TYPE_CHECK_CELL = 1;
private final int TYPE_TEXTDETAIL = 2;
private final int TYPE_SHADOW = 3;
private final int TYPE_TEXTSETTING = 4;
private final int TYPE_COUNT = 5;
private final int TYPE_SHADOW = 2;
private final int TYPE_TEXTSETTING = 3;
private final int TYPE_COUNT = 4;
@Override
public boolean onFragmentCreate() {
@@ -565,16 +563,6 @@ public class SettingsNotificationsActivity extends BaseFragment implements Notif
} else if (i == inchatSoundRow) {
checkCell.setTextAndCheck(mContext.getString(R.string.InChatSound), preferences.getBoolean("EnableInChatSound", true), true);
}
} else if (type == TYPE_TEXTDETAIL) {
if (view == null) {
view = new TextDetailSettingsCell(mContext);
}
TextDetailSettingsCell textCell = (TextDetailSettingsCell) view;
if (i == resetNotificationsRow) {
textCell.setMultilineDetail(true);
textCell.setTextAndValue(mContext.getString(R.string.Reset), mContext.getString(R.string.ResetAllNotifications), false);
}
} else if (type == TYPE_TEXTSETTING) {
if (view == null) {
view = new TextSettingsCell(mContext);
@@ -648,6 +636,9 @@ public class SettingsNotificationsActivity extends BaseFragment implements Notif
textCell.setTextAndColor(mContext.getString(R.string.LedColor), color, true);
}
}
else if (i == resetNotificationsRow) {
textCell.setText(mContext.getString(R.string.ResetAllNotifications), false);
}
} else if (type == TYPE_SHADOW) {
if (view == null) {
view = new ShadowSectionCell(mContext);
@@ -669,8 +660,6 @@ public class SettingsNotificationsActivity extends BaseFragment implements Notif
} else if ( i == groupSectionRow2 ||
i == inappSectionRow2 || i == otherSectionRow2 ) {
return TYPE_SHADOW;
} else if( i==resetNotificationsRow ){
return TYPE_TEXTDETAIL;
} else {
return TYPE_TEXTSETTING;
}
@@ -78,7 +78,6 @@
<string name="Sound">Nachrichtenton</string>
<string name="InAppNotifications">Bei App im Vordergrund</string>
<string name="Vibrate">Vibrieren</string>
<string name="Reset">Zurücksetzen</string>
<string name="ResetAllNotifications">Mitteilungseinstellungen zurücksetzen</string>
<string name="NotificationsAndSounds">Mitteilungen und Töne</string>
<string name="BlockedContacts">Blockierte Kontakte</string>
@@ -78,7 +78,6 @@
<string name="Sound">Sonido</string>
<string name="InAppNotifications">Notificaciones en la app</string>
<string name="Vibrate">Vibraciones</string>
<string name="Reset">Restablecer</string>
<string name="ResetAllNotifications">Restablecer las notificaciones</string>
<string name="NotificationsAndSounds">Notificaciones y sonidos</string>
<string name="BlockedContacts">Usuarios bloqueados</string>
@@ -75,7 +75,6 @@
<string name="Sound">Son</string>
<string name="InAppNotifications">Notifications dans l\'application</string>
<string name="Vibrate">Vibrer</string>
<string name="Reset">Reinitialiser</string>
<string name="ResetAllNotifications">Réinitialiser les notifications</string>
<string name="NotificationsAndSounds">Notifications et sons</string>
<string name="BlockedContacts">Contacts bloqués</string>
@@ -78,7 +78,6 @@
<string name="Sound">Hang</string>
<string name="InAppNotifications">Alkalmazáson belüli értesítések</string>
<string name="Vibrate">Rezgés</string>
<string name="Reset">Visszaállítás</string>
<string name="ResetAllNotifications">Minden értesítés visszaállítása</string>
<string name="NotificationsAndSounds">Értesítések és hangok</string>
<string name="BlockedContacts">Letiltott partnerek</string>
@@ -77,7 +77,6 @@
<string name="Sound">Suono</string>
<string name="InAppNotifications">Notifiche in-app</string>
<string name="Vibrate">Vibrazione</string>
<string name="Reset">Ripristina</string>
<string name="ResetAllNotifications">Ripristina tutte le notifiche</string>
<string name="NotificationsAndSounds">Notifiche e suoni</string>
<string name="BlockedContacts">Utenti bloccati</string>
@@ -71,7 +71,6 @@
<string name="Sound">>알림음</string>
<string name="InAppNotifications">앱 내 알림</string>
<string name="Vibrate">진동</string>
<string name="Reset">초기화</string>
<string name="ResetAllNotifications">모든 알림 설정 초기화</string>
<string name="NotificationsAndSounds">알림 및 소리</string>
<string name="BlockedContacts">차단 목록</string>
@@ -77,7 +77,6 @@
<string name="Sound">Geluid</string>
<string name="InAppNotifications">In-app meldingen</string>
<string name="Vibrate">Trillen</string>
<string name="Reset">Resetten</string>
<string name="ResetAllNotifications">Meldingen resetten</string>
<string name="NotificationsAndSounds">Meldingen en geluiden</string>
<string name="BlockedContacts">Geblokkeerd</string>
@@ -78,7 +78,6 @@
<string name="Sound">Dźwięki</string>
<string name="InAppNotifications">Powiadomienia w aplikacji</string>
<string name="Vibrate">Wibracje</string>
<string name="Reset">Resetuj</string>
<string name="ResetAllNotifications">Resetuj wszystkie powiadomienia</string>
<string name="NotificationsAndSounds">Powiadomienia i dźwięki</string>
<string name="BlockedContacts">Zablokowane kontakty</string>
@@ -77,7 +77,6 @@
<string name="Sound">Som</string>
<string name="InAppNotifications">Notificações no aplicativo</string>
<string name="Vibrate">Vibrar</string>
<string name="Reset">Limpar</string>
<string name="ResetAllNotifications">Restaurar configurações</string>
<string name="NotificationsAndSounds">Notificações e Sons</string>
<string name="BlockedContacts">Usuários bloqueados</string>
@@ -78,7 +78,6 @@
<string name="Sound">Звук</string>
<string name="InAppNotifications">Уведомления внутри программы</string>
<string name="Vibrate">Вибрировать</string>
<string name="Reset">Сброс</string>
<string name="ResetAllNotifications">Сбросить все уведомления</string>
<string name="NotificationsAndSounds">Уведомления и Звуки</string>
<string name="BlockedContacts">Заблокированные контакты</string>
@@ -78,7 +78,6 @@
<string name="Sound">Sound</string>
<string name="InAppNotifications">In-app notifications</string>
<string name="Vibrate">Vibrate</string>
<string name="Reset">Reset</string>
<string name="ResetAllNotifications">Reset all notifications</string>
<string name="NotificationsAndSounds">Notifications and sounds</string>
<string name="BlockedContacts">Blocked contacts</string>