mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 19:37:36 +00:00
Update to V7 PreferencesCompat library
// FREEBIE
This commit is contained in:
13
res/drawable/colorpickerpreference_pref_swatch.xml
Normal file
13
res/drawable/colorpickerpreference_pref_swatch.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" />
|
10
res/drawable/ic_add.xml
Normal file
10
res/drawable/ic_add.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?colorAccent"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
||||
</vector>
|
45
res/layout/add_ringtone_item.xml
Normal file
45
res/layout/add_ringtone_item.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:srcCompat="@drawable/ic_add" />
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/add_ringtone_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="20dp"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="3"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:paddingEnd="?dialogPreferredPadding"
|
||||
android:paddingRight="?dialogPreferredPadding"
|
||||
android:text="@string/RingtonePreference_add_ringtone_text"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?colorAccent" />
|
||||
</LinearLayout>
|
7
res/layout/preference_widget_color_swatch.xml
Normal file
7
res/layout/preference_widget_color_swatch.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/color_picker_widget"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
@@ -133,14 +133,12 @@
|
||||
<item>@string/preferences__fast</item>
|
||||
<item>@string/preferences__normal</item>
|
||||
<item>@string/preferences__slow</item>
|
||||
<item>@string/preferences__custom</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_led_blink_pattern_values" translatable="false">
|
||||
<item>300,300</item>
|
||||
<item>500,2000</item>
|
||||
<item>3000,3000</item>
|
||||
<item>custom</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_repeat_alerts_entries">
|
||||
|
@@ -199,4 +199,26 @@
|
||||
<attr name="scaleEmojis" format="boolean" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="RingtonePreference">
|
||||
<attr name="showAdd" format="boolean" />
|
||||
<attr name="summaryHasRingtone" format="string|reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="ColorPickerPreference">
|
||||
<attr name="currentColor" format="reference" />
|
||||
|
||||
<attr name="colors" format="reference" />
|
||||
|
||||
<attr name="sortColors" format="boolean|reference" />
|
||||
|
||||
<attr name="colorDescriptions" format="reference" />
|
||||
|
||||
<attr name="columns" format="integer|reference" />
|
||||
|
||||
<attr name="colorSize" format="enum|reference">
|
||||
<enum name="large" value="1" />
|
||||
<enum name="small" value="2" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
@@ -1460,6 +1460,14 @@
|
||||
<string name="preferences__read_receipts">Read receipts</string>
|
||||
<string name="preferences__if_read_receipts_are_disabled_you_wont_be_able_to_see_read_receipts">If you read receipts are disabled, you won\'t be able to see read receipts from others.</string>
|
||||
|
||||
<string name="RingtonePreference_ringtone_default">Default ringtone</string>
|
||||
<string name="RingtonePreference_ringtone_silent">None</string>
|
||||
<string name="RingtonePreference_ringtone_picker_title">Ringtones</string>
|
||||
<string name="RingtonePreference_notification_sound_default">Default notification sound</string>
|
||||
<string name="RingtonePreference_alarm_sound_default">Default alarm sound</string>
|
||||
<string name="RingtonePreference_add_ringtone_text">Add ringtone</string>
|
||||
<string name="RingtonePreference_unable_to_add_ringtone">Unable to add custom ringtone</string>
|
||||
|
||||
|
||||
<!-- EOF -->
|
||||
|
||||
|
@@ -256,4 +256,7 @@
|
||||
<item name="android:focusable">false</item>
|
||||
</style>
|
||||
|
||||
<style name="PreferenceThemeOverlay.Fix" parent="PreferenceThemeOverlay.v14.Material">
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
@@ -18,6 +18,8 @@
|
||||
<item name="contact_selection_lay_user">#a0000000</item>
|
||||
<item name="contact_selection_header_text">@color/textsecure_primary_dark</item>
|
||||
<item name="dialog_background_color">@color/background_material_light</item>
|
||||
<item name="pref_divider">@drawable/preference_divider_light</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkNoActionBar" parent="@style/Theme.AppCompat.NoActionBar">
|
||||
@@ -34,6 +36,8 @@
|
||||
<item name="contact_selection_lay_user">#afeeeeee</item>
|
||||
<item name="contact_selection_header_text">#66eeeeee</item>
|
||||
<item name="dialog_background_color">@color/background_material_dark</item>
|
||||
<item name="pref_divider">@drawable/preference_divider_dark</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.HighlightTheme" parent="@style/TextSecure.LightTheme">
|
||||
@@ -212,6 +216,7 @@
|
||||
<item name="app_protect_timeout_picker_color">@style/BetterPickersDialogFragment.Light</item>
|
||||
|
||||
<item name="group_members_dialog_icon">@drawable/ic_group_grey600_24dp</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkTheme" parent="@style/Theme.AppCompat">
|
||||
@@ -335,5 +340,6 @@
|
||||
<item name="app_protect_timeout_picker_color">@style/BetterPickersDialogFragment</item>
|
||||
|
||||
<item name="group_members_dialog_icon">@drawable/ic_group_white_24dp</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
android:entries="@array/pref_led_color_entries"
|
||||
android:entryValues="@array/pref_led_color_values" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
|
||||
<org.thoughtcrime.securesms.preferences.SignalListPreference
|
||||
android:key="pref_led_blink"
|
||||
android:defaultValue="500,2000"
|
||||
android:title="@string/preferences__pref_led_blink_title"
|
||||
|
Reference in New Issue
Block a user