mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Reorganize preference widgets
// FREEBIE
This commit is contained in:
parent
4828a8a274
commit
e5e0bc2333
@ -2,7 +2,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.ProfilePreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.ProfilePreference
|
||||
android:key="preference_category_profile"/>
|
||||
|
||||
<Preference android:key="preference_category_sms_mms"
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:key="pref_theme"
|
||||
android:title="@string/preferences__theme"
|
||||
android:entries="@array/pref_theme_entries"
|
||||
android:entryValues="@array/pref_theme_values"
|
||||
android:defaultValue="light">
|
||||
</org.thoughtcrime.securesms.preferences.SignalListPreference>
|
||||
</org.thoughtcrime.securesms.preferences.widgets.SignalListPreference>
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:key="pref_language"
|
||||
android:title="@string/preferences__language"
|
||||
android:entries="@array/language_entries"
|
||||
|
@ -30,13 +30,13 @@
|
||||
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
||||
|
||||
<PreferenceCategory android:title="@string/preferences_chats__chats">
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:key="pref_message_body_text_size"
|
||||
android:title="@string/preferences_chats__message_text_size"
|
||||
android:entries="@array/pref_message_font_size_entries"
|
||||
android:entryValues="@array/pref_message_font_size_values"
|
||||
android:defaultValue="16">
|
||||
</org.thoughtcrime.securesms.preferences.SignalListPreference>
|
||||
</org.thoughtcrime.securesms.preferences.widgets.SignalListPreference>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
|
@ -9,7 +9,7 @@
|
||||
android:title="@string/preferences__notifications"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalRingtonePreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalRingtonePreference
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_ringtone"
|
||||
android:title="@string/preferences__sound"
|
||||
@ -22,7 +22,7 @@
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preferences__vibrate"/>
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.LEDColorListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.LEDColorListPreference
|
||||
android:key="pref_led_color"
|
||||
android:defaultValue="blue"
|
||||
android:title="@string/preferences__led_color"
|
||||
@ -30,7 +30,7 @@
|
||||
android:entries="@array/pref_led_color_entries"
|
||||
android:entryValues="@array/pref_led_color_values" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:key="pref_led_blink"
|
||||
android:defaultValue="500,2000"
|
||||
android:title="@string/preferences__pref_led_blink_title"
|
||||
@ -44,7 +44,7 @@
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:key="pref_repeat_alerts"
|
||||
android:defaultValue="0"
|
||||
android:title="@string/preferences__repeat_alerts"
|
||||
@ -52,7 +52,7 @@
|
||||
android:entries="@array/pref_repeat_alerts_entries"
|
||||
android:entryValues="@array/pref_repeat_alerts_values" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:key="pref_notification_privacy"
|
||||
android:title="@string/preferences_notifications__show"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
@ -60,7 +60,7 @@
|
||||
android:entries="@array/pref_notification_privacy_entries"
|
||||
android:entryValues="@array/pref_notification_privacy_values"/>
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:key="pref_notification_priority"
|
||||
android:title="@string/preferences_notifications__priority"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:disableDependentsState="true"
|
||||
android:persistent="false" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalRingtonePreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalRingtonePreference
|
||||
android:dependency="pref_key_recipient_mute"
|
||||
android:key="pref_key_recipient_ringtone"
|
||||
android:title="@string/recipient_preferences__notification_sound"
|
||||
@ -19,7 +19,7 @@
|
||||
android:showDefault="true"
|
||||
android:persistent="false"/>
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
|
||||
android:dependency="pref_key_recipient_mute"
|
||||
android:key="pref_key_recipient_vibrate"
|
||||
android:title="@string/recipient_preferences__vibrate"
|
||||
@ -28,7 +28,7 @@
|
||||
android:defaultValue="0"
|
||||
android:persistent="false"/>
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.ColorPickerPreference
|
||||
<org.thoughtcrime.securesms.preferences.widgets.ColorPickerPreference
|
||||
android:key="pref_key_recipient_color"
|
||||
android:title="@string/recipient_preferences__color"
|
||||
android:defaultValue="@android:color/black"
|
||||
|
@ -25,8 +25,6 @@ import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Build.VERSION;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
@ -34,7 +32,6 @@ import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.graphics.drawable.DrawableCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
@ -43,7 +40,7 @@ import org.thoughtcrime.securesms.preferences.AppProtectionPreferenceFragment;
|
||||
import org.thoughtcrime.securesms.preferences.AppearancePreferenceFragment;
|
||||
import org.thoughtcrime.securesms.preferences.CorrectedPreferenceFragment;
|
||||
import org.thoughtcrime.securesms.preferences.NotificationsPreferenceFragment;
|
||||
import org.thoughtcrime.securesms.preferences.ProfilePreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.ProfilePreference;
|
||||
import org.thoughtcrime.securesms.preferences.SmsMmsPreferenceFragment;
|
||||
import org.thoughtcrime.securesms.preferences.ChatsPreferenceFragment;
|
||||
import org.thoughtcrime.securesms.service.KeyCachingService;
|
||||
|
@ -47,8 +47,8 @@ import org.thoughtcrime.securesms.database.RecipientDatabase.VibrateState;
|
||||
import org.thoughtcrime.securesms.database.loaders.ThreadMediaLoader;
|
||||
import org.thoughtcrime.securesms.jobs.MultiDeviceBlockedUpdateJob;
|
||||
import org.thoughtcrime.securesms.jobs.MultiDeviceContactUpdateJob;
|
||||
import org.thoughtcrime.securesms.preferences.AdvancedRingtonePreference;
|
||||
import org.thoughtcrime.securesms.preferences.ColorPickerPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.AdvancedRingtonePreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.ColorPickerPreference;
|
||||
import org.thoughtcrime.securesms.preferences.CorrectedPreferenceFragment;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientModifiedListener;
|
||||
|
@ -12,7 +12,7 @@ import android.text.TextUtils;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.database.RecipientDatabase;
|
||||
import org.thoughtcrime.securesms.preferences.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
|
@ -7,7 +7,7 @@ import android.graphics.BitmapFactory;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.database.RecipientDatabase;
|
||||
import org.thoughtcrime.securesms.preferences.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
|
||||
public class FailedNotificationBuilder extends AbstractNotificationBuilder {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import android.support.v4.app.NotificationCompat;
|
||||
|
||||
import org.thoughtcrime.securesms.ConversationListActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.preferences.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
|
@ -9,7 +9,7 @@ import android.support.v4.app.NotificationCompat;
|
||||
import org.thoughtcrime.securesms.ConversationListActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.database.RecipientDatabase;
|
||||
import org.thoughtcrime.securesms.preferences.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
public class PendingMessageNotificationBuilder extends AbstractNotificationBuilder {
|
||||
|
@ -24,7 +24,7 @@ import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader;
|
||||
import org.thoughtcrime.securesms.mms.Slide;
|
||||
import org.thoughtcrime.securesms.mms.SlideDeck;
|
||||
import org.thoughtcrime.securesms.preferences.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.BitmapUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
@ -8,6 +8,10 @@ import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
import android.view.View;
|
||||
|
||||
import org.thoughtcrime.securesms.components.CustomDefaultPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.ColorPickerPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.ColorPickerPreferenceDialogFragmentCompat;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.RingtonePreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.RingtonePreferenceDialogFragmentCompat;
|
||||
|
||||
public abstract class CorrectedPreferenceFragment extends PreferenceFragmentCompat {
|
||||
|
||||
|
@ -12,12 +12,12 @@ import android.support.v7.preference.ListPreference;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.notifications.MessageNotifier;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.AdvancedRingtonePreference;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragment {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
@ -11,7 +11,6 @@ import android.support.v7.preference.DialogPreference;
|
||||
import android.support.v7.preference.PreferenceViewHolder;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.takisoft.colorpicker.ColorPickerDialog;
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.GradientDrawable;
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
public class NotificationPrivacyPreference {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
|
||||
import android.content.Context;
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
@ -15,8 +15,6 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.content.res.TypedArrayUtils;
|
||||
import android.support.v7.preference.DialogPreference;
|
||||
import android.support.v7.preference.Preference;
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
|
||||
import android.Manifest;
|
@ -1,4 +1,4 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
|
||||
import android.content.Context;
|
@ -1,13 +1,11 @@
|
||||
package org.thoughtcrime.securesms.preferences;
|
||||
package org.thoughtcrime.securesms.preferences.widgets;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.preference.RingtonePreference;
|
||||
import android.support.annotation.RequiresApi;
|
||||
import android.support.v7.preference.PreferenceViewHolder;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
@ -15,7 +15,7 @@ import android.util.Log;
|
||||
import com.h6ah4i.android.compat.content.SharedPreferenceCompat;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.preferences.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
Loading…
Reference in New Issue
Block a user