port to fork (first official commit)
@@ -270,6 +270,43 @@
|
||||
|
||||
<activity android:name=".map.MapActivity" />
|
||||
|
||||
|
||||
<activity android:name=".ZhvActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.intent.action.GET_CONTENT"/>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:host="*"/>
|
||||
<data android:scheme="http"/>
|
||||
<data android:scheme="https"/>
|
||||
<data android:scheme="content"/>
|
||||
<data android:scheme="file"/>
|
||||
<data android:mimeType="*/*" />
|
||||
<data android:mimeType="application/octet-stream" />
|
||||
<data android:pathPattern=".*\\.html.zip" />
|
||||
<data android:pathPattern=".*\\..*\\.html.zip" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.html.zip" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.html.zip" />
|
||||
<data android:pathPattern=".*\\.htmlzip" />
|
||||
<data android:pathPattern=".*\\..*\\.htmlzip" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.htmlzip" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.htmlzip" />
|
||||
<data android:mimeType="text/html"/>
|
||||
<data android:pathPattern=".*\\.html" />
|
||||
<data android:pathPattern=".*\\..*\\.html" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.html" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.html" />
|
||||
<data android:mimeType="text/markdown"/>
|
||||
<data android:pathPattern=".*\\.md" />
|
||||
<data android:pathPattern=".*\\..*\\.md" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\.md" />
|
||||
<data android:pathPattern=".*\\..*\\..*\\..*\\.md" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
|
||||
<service android:name=".connect.KeepAliveService" android:enabled="true" />
|
||||
|
||||
<service android:name=".geolocation.LocationBackgroundService" />
|
||||
|
||||
@@ -89,13 +89,13 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionCode 583
|
||||
versionCode 584
|
||||
versionName "1.10.0"
|
||||
|
||||
applicationId "com.b44t.messenger"
|
||||
multiDexEnabled true
|
||||
|
||||
minSdkVersion 16
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 28
|
||||
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
@@ -151,7 +151,7 @@ android {
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
applicationIdSuffix ".beta"
|
||||
applicationIdSuffix ".lite"
|
||||
}
|
||||
release {
|
||||
// minification and proguard disabled for now.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<!-- read issue: https://github.com/deltachat/deltachat-android/issues/480 before introducing an attr here. -->
|
||||
<solid android:color="@color/blue_primary" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<!-- read issue: https://github.com/deltachat/deltachat-android/issues/480 before introducing an attr here. -->
|
||||
<solid android:color="@color/green_primary" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<!-- read issue: https://github.com/deltachat/deltachat-android/issues/480 before introducing an attr here. -->
|
||||
<solid android:color="@color/purple_primary" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<!-- read issue: https://github.com/deltachat/deltachat-android/issues/480 before introducing an attr here. -->
|
||||
<solid android:color="@color/red_primary" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".OpenActivity">
|
||||
|
||||
<WebView android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<item android:title="@string/menu_reply"
|
||||
android:id="@+id/menu_context_reply"
|
||||
android:visible="false"
|
||||
android:visible="true"
|
||||
android:icon="?menu_reply_icon"
|
||||
app:showAsAction="always" />
|
||||
|
||||
|
||||
@@ -85,11 +85,19 @@
|
||||
<string-array name="pref_theme_entries">
|
||||
<item>@string/pref_light_theme</item>
|
||||
<item>@string/pref_dark_theme</item>
|
||||
<item>@string/purple</item>
|
||||
<item>@string/green</item>
|
||||
<item>@string/blue</item>
|
||||
<item>@string/red</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_theme_values" translatable="false">
|
||||
<item>light</item>
|
||||
<item>dark</item>
|
||||
<item>purple</item>
|
||||
<item>green</item>
|
||||
<item>blue</item>
|
||||
<item>red</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_led_color_entries">
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<attr name="conversation_list_item_contact_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_subject_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_delivery_icon_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_unreadcount_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_date_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_unread_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_divider" format="reference"/>
|
||||
|
||||
@@ -1,5 +1,45 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
<!-- PURPLE -->
|
||||
<color name="purple_primary">#ff785c8d</color>
|
||||
<color name="purple_primary_dark">#ff604a71</color>
|
||||
<color name="purple_primary_lite">#ff785c8d</color>
|
||||
<color name="purple_accent">#785c8d</color>
|
||||
<color name="purple_outgoing_bubble">#fffff9d9</color>
|
||||
<color name="purple_outgoing_label">#ff8754b4</color>
|
||||
<color name="purple_unreadcount">#7b00c8</color>
|
||||
<!-- ========== -->
|
||||
|
||||
<!-- GREEN -->
|
||||
<color name="green_primary">#ff43a047</color>
|
||||
<color name="green_primary_dark">#ff2f7d32</color>
|
||||
<color name="green_primary_lite">#ff43a047</color>
|
||||
<color name="green_accent">#43a047</color>
|
||||
<color name="green_outgoing_bubble">#fffff9d9</color>
|
||||
<color name="green_outgoing_label">#ff58ab43</color>
|
||||
<color name="green_unreadcount">#5fbf41</color>
|
||||
<!-- ========== -->
|
||||
|
||||
<!-- BLUE -->
|
||||
<color name="blue_primary">#ff517da2</color>
|
||||
<color name="blue_primary_dark">#ff426382</color>
|
||||
<color name="blue_primary_lite">#ff517da2</color>
|
||||
<color name="blue_accent">#517da2</color>
|
||||
<color name="blue_outgoing_bubble">#fffff9d9</color>
|
||||
<color name="blue_outgoing_label">#ff2f97d6</color>
|
||||
<color name="blue_unreadcount">#1ab7c8</color>
|
||||
<!-- ========== -->
|
||||
|
||||
<!-- RED -->
|
||||
<color name="red_primary">#ffb61c1c</color>
|
||||
<color name="red_primary_dark">#ffa41a1a</color>
|
||||
<color name="red_primary_lite">#ffb61c1c</color>
|
||||
<color name="red_accent">#b61c1c</color>
|
||||
<color name="red_outgoing_bubble">#fffff9d9</color>
|
||||
<color name="red_outgoing_label">#ffce303e</color>
|
||||
<color name="red_unreadcount">#d51431</color>
|
||||
<!-- ========== -->
|
||||
|
||||
<color name="delta_primary">#ff415e6b</color>
|
||||
<color name="delta_primary_dark">#ff364e59</color>
|
||||
<color name="delta_primary_lite">#4c6e7d</color>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="could_not_open_file">Could not open file</string>
|
||||
<!-- common strings without special context -->
|
||||
<string name="app_name">Delta Chat</string>
|
||||
<string name="app_name">Delta Chat Lite</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="yes">Yes</string>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<style name="ComposeEditText" parent="@style/Signal.Text.Body">
|
||||
<item name="android:padding">2dp</item>
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:maxLines">5</item>
|
||||
<item name="android:maxLines">8</item>
|
||||
<item name="android:maxLength">64000</item>
|
||||
<item name="android:textColor">?conversation_item_outgoing_text_primary_color</item>
|
||||
<item name="android:capitalize">sentences</item>
|
||||
@@ -110,4 +110,98 @@
|
||||
<item name="colorControlActivated">#ff2090ea</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========================================================== -->
|
||||
|
||||
|
||||
<!-- PURPLE -->
|
||||
<style name="TextSecure.PurpleActionBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar">
|
||||
<item name="background">@color/purple_primary</item>
|
||||
<item name="elevation">4dp</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
<item name="titleTextStyle">@style/TextSecure.TitleTextStyle</item>
|
||||
<item name="subtitleTextStyle">@style/TextSecure.SubtitleTextStyle</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.PurpleActionBar.TabBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar.TabBar">
|
||||
<item name="android:background">@color/purple_primary</item>
|
||||
<item name="background">@color/purple_primary</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">#BFffffff</item>
|
||||
<item name="elevation">4dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- RED -->
|
||||
<style name="TextSecure.RedActionBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar">
|
||||
<item name="background">@color/red_primary</item>
|
||||
<item name="elevation">4dp</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
<item name="titleTextStyle">@style/TextSecure.TitleTextStyle</item>
|
||||
<item name="subtitleTextStyle">@style/TextSecure.SubtitleTextStyle</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.RedActionBar.TabBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar.TabBar">
|
||||
<item name="android:background">@color/red_primary</item>
|
||||
<item name="background">@color/red_primary</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">#BFffffff</item>
|
||||
<item name="elevation">4dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- GREEN -->
|
||||
<style name="TextSecure.GreenActionBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar">
|
||||
<item name="background">@color/green_primary</item>
|
||||
<item name="elevation">4dp</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
<item name="titleTextStyle">@style/TextSecure.TitleTextStyle</item>
|
||||
<item name="subtitleTextStyle">@style/TextSecure.SubtitleTextStyle</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.GreenActionBar.TabBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar.TabBar">
|
||||
<item name="android:background">@color/green_primary</item>
|
||||
<item name="background">@color/green_primary</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">#BFffffff</item>
|
||||
<item name="elevation">4dp</item>
|
||||
</style>
|
||||
|
||||
<!-- BLUE -->
|
||||
<style name="TextSecure.BlueActionBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar">
|
||||
<item name="background">@color/blue_primary</item>
|
||||
<item name="elevation">4dp</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
<item name="titleTextStyle">@style/TextSecure.TitleTextStyle</item>
|
||||
<item name="subtitleTextStyle">@style/TextSecure.SubtitleTextStyle</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.BlueActionBar.TabBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar.TabBar">
|
||||
<item name="android:background">@color/blue_primary</item>
|
||||
<item name="background">@color/blue_primary</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">#BFffffff</item>
|
||||
<item name="elevation">4dp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
<item name="attachment_type_selector_background">@color/white</item>
|
||||
|
||||
<item name="conversation_list_item_unreadcount_color">@color/green_A700</item>
|
||||
<item name="conversation_list_item_background">@drawable/conversation_list_item_background</item>
|
||||
<item name="pinned_list_item_background">@drawable/pinned_list_item_background</item>
|
||||
<item name="conversation_list_deaddrop_bg_color">@color/pinned_bg</item>
|
||||
@@ -236,6 +237,7 @@
|
||||
|
||||
<item name="attachment_type_selector_background">@color/gray95</item>
|
||||
|
||||
<item name="conversation_list_item_unreadcount_color">@color/green_A700</item>
|
||||
<item name="conversation_list_item_background">@drawable/conversation_list_item_background_dark</item>
|
||||
<item name="pinned_list_item_background">@drawable/pinned_list_item_background_dark</item>
|
||||
<item name="conversation_list_deaddrop_bg_color">@color/pinned_bg_dark</item>
|
||||
@@ -368,4 +370,686 @@
|
||||
<style name="TextSecure.ScribbleTheme" parent="TextSecure.DarkNoActionBar">
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========================================================== -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- PURPLE -->
|
||||
<style name="TextSecure.PurpleTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="theme_type">light</item>
|
||||
<item name="actionBarStyle">@style/TextSecure.PurpleActionBar</item>
|
||||
<item name="actionBarTabBarStyle">@style/TextSecure.PurpleActionBar.TabBar</item>
|
||||
<item name="actionModeBackground">@color/gray50</item>
|
||||
<item name="colorPrimary">@color/purple_primary</item>
|
||||
<item name="colorPrimaryDark">@color/purple_primary_dark</item>
|
||||
|
||||
<item name="colorAccent">@color/purple_accent</item>
|
||||
<item name="colorControlActivated">@color/purple_accent</item>
|
||||
<item name="colorControlHighlight">@color/purple_accent</item>
|
||||
|
||||
<item name="android:windowBackground">@color/white</item>
|
||||
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
|
||||
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
|
||||
<!--<item name="android:windowContentOverlay">@drawable/compat_actionbar_shadow_background</item>-->
|
||||
|
||||
<item name="attachment_type_selector_background">@color/white</item>
|
||||
|
||||
<item name="conversation_list_item_unreadcount_color">@color/purple_unreadcount</item>
|
||||
<item name="conversation_list_item_background">@drawable/conversation_list_item_background</item>
|
||||
<item name="pinned_list_item_background">@drawable/pinned_list_item_background</item>
|
||||
<item name="conversation_list_deaddrop_bg_color">@color/pinned_bg</item>
|
||||
<item name="conversation_list_item_contact_color">@color/core_light_90</item>
|
||||
<item name="conversation_list_item_subject_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_delivery_icon_color">@color/core_light_35</item>
|
||||
<item name="conversation_list_item_date_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_unread_color">@color/core_black</item>
|
||||
<item name="conversation_list_item_divider">@drawable/conversation_list_divider_shape</item>
|
||||
|
||||
<item name="send_button_bg">@drawable/send_button_bg_purple</item>
|
||||
<item name="floating_mini_bg">@drawable/floating_mini_bg_light</item>
|
||||
|
||||
<item name="fab_color">@color/purple_primary_lite</item>
|
||||
<item name="input_panel_bg_color">@color/white</item>
|
||||
<item name="lower_right_divet">@drawable/divet_lower_right_dark</item>
|
||||
<item name="close_icon_color">#A4A6A9</item>
|
||||
|
||||
<item name="conversation_group_member_name">#99000000</item>
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_background">@color/gray10</item>
|
||||
<item name="conversation_editor_background">#22000000</item>
|
||||
<item name="conversation_editor_text_color">@color/gray95</item>
|
||||
<item name="conversation_input_background">@drawable/compose_background_light</item>
|
||||
<item name="conversation_transport_sms_indicator">@drawable/ic_send_sms_insecure</item>
|
||||
<item name="conversation_transport_push_indicator">@drawable/ic_send_push</item>
|
||||
<item name="conversation_transport_popup_background">@color/white</item>
|
||||
<item name="conversation_emoji_toggle">@drawable/ic_mood_grey600_24dp</item>
|
||||
<item name="conversation_keyboard_toggle">@drawable/ic_keyboard_grey600_24dp</item>
|
||||
<item name="conversation_attach_camera">@drawable/ic_photo_camera_light</item>
|
||||
<item name="conversation_attach_image">@drawable/ic_image_light</item>
|
||||
<item name="conversation_attach_video">@drawable/ic_movie_creation_light</item>
|
||||
<item name="conversation_attach_sound">@drawable/ic_volume_up_light</item>
|
||||
<item name="conversation_attach_contact_info">@drawable/ic_account_box_light</item>
|
||||
<item name="conversation_attach">@drawable/ic_attach_grey600_24dp</item>
|
||||
<item name="conversation_number_picker_text_color_normal">@color/gray65</item>
|
||||
<item name="conversation_number_picker_text_color_selected">@color/black</item>
|
||||
|
||||
<item name="contact_list_divider">@drawable/contact_list_divider_light</item>
|
||||
<item name="contact_list_divider_color">@color/gray65</item>
|
||||
|
||||
<item name="verification_background">@color/gray5</item>
|
||||
|
||||
<item name="emoji_tab_strip_background">@color/gray12</item>
|
||||
<item name="emoji_tab_indicator">#66555555</item>
|
||||
<item name="emoji_tab_underline">#44555555</item>
|
||||
<item name="emoji_tab_seperator">@color/gray20</item>
|
||||
<item name="emoji_text_color">@color/black</item>
|
||||
|
||||
<item name="emoji_category_recent">@drawable/emoji_category_recent_light</item>
|
||||
<item name="emoji_category_people">@drawable/emoji_category_people_light</item>
|
||||
<item name="emoji_category_nature">@drawable/emoji_category_nature_light</item>
|
||||
<item name="emoji_category_foods">@drawable/emoji_category_foods_light</item>
|
||||
<item name="emoji_category_activity">@drawable/emoji_category_activity_light</item>
|
||||
<item name="emoji_category_places">@drawable/emoji_category_places_light</item>
|
||||
<item name="emoji_category_objects">@drawable/emoji_category_objects_light</item>
|
||||
<item name="emoji_category_symbol">@drawable/emoji_category_symbol_light</item>
|
||||
<item name="emoji_category_flags">@drawable/emoji_category_flags_light</item>
|
||||
<item name="emoji_category_emoticons">@drawable/emoji_category_emoticons_light</item>
|
||||
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_item_incoming_bubble_color">@color/white</item>
|
||||
<!-- <item name="conversation_item_incoming_bubble_border_color">#33000000</item> -->
|
||||
<item name="conversation_item_incoming_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_incoming_text_secondary_color">@color/gray50</item>
|
||||
|
||||
<item name="conversation_item_outgoing_bubble_color">@color/purple_outgoing_bubble</item>
|
||||
<!-- <item name="conversation_item_outgoing_bubble_border_color">#80efffde</item> -->
|
||||
<item name="conversation_item_outgoing_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_outgoing_text_secondary_color">@color/purple_outgoing_label</item>
|
||||
|
||||
<item name="conversation_item_update_bg_color">@color/universal_overlay</item>
|
||||
<item name="conversation_item_update_text_color">@color/white</item>
|
||||
|
||||
<item name="conversation_item_date_line_color">@color/core_light_45</item>
|
||||
<item name="conversation_item_quote_text_color">@color/core_light_90</item>
|
||||
<item name="conversation_item_sticky_date_background">@drawable/sticky_date_header_background_light</item>
|
||||
<item name="conversation_item_sticky_date_text_color">@color/core_light_60</item>
|
||||
|
||||
<item name="quick_camera_icon">@drawable/quick_camera_light</item>
|
||||
<item name="quick_mic_icon">@drawable/ic_mic_grey600_24dp</item>
|
||||
|
||||
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape</item>
|
||||
|
||||
<item name="dialog_info_icon">@drawable/ic_info_outline_light</item>
|
||||
<item name="dialog_alert_icon">@drawable/ic_warning_light</item>
|
||||
<item name="dialog_background_color">@color/background_material_light</item>
|
||||
|
||||
<item name="device_link_item_card_background">@color/device_link_item_background_light</item>
|
||||
|
||||
<item name="import_export_item_background_color">@color/import_export_item_background_light</item>
|
||||
<item name="import_export_item_background_shadow_color">@color/import_export_item_background_shadow_light</item>
|
||||
<item name="import_export_item_card_background">@drawable/clickable_card_light</item>
|
||||
|
||||
<item name="menu_new_conversation_icon">@drawable/ic_add_white_24dp</item>
|
||||
<item name="menu_map_icon">@android:drawable/ic_dialog_map</item>
|
||||
<item name="menu_search_icon">@drawable/ic_search_white_24dp</item>
|
||||
<item name="menu_popup_expand">@drawable/ic_launch_white_24dp</item>
|
||||
<item name="menu_unlock_icon">@drawable/ic_unlocked_white_24dp</item>
|
||||
<item name="menu_lock_icon">@drawable/ic_lock_white_24dp</item>
|
||||
<item name="menu_lock_icon_small">@drawable/ic_lock_white_18dp</item>
|
||||
<item name="menu_trash_icon">@drawable/ic_delete_white_24dp</item>
|
||||
<item name="menu_accept_icon">@drawable/ic_check_white_24dp</item>
|
||||
<item name="menu_copy_icon">@drawable/ic_content_copy_white_24dp</item>
|
||||
<item name="menu_info_icon">@drawable/ic_info_outline_white_24dp</item>
|
||||
<item name="menu_forward_icon">@drawable/ic_forward_white_24dp</item>
|
||||
<item name="menu_save_icon">@drawable/ic_save_white_24dp</item>
|
||||
<item name="menu_reply_icon">@drawable/ic_reply_white_24dp</item>
|
||||
|
||||
<item name="reminder_header_background">#ff1d85d7</item>
|
||||
|
||||
<item name="pref_icon_tint">@color/purple_primary_dark</item>
|
||||
|
||||
<item name="group_members_dialog_icon">@drawable/ic_group_grey600_24dp</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
|
||||
<item name="search_toolbar_background">@color/white</item>
|
||||
<item name="search_background">@color/white</item>
|
||||
|
||||
<item name="shared_contact_details_header_background">@color/grey_100</item>
|
||||
<item name="shared_contact_details_titlebar">@color/grey_400</item>
|
||||
<item name="shared_contact_item_button_color">@color/core_light_02</item>
|
||||
</style>
|
||||
<style name="TextSecure.PurpleNoActionBar" parent="@style/TextSecure.PurpleTheme">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
||||
<item name="theme_type">light</item>
|
||||
<item name="colorPrimary">@color/purple_primary</item>
|
||||
<item name="colorPrimaryDark">@color/purple_primary_dark</item>
|
||||
|
||||
<item name="recipient_preference_blocked">#d00000</item>
|
||||
<item name="contact_selection_label_text">#66000000</item>
|
||||
<item name="contact_selection_push_user">@color/black</item>
|
||||
<item name="contact_selection_lay_user">#a0000000</item>
|
||||
<item name="contact_selection_header_text">@color/purple_primary_dark</item>
|
||||
|
||||
<item name="profile_toolbar_background">@color/white</item>
|
||||
<item name="profile_toolbar_foreground">@color/gray70</item>
|
||||
<item name="profile_header_foreground">@color/gray50</item>
|
||||
<item name="profile_document_foreground">@color/gray70</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- GREEN -->
|
||||
<style name="TextSecure.GreenTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="theme_type">light</item>
|
||||
<item name="actionBarStyle">@style/TextSecure.GreenActionBar</item>
|
||||
<item name="actionBarTabBarStyle">@style/TextSecure.GreenActionBar.TabBar</item>
|
||||
<item name="actionModeBackground">@color/gray50</item>
|
||||
<item name="colorPrimary">@color/green_primary</item>
|
||||
<item name="colorPrimaryDark">@color/green_primary_dark</item>
|
||||
|
||||
<item name="colorAccent">@color/green_accent</item>
|
||||
<item name="colorControlActivated">@color/green_accent</item>
|
||||
<item name="colorControlHighlight">@color/green_accent</item>
|
||||
|
||||
<item name="android:windowBackground">@color/white</item>
|
||||
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
|
||||
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
|
||||
<!--<item name="android:windowContentOverlay">@drawable/compat_actionbar_shadow_background</item>-->
|
||||
|
||||
<item name="attachment_type_selector_background">@color/white</item>
|
||||
|
||||
<item name="conversation_list_item_unreadcount_color">@color/green_unreadcount</item>
|
||||
<item name="conversation_list_item_background">@drawable/conversation_list_item_background</item>
|
||||
<item name="pinned_list_item_background">@drawable/pinned_list_item_background</item>
|
||||
<item name="conversation_list_deaddrop_bg_color">@color/pinned_bg</item>
|
||||
<item name="conversation_list_item_contact_color">@color/core_light_90</item>
|
||||
<item name="conversation_list_item_subject_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_delivery_icon_color">@color/core_light_35</item>
|
||||
<item name="conversation_list_item_date_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_unread_color">@color/core_black</item>
|
||||
<item name="conversation_list_item_divider">@drawable/conversation_list_divider_shape</item>
|
||||
|
||||
<item name="send_button_bg">@drawable/send_button_bg_green</item>
|
||||
<item name="floating_mini_bg">@drawable/floating_mini_bg_light</item>
|
||||
|
||||
<item name="fab_color">@color/green_primary_lite</item>
|
||||
<item name="input_panel_bg_color">@color/white</item>
|
||||
<item name="lower_right_divet">@drawable/divet_lower_right_dark</item>
|
||||
<item name="close_icon_color">#A4A6A9</item>
|
||||
|
||||
<item name="conversation_group_member_name">#99000000</item>
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_background">@color/gray10</item>
|
||||
<item name="conversation_editor_background">#22000000</item>
|
||||
<item name="conversation_editor_text_color">@color/gray95</item>
|
||||
<item name="conversation_input_background">@drawable/compose_background_light</item>
|
||||
<item name="conversation_transport_sms_indicator">@drawable/ic_send_sms_insecure</item>
|
||||
<item name="conversation_transport_push_indicator">@drawable/ic_send_push</item>
|
||||
<item name="conversation_transport_popup_background">@color/white</item>
|
||||
<item name="conversation_emoji_toggle">@drawable/ic_mood_grey600_24dp</item>
|
||||
<item name="conversation_keyboard_toggle">@drawable/ic_keyboard_grey600_24dp</item>
|
||||
<item name="conversation_attach_camera">@drawable/ic_photo_camera_light</item>
|
||||
<item name="conversation_attach_image">@drawable/ic_image_light</item>
|
||||
<item name="conversation_attach_video">@drawable/ic_movie_creation_light</item>
|
||||
<item name="conversation_attach_sound">@drawable/ic_volume_up_light</item>
|
||||
<item name="conversation_attach_contact_info">@drawable/ic_account_box_light</item>
|
||||
<item name="conversation_attach">@drawable/ic_attach_grey600_24dp</item>
|
||||
<item name="conversation_number_picker_text_color_normal">@color/gray65</item>
|
||||
<item name="conversation_number_picker_text_color_selected">@color/black</item>
|
||||
|
||||
<item name="contact_list_divider">@drawable/contact_list_divider_light</item>
|
||||
<item name="contact_list_divider_color">@color/gray65</item>
|
||||
|
||||
<item name="verification_background">@color/gray5</item>
|
||||
|
||||
<item name="emoji_tab_strip_background">@color/gray12</item>
|
||||
<item name="emoji_tab_indicator">#66555555</item>
|
||||
<item name="emoji_tab_underline">#44555555</item>
|
||||
<item name="emoji_tab_seperator">@color/gray20</item>
|
||||
<item name="emoji_text_color">@color/black</item>
|
||||
|
||||
<item name="emoji_category_recent">@drawable/emoji_category_recent_light</item>
|
||||
<item name="emoji_category_people">@drawable/emoji_category_people_light</item>
|
||||
<item name="emoji_category_nature">@drawable/emoji_category_nature_light</item>
|
||||
<item name="emoji_category_foods">@drawable/emoji_category_foods_light</item>
|
||||
<item name="emoji_category_activity">@drawable/emoji_category_activity_light</item>
|
||||
<item name="emoji_category_places">@drawable/emoji_category_places_light</item>
|
||||
<item name="emoji_category_objects">@drawable/emoji_category_objects_light</item>
|
||||
<item name="emoji_category_symbol">@drawable/emoji_category_symbol_light</item>
|
||||
<item name="emoji_category_flags">@drawable/emoji_category_flags_light</item>
|
||||
<item name="emoji_category_emoticons">@drawable/emoji_category_emoticons_light</item>
|
||||
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_item_incoming_bubble_color">@color/white</item>
|
||||
<!-- <item name="conversation_item_incoming_bubble_border_color">#33000000</item> -->
|
||||
<item name="conversation_item_incoming_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_incoming_text_secondary_color">@color/gray50</item>
|
||||
|
||||
<item name="conversation_item_outgoing_bubble_color">@color/green_outgoing_bubble</item>
|
||||
<!-- <item name="conversation_item_outgoing_bubble_border_color">#80efffde</item> -->
|
||||
<item name="conversation_item_outgoing_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_outgoing_text_secondary_color">@color/green_outgoing_label</item>
|
||||
|
||||
<item name="conversation_item_update_bg_color">@color/universal_overlay</item>
|
||||
<item name="conversation_item_update_text_color">@color/white</item>
|
||||
|
||||
<item name="conversation_item_date_line_color">@color/core_light_45</item>
|
||||
<item name="conversation_item_quote_text_color">@color/core_light_90</item>
|
||||
<item name="conversation_item_sticky_date_background">@drawable/sticky_date_header_background_light</item>
|
||||
<item name="conversation_item_sticky_date_text_color">@color/core_light_60</item>
|
||||
|
||||
<item name="quick_camera_icon">@drawable/quick_camera_light</item>
|
||||
<item name="quick_mic_icon">@drawable/ic_mic_grey600_24dp</item>
|
||||
|
||||
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape</item>
|
||||
|
||||
<item name="dialog_info_icon">@drawable/ic_info_outline_light</item>
|
||||
<item name="dialog_alert_icon">@drawable/ic_warning_light</item>
|
||||
<item name="dialog_background_color">@color/background_material_light</item>
|
||||
|
||||
<item name="device_link_item_card_background">@color/device_link_item_background_light</item>
|
||||
|
||||
<item name="import_export_item_background_color">@color/import_export_item_background_light</item>
|
||||
<item name="import_export_item_background_shadow_color">@color/import_export_item_background_shadow_light</item>
|
||||
<item name="import_export_item_card_background">@drawable/clickable_card_light</item>
|
||||
|
||||
<item name="menu_new_conversation_icon">@drawable/ic_add_white_24dp</item>
|
||||
<item name="menu_map_icon">@android:drawable/ic_dialog_map</item>
|
||||
<item name="menu_search_icon">@drawable/ic_search_white_24dp</item>
|
||||
<item name="menu_popup_expand">@drawable/ic_launch_white_24dp</item>
|
||||
<item name="menu_unlock_icon">@drawable/ic_unlocked_white_24dp</item>
|
||||
<item name="menu_lock_icon">@drawable/ic_lock_white_24dp</item>
|
||||
<item name="menu_lock_icon_small">@drawable/ic_lock_white_18dp</item>
|
||||
<item name="menu_trash_icon">@drawable/ic_delete_white_24dp</item>
|
||||
<item name="menu_accept_icon">@drawable/ic_check_white_24dp</item>
|
||||
<item name="menu_copy_icon">@drawable/ic_content_copy_white_24dp</item>
|
||||
<item name="menu_info_icon">@drawable/ic_info_outline_white_24dp</item>
|
||||
<item name="menu_forward_icon">@drawable/ic_forward_white_24dp</item>
|
||||
<item name="menu_save_icon">@drawable/ic_save_white_24dp</item>
|
||||
<item name="menu_reply_icon">@drawable/ic_reply_white_24dp</item>
|
||||
|
||||
<item name="reminder_header_background">#ff1d85d7</item>
|
||||
|
||||
<item name="pref_icon_tint">@color/green_primary_dark</item>
|
||||
|
||||
<item name="group_members_dialog_icon">@drawable/ic_group_grey600_24dp</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
|
||||
<item name="search_toolbar_background">@color/white</item>
|
||||
<item name="search_background">@color/white</item>
|
||||
|
||||
<item name="shared_contact_details_header_background">@color/grey_100</item>
|
||||
<item name="shared_contact_details_titlebar">@color/grey_400</item>
|
||||
<item name="shared_contact_item_button_color">@color/core_light_02</item>
|
||||
</style>
|
||||
<style name="TextSecure.GreenNoActionBar" parent="@style/TextSecure.GreenTheme">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
||||
<item name="theme_type">light</item>
|
||||
<item name="colorPrimary">@color/green_primary</item>
|
||||
<item name="colorPrimaryDark">@color/green_primary_dark</item>
|
||||
|
||||
<item name="recipient_preference_blocked">#d00000</item>
|
||||
<item name="contact_selection_label_text">#66000000</item>
|
||||
<item name="contact_selection_push_user">@color/black</item>
|
||||
<item name="contact_selection_lay_user">#a0000000</item>
|
||||
<item name="contact_selection_header_text">@color/green_primary_dark</item>
|
||||
|
||||
<item name="profile_toolbar_background">@color/white</item>
|
||||
<item name="profile_toolbar_foreground">@color/gray70</item>
|
||||
<item name="profile_header_foreground">@color/gray50</item>
|
||||
<item name="profile_document_foreground">@color/gray70</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<!-- BLUE -->
|
||||
<style name="TextSecure.BlueTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="theme_type">light</item>
|
||||
<item name="actionBarStyle">@style/TextSecure.BlueActionBar</item>
|
||||
<item name="actionBarTabBarStyle">@style/TextSecure.BlueActionBar.TabBar</item>
|
||||
<item name="actionModeBackground">@color/gray50</item>
|
||||
<item name="colorPrimary">@color/blue_primary</item>
|
||||
<item name="colorPrimaryDark">@color/blue_primary_dark</item>
|
||||
|
||||
<item name="colorAccent">@color/blue_accent</item>
|
||||
<item name="colorControlActivated">@color/blue_accent</item>
|
||||
<item name="colorControlHighlight">@color/blue_accent</item>
|
||||
|
||||
<item name="android:windowBackground">@color/white</item>
|
||||
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
|
||||
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
|
||||
<!--<item name="android:windowContentOverlay">@drawable/compat_actionbar_shadow_background</item>-->
|
||||
|
||||
<item name="attachment_type_selector_background">@color/white</item>
|
||||
|
||||
<item name="conversation_list_item_unreadcount_color">@color/blue_unreadcount</item>
|
||||
<item name="conversation_list_item_background">@drawable/conversation_list_item_background</item>
|
||||
<item name="pinned_list_item_background">@drawable/pinned_list_item_background</item>
|
||||
<item name="conversation_list_deaddrop_bg_color">@color/pinned_bg</item>
|
||||
<item name="conversation_list_item_contact_color">@color/core_light_90</item>
|
||||
<item name="conversation_list_item_subject_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_delivery_icon_color">@color/core_light_35</item>
|
||||
<item name="conversation_list_item_date_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_unread_color">@color/core_black</item>
|
||||
<item name="conversation_list_item_divider">@drawable/conversation_list_divider_shape</item>
|
||||
|
||||
<item name="send_button_bg">@drawable/send_button_bg_blue</item>
|
||||
<item name="floating_mini_bg">@drawable/floating_mini_bg_light</item>
|
||||
|
||||
<item name="fab_color">@color/blue_primary_lite</item>
|
||||
<item name="input_panel_bg_color">@color/white</item>
|
||||
<item name="lower_right_divet">@drawable/divet_lower_right_dark</item>
|
||||
<item name="close_icon_color">#A4A6A9</item>
|
||||
|
||||
<item name="conversation_group_member_name">#99000000</item>
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_background">@color/gray10</item>
|
||||
<item name="conversation_editor_background">#22000000</item>
|
||||
<item name="conversation_editor_text_color">@color/gray95</item>
|
||||
<item name="conversation_input_background">@drawable/compose_background_light</item>
|
||||
<item name="conversation_transport_sms_indicator">@drawable/ic_send_sms_insecure</item>
|
||||
<item name="conversation_transport_push_indicator">@drawable/ic_send_push</item>
|
||||
<item name="conversation_transport_popup_background">@color/white</item>
|
||||
<item name="conversation_emoji_toggle">@drawable/ic_mood_grey600_24dp</item>
|
||||
<item name="conversation_keyboard_toggle">@drawable/ic_keyboard_grey600_24dp</item>
|
||||
<item name="conversation_attach_camera">@drawable/ic_photo_camera_light</item>
|
||||
<item name="conversation_attach_image">@drawable/ic_image_light</item>
|
||||
<item name="conversation_attach_video">@drawable/ic_movie_creation_light</item>
|
||||
<item name="conversation_attach_sound">@drawable/ic_volume_up_light</item>
|
||||
<item name="conversation_attach_contact_info">@drawable/ic_account_box_light</item>
|
||||
<item name="conversation_attach">@drawable/ic_attach_grey600_24dp</item>
|
||||
<item name="conversation_number_picker_text_color_normal">@color/gray65</item>
|
||||
<item name="conversation_number_picker_text_color_selected">@color/black</item>
|
||||
|
||||
<item name="contact_list_divider">@drawable/contact_list_divider_light</item>
|
||||
<item name="contact_list_divider_color">@color/gray65</item>
|
||||
|
||||
<item name="verification_background">@color/gray5</item>
|
||||
|
||||
<item name="emoji_tab_strip_background">@color/gray12</item>
|
||||
<item name="emoji_tab_indicator">#66555555</item>
|
||||
<item name="emoji_tab_underline">#44555555</item>
|
||||
<item name="emoji_tab_seperator">@color/gray20</item>
|
||||
<item name="emoji_text_color">@color/black</item>
|
||||
|
||||
<item name="emoji_category_recent">@drawable/emoji_category_recent_light</item>
|
||||
<item name="emoji_category_people">@drawable/emoji_category_people_light</item>
|
||||
<item name="emoji_category_nature">@drawable/emoji_category_nature_light</item>
|
||||
<item name="emoji_category_foods">@drawable/emoji_category_foods_light</item>
|
||||
<item name="emoji_category_activity">@drawable/emoji_category_activity_light</item>
|
||||
<item name="emoji_category_places">@drawable/emoji_category_places_light</item>
|
||||
<item name="emoji_category_objects">@drawable/emoji_category_objects_light</item>
|
||||
<item name="emoji_category_symbol">@drawable/emoji_category_symbol_light</item>
|
||||
<item name="emoji_category_flags">@drawable/emoji_category_flags_light</item>
|
||||
<item name="emoji_category_emoticons">@drawable/emoji_category_emoticons_light</item>
|
||||
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_item_incoming_bubble_color">@color/white</item>
|
||||
<!-- <item name="conversation_item_incoming_bubble_border_color">#33000000</item> -->
|
||||
<item name="conversation_item_incoming_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_incoming_text_secondary_color">@color/gray50</item>
|
||||
|
||||
<item name="conversation_item_outgoing_bubble_color">@color/blue_outgoing_bubble</item>
|
||||
<!-- <item name="conversation_item_outgoing_bubble_border_color">#80efffde</item> -->
|
||||
<item name="conversation_item_outgoing_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_outgoing_text_secondary_color">@color/blue_outgoing_label</item>
|
||||
|
||||
<item name="conversation_item_update_bg_color">@color/universal_overlay</item>
|
||||
<item name="conversation_item_update_text_color">@color/white</item>
|
||||
|
||||
<item name="conversation_item_date_line_color">@color/core_light_45</item>
|
||||
<item name="conversation_item_quote_text_color">@color/core_light_90</item>
|
||||
<item name="conversation_item_sticky_date_background">@drawable/sticky_date_header_background_light</item>
|
||||
<item name="conversation_item_sticky_date_text_color">@color/core_light_60</item>
|
||||
|
||||
<item name="quick_camera_icon">@drawable/quick_camera_light</item>
|
||||
<item name="quick_mic_icon">@drawable/ic_mic_grey600_24dp</item>
|
||||
|
||||
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape</item>
|
||||
|
||||
<item name="dialog_info_icon">@drawable/ic_info_outline_light</item>
|
||||
<item name="dialog_alert_icon">@drawable/ic_warning_light</item>
|
||||
<item name="dialog_background_color">@color/background_material_light</item>
|
||||
|
||||
<item name="device_link_item_card_background">@color/device_link_item_background_light</item>
|
||||
|
||||
<item name="import_export_item_background_color">@color/import_export_item_background_light</item>
|
||||
<item name="import_export_item_background_shadow_color">@color/import_export_item_background_shadow_light</item>
|
||||
<item name="import_export_item_card_background">@drawable/clickable_card_light</item>
|
||||
|
||||
<item name="menu_new_conversation_icon">@drawable/ic_add_white_24dp</item>
|
||||
<item name="menu_map_icon">@android:drawable/ic_dialog_map</item>
|
||||
<item name="menu_search_icon">@drawable/ic_search_white_24dp</item>
|
||||
<item name="menu_popup_expand">@drawable/ic_launch_white_24dp</item>
|
||||
<item name="menu_unlock_icon">@drawable/ic_unlocked_white_24dp</item>
|
||||
<item name="menu_lock_icon">@drawable/ic_lock_white_24dp</item>
|
||||
<item name="menu_lock_icon_small">@drawable/ic_lock_white_18dp</item>
|
||||
<item name="menu_trash_icon">@drawable/ic_delete_white_24dp</item>
|
||||
<item name="menu_accept_icon">@drawable/ic_check_white_24dp</item>
|
||||
<item name="menu_copy_icon">@drawable/ic_content_copy_white_24dp</item>
|
||||
<item name="menu_info_icon">@drawable/ic_info_outline_white_24dp</item>
|
||||
<item name="menu_forward_icon">@drawable/ic_forward_white_24dp</item>
|
||||
<item name="menu_save_icon">@drawable/ic_save_white_24dp</item>
|
||||
<item name="menu_reply_icon">@drawable/ic_reply_white_24dp</item>
|
||||
|
||||
<item name="reminder_header_background">#ff1d85d7</item>
|
||||
|
||||
<item name="pref_icon_tint">@color/blue_primary_dark</item>
|
||||
|
||||
<item name="group_members_dialog_icon">@drawable/ic_group_grey600_24dp</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
|
||||
<item name="search_toolbar_background">@color/white</item>
|
||||
<item name="search_background">@color/white</item>
|
||||
|
||||
<item name="shared_contact_details_header_background">@color/grey_100</item>
|
||||
<item name="shared_contact_details_titlebar">@color/grey_400</item>
|
||||
<item name="shared_contact_item_button_color">@color/core_light_02</item>
|
||||
</style>
|
||||
<style name="TextSecure.BlueNoActionBar" parent="@style/TextSecure.BlueTheme">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
||||
<item name="theme_type">light</item>
|
||||
<item name="colorPrimary">@color/blue_primary</item>
|
||||
<item name="colorPrimaryDark">@color/blue_primary_dark</item>
|
||||
|
||||
<item name="recipient_preference_blocked">#d00000</item>
|
||||
<item name="contact_selection_label_text">#66000000</item>
|
||||
<item name="contact_selection_push_user">@color/black</item>
|
||||
<item name="contact_selection_lay_user">#a0000000</item>
|
||||
<item name="contact_selection_header_text">@color/blue_primary_dark</item>
|
||||
|
||||
<item name="profile_toolbar_background">@color/white</item>
|
||||
<item name="profile_toolbar_foreground">@color/gray70</item>
|
||||
<item name="profile_header_foreground">@color/gray50</item>
|
||||
<item name="profile_document_foreground">@color/gray70</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- RED -->
|
||||
<style name="TextSecure.RedTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="theme_type">light</item>
|
||||
<item name="actionBarStyle">@style/TextSecure.RedActionBar</item>
|
||||
<item name="actionBarTabBarStyle">@style/TextSecure.RedActionBar.TabBar</item>
|
||||
<item name="actionModeBackground">@color/gray50</item>
|
||||
<item name="colorPrimary">@color/red_primary</item>
|
||||
<item name="colorPrimaryDark">@color/red_primary_dark</item>
|
||||
|
||||
<item name="colorAccent">@color/red_accent</item>
|
||||
<item name="colorControlActivated">@color/red_accent</item>
|
||||
<item name="colorControlHighlight">@color/red_accent</item>
|
||||
|
||||
<item name="android:windowBackground">@color/white</item>
|
||||
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
|
||||
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
|
||||
<!--<item name="android:windowContentOverlay">@drawable/compat_actionbar_shadow_background</item>-->
|
||||
|
||||
<item name="attachment_type_selector_background">@color/white</item>
|
||||
|
||||
<item name="conversation_list_item_unreadcount_color">@color/red_unreadcount</item>
|
||||
<item name="conversation_list_item_background">@drawable/conversation_list_item_background</item>
|
||||
<item name="pinned_list_item_background">@drawable/pinned_list_item_background</item>
|
||||
<item name="conversation_list_deaddrop_bg_color">@color/pinned_bg</item>
|
||||
<item name="conversation_list_item_contact_color">@color/core_light_90</item>
|
||||
<item name="conversation_list_item_subject_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_delivery_icon_color">@color/core_light_35</item>
|
||||
<item name="conversation_list_item_date_color">@color/core_light_60</item>
|
||||
<item name="conversation_list_item_unread_color">@color/core_black</item>
|
||||
<item name="conversation_list_item_divider">@drawable/conversation_list_divider_shape</item>
|
||||
|
||||
<item name="send_button_bg">@drawable/send_button_bg_red</item>
|
||||
<item name="floating_mini_bg">@drawable/floating_mini_bg_light</item>
|
||||
|
||||
<item name="fab_color">@color/red_primary_lite</item>
|
||||
<item name="input_panel_bg_color">@color/white</item>
|
||||
<item name="lower_right_divet">@drawable/divet_lower_right_dark</item>
|
||||
<item name="close_icon_color">#A4A6A9</item>
|
||||
|
||||
<item name="conversation_group_member_name">#99000000</item>
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_background">@color/gray10</item>
|
||||
<item name="conversation_editor_background">#22000000</item>
|
||||
<item name="conversation_editor_text_color">@color/gray95</item>
|
||||
<item name="conversation_input_background">@drawable/compose_background_light</item>
|
||||
<item name="conversation_transport_sms_indicator">@drawable/ic_send_sms_insecure</item>
|
||||
<item name="conversation_transport_push_indicator">@drawable/ic_send_push</item>
|
||||
<item name="conversation_transport_popup_background">@color/white</item>
|
||||
<item name="conversation_emoji_toggle">@drawable/ic_mood_grey600_24dp</item>
|
||||
<item name="conversation_keyboard_toggle">@drawable/ic_keyboard_grey600_24dp</item>
|
||||
<item name="conversation_attach_camera">@drawable/ic_photo_camera_light</item>
|
||||
<item name="conversation_attach_image">@drawable/ic_image_light</item>
|
||||
<item name="conversation_attach_video">@drawable/ic_movie_creation_light</item>
|
||||
<item name="conversation_attach_sound">@drawable/ic_volume_up_light</item>
|
||||
<item name="conversation_attach_contact_info">@drawable/ic_account_box_light</item>
|
||||
<item name="conversation_attach">@drawable/ic_attach_grey600_24dp</item>
|
||||
<item name="conversation_number_picker_text_color_normal">@color/gray65</item>
|
||||
<item name="conversation_number_picker_text_color_selected">@color/black</item>
|
||||
|
||||
<item name="contact_list_divider">@drawable/contact_list_divider_light</item>
|
||||
<item name="contact_list_divider_color">@color/gray65</item>
|
||||
|
||||
<item name="verification_background">@color/gray5</item>
|
||||
|
||||
<item name="emoji_tab_strip_background">@color/gray12</item>
|
||||
<item name="emoji_tab_indicator">#66555555</item>
|
||||
<item name="emoji_tab_underline">#44555555</item>
|
||||
<item name="emoji_tab_seperator">@color/gray20</item>
|
||||
<item name="emoji_text_color">@color/black</item>
|
||||
|
||||
<item name="emoji_category_recent">@drawable/emoji_category_recent_light</item>
|
||||
<item name="emoji_category_people">@drawable/emoji_category_people_light</item>
|
||||
<item name="emoji_category_nature">@drawable/emoji_category_nature_light</item>
|
||||
<item name="emoji_category_foods">@drawable/emoji_category_foods_light</item>
|
||||
<item name="emoji_category_activity">@drawable/emoji_category_activity_light</item>
|
||||
<item name="emoji_category_places">@drawable/emoji_category_places_light</item>
|
||||
<item name="emoji_category_objects">@drawable/emoji_category_objects_light</item>
|
||||
<item name="emoji_category_symbol">@drawable/emoji_category_symbol_light</item>
|
||||
<item name="emoji_category_flags">@drawable/emoji_category_flags_light</item>
|
||||
<item name="emoji_category_emoticons">@drawable/emoji_category_emoticons_light</item>
|
||||
|
||||
|
||||
<!-- light theme -->
|
||||
<item name="conversation_item_incoming_bubble_color">@color/white</item>
|
||||
<!-- <item name="conversation_item_incoming_bubble_border_color">#33000000</item> -->
|
||||
<item name="conversation_item_incoming_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_incoming_text_secondary_color">@color/gray50</item>
|
||||
|
||||
<item name="conversation_item_outgoing_bubble_color">@color/red_outgoing_bubble</item>
|
||||
<!-- <item name="conversation_item_outgoing_bubble_border_color">#80efffde</item> -->
|
||||
<item name="conversation_item_outgoing_text_primary_color">@color/black</item>
|
||||
<item name="conversation_item_outgoing_text_secondary_color">@color/red_outgoing_label</item>
|
||||
|
||||
<item name="conversation_item_update_bg_color">@color/universal_overlay</item>
|
||||
<item name="conversation_item_update_text_color">@color/white</item>
|
||||
|
||||
<item name="conversation_item_date_line_color">@color/core_light_45</item>
|
||||
<item name="conversation_item_quote_text_color">@color/core_light_90</item>
|
||||
<item name="conversation_item_sticky_date_background">@drawable/sticky_date_header_background_light</item>
|
||||
<item name="conversation_item_sticky_date_text_color">@color/core_light_60</item>
|
||||
|
||||
<item name="quick_camera_icon">@drawable/quick_camera_light</item>
|
||||
<item name="quick_mic_icon">@drawable/ic_mic_grey600_24dp</item>
|
||||
|
||||
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape</item>
|
||||
|
||||
<item name="dialog_info_icon">@drawable/ic_info_outline_light</item>
|
||||
<item name="dialog_alert_icon">@drawable/ic_warning_light</item>
|
||||
<item name="dialog_background_color">@color/background_material_light</item>
|
||||
|
||||
<item name="device_link_item_card_background">@color/device_link_item_background_light</item>
|
||||
|
||||
<item name="import_export_item_background_color">@color/import_export_item_background_light</item>
|
||||
<item name="import_export_item_background_shadow_color">@color/import_export_item_background_shadow_light</item>
|
||||
<item name="import_export_item_card_background">@drawable/clickable_card_light</item>
|
||||
|
||||
<item name="menu_new_conversation_icon">@drawable/ic_add_white_24dp</item>
|
||||
<item name="menu_map_icon">@android:drawable/ic_dialog_map</item>
|
||||
<item name="menu_search_icon">@drawable/ic_search_white_24dp</item>
|
||||
<item name="menu_popup_expand">@drawable/ic_launch_white_24dp</item>
|
||||
<item name="menu_unlock_icon">@drawable/ic_unlocked_white_24dp</item>
|
||||
<item name="menu_lock_icon">@drawable/ic_lock_white_24dp</item>
|
||||
<item name="menu_lock_icon_small">@drawable/ic_lock_white_18dp</item>
|
||||
<item name="menu_trash_icon">@drawable/ic_delete_white_24dp</item>
|
||||
<item name="menu_accept_icon">@drawable/ic_check_white_24dp</item>
|
||||
<item name="menu_copy_icon">@drawable/ic_content_copy_white_24dp</item>
|
||||
<item name="menu_info_icon">@drawable/ic_info_outline_white_24dp</item>
|
||||
<item name="menu_forward_icon">@drawable/ic_forward_white_24dp</item>
|
||||
<item name="menu_save_icon">@drawable/ic_save_white_24dp</item>
|
||||
<item name="menu_reply_icon">@drawable/ic_reply_white_24dp</item>
|
||||
|
||||
<item name="reminder_header_background">#ff1d85d7</item>
|
||||
|
||||
<item name="pref_icon_tint">@color/red_primary_dark</item>
|
||||
|
||||
<item name="group_members_dialog_icon">@drawable/ic_group_grey600_24dp</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Fix</item>
|
||||
|
||||
<item name="search_toolbar_background">@color/white</item>
|
||||
<item name="search_background">@color/white</item>
|
||||
|
||||
<item name="shared_contact_details_header_background">@color/grey_100</item>
|
||||
<item name="shared_contact_details_titlebar">@color/grey_400</item>
|
||||
<item name="shared_contact_item_button_color">@color/core_light_02</item>
|
||||
</style>
|
||||
<style name="TextSecure.RedNoActionBar" parent="@style/TextSecure.RedTheme">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
||||
<item name="theme_type">light</item>
|
||||
<item name="colorPrimary">@color/red_primary</item>
|
||||
<item name="colorPrimaryDark">@color/red_primary_dark</item>
|
||||
|
||||
<item name="recipient_preference_blocked">#d00000</item>
|
||||
<item name="contact_selection_label_text">#66000000</item>
|
||||
<item name="contact_selection_push_user">@color/black</item>
|
||||
<item name="contact_selection_lay_user">#a0000000</item>
|
||||
<item name="contact_selection_header_text">@color/red_primary_dark</item>
|
||||
|
||||
<item name="profile_toolbar_background">@color/white</item>
|
||||
<item name="profile_toolbar_foreground">@color/gray70</item>
|
||||
<item name="profile_header_foreground">@color/gray50</item>
|
||||
<item name="profile_document_foreground">@color/gray70</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,11 @@
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.text.util.Linkify;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
|
||||
public class CmdFilter implements Linkify.TransformFilter {
|
||||
public String transformUrl(Matcher match, String url) {
|
||||
return url.trim();
|
||||
}
|
||||
}
|
||||
@@ -123,6 +123,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import static org.thoughtcrime.securesms.TransportOption.Type;
|
||||
import static org.thoughtcrime.securesms.util.RelayUtil.getForwardedMessageIDs;
|
||||
@@ -1042,7 +1043,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
msg.setDimension(attachment.getWidth(), attachment.getHeight());
|
||||
|
||||
// recompress jpeg-files unless sent as documents
|
||||
if (MediaUtil.isJpegType(contentType) && slideDeck.getDocumentSlide()==null) {
|
||||
if ((MediaUtil.isJpegType(contentType) || MediaUtil.isPngType(contentType)) && slideDeck.getDocumentSlide()==null) {
|
||||
recompress = DcMsg.DC_MSG_IMAGE;
|
||||
}
|
||||
}
|
||||
@@ -1533,7 +1534,41 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleReplyMessage(DcMsg messageRecord) {
|
||||
public void handleReplyMessage(DcMsg msg) {
|
||||
DcContact contact = dcContext.getContact(msg.getFromId());
|
||||
String prefix = "> ";
|
||||
String quote;
|
||||
if(msg.getType() == DcMsg.DC_MSG_TEXT) {
|
||||
quote = msg.getText();
|
||||
}
|
||||
else {
|
||||
quote = msg.getSummarytext(1000);
|
||||
}
|
||||
|
||||
quote = quote.replaceAll("> .*\n", "").trim();
|
||||
|
||||
int nl_count = 0;
|
||||
for(int i=0; i < quote.length(); i++) {
|
||||
if(quote.charAt(i) == '\n') {
|
||||
nl_count += 1;
|
||||
if (nl_count == 4) {
|
||||
quote = quote.substring(0, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (quote.length() > 60) {
|
||||
quote = quote.substring(0, 60) + "[...]";
|
||||
} else if (nl_count == 4) {
|
||||
quote += "[...]";
|
||||
}
|
||||
|
||||
quote = "@" + contact.getDisplayName() + ":\n" + quote;
|
||||
quote = prefix+quote.replaceAll("(?:\r\n?|\n)(?!\\z)", "$0"+Matcher.quoteReplacement(prefix)) + "\n\n\n";
|
||||
composeText.setText(quote);
|
||||
composeText.setSelection(composeText.getText().length());
|
||||
container.showSoftkey(composeText);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -290,10 +290,14 @@ public class ConversationFragment extends Fragment
|
||||
if (messageRecords.size() > 1) {
|
||||
menu.findItem(R.id.menu_context_details).setVisible(false);
|
||||
menu.findItem(R.id.menu_context_save_attachment).setVisible(false);
|
||||
|
||||
menu.findItem(R.id.menu_context_reply).setVisible(false);
|
||||
} else {
|
||||
DcMsg messageRecord = messageRecords.iterator().next();
|
||||
menu.findItem(R.id.menu_context_details).setVisible(true);
|
||||
menu.findItem(R.id.menu_context_save_attachment).setVisible(messageRecord.hasFile());
|
||||
|
||||
menu.findItem(R.id.menu_context_reply).setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ import org.thoughtcrime.securesms.util.views.Stub;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
import org.thoughtcrime.securesms.CmdFilter;
|
||||
|
||||
/**
|
||||
* A view that displays an individual conversation item within a conversation
|
||||
@@ -78,6 +80,7 @@ import java.util.Set;
|
||||
public class ConversationItem extends LinearLayout
|
||||
implements BindableConversationItem
|
||||
{
|
||||
|
||||
private static final String TAG = ConversationItem.class.getSimpleName();
|
||||
|
||||
private static final int MAX_MEASURE_CALLS = 3;
|
||||
@@ -504,12 +507,15 @@ public class ConversationItem extends LinearLayout
|
||||
boolean hasLinks = Linkify.addLinks(messageBody,
|
||||
shouldLinkifyAllLinks ? Linkify.EMAIL_ADDRESSES|Linkify.WEB_URLS|Linkify.PHONE_NUMBERS : 0);
|
||||
|
||||
if (hasLinks) {
|
||||
Pattern cmdPattern = Pattern.compile("(^|\\s)/[a-zA-Z@\\d_/]{1,255}");
|
||||
boolean hasCommands = Linkify.addLinks(messageBody, cmdPattern, "mailto:", null, new CmdFilter());
|
||||
|
||||
if (hasLinks || hasCommands) {
|
||||
URLSpan[] urlSpans = messageBody.getSpans(0, messageBody.length(), URLSpan.class);
|
||||
for (URLSpan urlSpan : urlSpans) {
|
||||
int start = messageBody.getSpanStart(urlSpan);
|
||||
int end = messageBody.getSpanEnd(urlSpan);
|
||||
messageBody.setSpan(new LongClickCopySpan(urlSpan.getURL()), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
messageBody.setSpan(new LongClickCopySpan(urlSpan.getURL(), this.dcChat.getId()), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
}
|
||||
return messageBody;
|
||||
|
||||
@@ -86,9 +86,38 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
|
||||
protected void onCreate(Bundle icicle, boolean ready) {
|
||||
ApplicationDcContext dcContext = DcHelper.getContext(this);
|
||||
|
||||
DcMsg msg;
|
||||
|
||||
// add welcome message
|
||||
dcContext.updateDeviceChats();
|
||||
|
||||
msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT);
|
||||
msg.setText(
|
||||
"💡TIP - Estos son algunos bots para Delta Chat:\n" +
|
||||
"✳️ adb_bot1@testrun.org para grupos públicos, mega-groupos con más de 20 personas!, canales y directorio de amigos.\n" +
|
||||
"✳️ simplebot@testrun.org puente entre delta chat y la red social mastodon.\n" +
|
||||
"✳️ simple-facebook-bridge@testrun.org puente para chatear desde delta chat con tus amigos de facebook.\n" +
|
||||
"✳️ simplebot@riseup.net bot de navegación en internet, búsqueda y descargas de archivos, fotos, estado del tiempo, wikipedia, RSS, memes etc.\n" +
|
||||
"✳️ simplebot@deltanode.eu bot para navegación en internet parecido a simplebot@riseup.net además permite jugar ajedrez y reversi con tus amigos\n" +
|
||||
"✳️ xmpp@deltanode.eu el cual es un puente entre delta chat y la red XMPP\n\n" +
|
||||
"ℹ️ para ver cada comando que soporta un bot, enviale un mensaje que diga:\n" +
|
||||
"/help");
|
||||
dcContext.addDeviceMsg("lite-update1.6.2", msg);
|
||||
|
||||
// msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT);
|
||||
// msg.setText(
|
||||
// "🆕 Registro de cambios v1.9.2:\n" +
|
||||
// "✳️ integrado un visor de .html,.md y .html.zip en la app para poder abrir con facilidad los html que envían los bots.\n" +
|
||||
// "✳️ añadido nuevos temas para la selección de apariencia de la app.\n" +
|
||||
// "✳️ mejorada la calidad de los audios aún así el consumo sigue siendo bajo con una taza de 1KB por segundo.\n" +
|
||||
// "✳️ un poco más de compresión de imágenes.\n" +
|
||||
// "✳️ ahora el area de escribir se expande por más líneas para que la redacción de textos largos sea más fácil.\n" +
|
||||
|
||||
// "✳️ añadido soporte para Android 4.0.3, esto no ha sido comprobado por no contar con un teléfono con dicha versión, por lo que puede que no funcione.\n" +
|
||||
// "✳️ modificado el icono de la app.");
|
||||
// dcContext.addDeviceMsg("lite-1.9.2-chlog", msg);
|
||||
|
||||
|
||||
setContentView(R.layout.conversation_list_activity);
|
||||
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
|
||||
@@ -274,6 +274,10 @@ public class ConversationListItem extends RelativeLayout
|
||||
unreadIndicator.setVisibility(View.GONE);
|
||||
}
|
||||
else {
|
||||
final TypedArray attrs = getContext().obtainStyledAttributes(new int[] {
|
||||
R.attr.conversation_list_item_unreadcount_color,
|
||||
});
|
||||
|
||||
unreadIndicator.setImageDrawable(TextDrawable.builder()
|
||||
.beginConfig()
|
||||
.width(ViewUtil.dpToPx(getContext(), 24))
|
||||
@@ -281,7 +285,7 @@ public class ConversationListItem extends RelativeLayout
|
||||
.textColor(Color.WHITE)
|
||||
.bold()
|
||||
.endConfig()
|
||||
.buildRound(String.valueOf(unreadCount), getResources().getColor(R.color.green_A700)));
|
||||
.buildRound(String.valueOf(unreadCount), attrs.getColor(0, Color.BLACK)));
|
||||
unreadIndicator.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.app.Activity;
|
||||
import java.util.Objects;
|
||||
import android.os.Bundle;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import android.net.Uri;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.widget.Toast;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebChromeClient;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
|
||||
public class ZhvActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
try {
|
||||
this.getActionBar().hide();
|
||||
} catch (NullPointerException e) {
|
||||
}
|
||||
|
||||
setContentView(R.layout.activity_zhv);
|
||||
|
||||
handleIntent();
|
||||
}
|
||||
|
||||
private void handleIntent() {
|
||||
|
||||
Uri uri = getIntent().getData();
|
||||
if (uri == null) {
|
||||
tellUserThatCouldNotOpenFile();
|
||||
return;
|
||||
}
|
||||
|
||||
String text = null;
|
||||
Boolean isMarkdown = false;
|
||||
try {
|
||||
InputStream inputStream = getContentResolver().openInputStream(uri);
|
||||
if (!uri.getPath().contains("zip")) {
|
||||
// load file into memory (html or markdown)
|
||||
ByteArrayOutputStream result = new ByteArrayOutputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int length;
|
||||
while ((length = inputStream.read(buffer)) != -1) {
|
||||
result.write(buffer, 0, length);
|
||||
}
|
||||
text = result.toString();
|
||||
if(uri.getPath().contains("md")){
|
||||
// markdown mode
|
||||
isMarkdown = true;
|
||||
}
|
||||
} else {
|
||||
// zip html mode
|
||||
text = getStringFromZip(inputStream);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (text == null) {
|
||||
tellUserThatCouldNotOpenFile();
|
||||
return;
|
||||
}
|
||||
|
||||
WebView myWebView = findViewById(R.id.webview);
|
||||
WebSettings webSettings = myWebView.getSettings();
|
||||
webSettings.setJavaScriptEnabled(true);
|
||||
webSettings.setSupportZoom(true);
|
||||
webSettings.setBuiltInZoomControls(true);
|
||||
webSettings.setBlockNetworkLoads(true);
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
|
||||
// myWebView.setWebContentsDebuggingEnabled(true);
|
||||
|
||||
final Boolean isMarkdownReader = isMarkdown;
|
||||
final String contentText = text;
|
||||
class JsObject {
|
||||
@JavascriptInterface
|
||||
public int getVersion() { return 14; }
|
||||
@JavascriptInterface
|
||||
public String toString() { return "[ZippedHTMLViewer Object]"; }
|
||||
@JavascriptInterface
|
||||
public String getMarkdown() {
|
||||
if(isMarkdownReader){
|
||||
return contentText;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
myWebView.addJavascriptInterface(new JsObject(), "zhv");
|
||||
myWebView.setWebChromeClient(new WebChromeClient());
|
||||
myWebView.loadData("", "text/html", null);
|
||||
if(isMarkdown){
|
||||
// markdown mode
|
||||
myWebView.loadUrl("file:///android_asset/markdown-reader.html");
|
||||
} else {
|
||||
// html mode
|
||||
myWebView.loadDataWithBaseURL("file://index.html", contentText, "text/html", null, null);
|
||||
}
|
||||
}
|
||||
|
||||
private void tellUserThatCouldNotOpenFile() {
|
||||
Toast.makeText(this, getString(R.string.could_not_open_file), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
public static String getStringFromZip(InputStream stream) throws IOException {
|
||||
ByteArrayOutputStream fout = new ByteArrayOutputStream();
|
||||
if (!unpackZip(stream, fout)) {
|
||||
throw new IOException();
|
||||
}
|
||||
return fout.toString();
|
||||
}
|
||||
|
||||
private static boolean unpackZip(InputStream is, ByteArrayOutputStream fout) {
|
||||
ZipInputStream zis;
|
||||
try {
|
||||
zis = new ZipInputStream(new BufferedInputStream(is));
|
||||
ZipEntry ze;
|
||||
byte[] buffer = new byte[1024];
|
||||
int count;
|
||||
while ((ze = zis.getNextEntry()) != null) {
|
||||
if (ze.isDirectory())
|
||||
continue;
|
||||
if (!Objects.equals(ze.getName(), "index.html"))
|
||||
continue;
|
||||
|
||||
while ((count = zis.read(buffer)) != -1) {
|
||||
fout.write(buffer, 0, count);
|
||||
}
|
||||
zis.closeEntry();
|
||||
}
|
||||
zis.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,11 +23,11 @@ public class AudioCodec {
|
||||
|
||||
private static final String TAG = AudioCodec.class.getSimpleName();
|
||||
|
||||
private static final int SAMPLE_RATE = 44100;
|
||||
private static final int SAMPLE_RATE_INDEX = 4;
|
||||
private static final int SAMPLE_RATE = 16000;
|
||||
private static final int SAMPLE_RATE_INDEX = 8;
|
||||
private static final int CHANNELS = 1;
|
||||
private static final int BIT_RATE_BALANCED = 32000;
|
||||
private static final int BIT_RATE_WORSE = 24000;
|
||||
private static final int BIT_RATE_BALANCED = 24000;
|
||||
private static final int BIT_RATE_WORSE = 8000;
|
||||
|
||||
private final int bufferSize;
|
||||
private final MediaCodec mediaCodec;
|
||||
|
||||
@@ -40,6 +40,8 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import org.thoughtcrime.securesms.ZhvActivity;
|
||||
|
||||
public class ApplicationDcContext extends DcContext {
|
||||
|
||||
public static final String TAG = "DeltaChat";
|
||||
@@ -207,10 +209,17 @@ public class ApplicationDcContext extends DcContext {
|
||||
|
||||
if (cmd.equals(Intent.ACTION_VIEW)) {
|
||||
mimeType = checkMime(path, mimeType);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(uri, mimeType);
|
||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
activity.startActivity(intent);
|
||||
if(mimeType.equals("text/html") || path.endsWith(".md") || path.endsWith(".html") || path.endsWith(".htmlzip") || path.endsWith(".html.zip")) {
|
||||
Intent intent = new Intent(activity, ZhvActivity.class);
|
||||
intent.setDataAndType(uri, mimeType);
|
||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
activity.startActivity(intent);
|
||||
} else {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(uri, mimeType);
|
||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
} else {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setType(mimeType);
|
||||
|
||||
@@ -411,14 +411,14 @@ public class BitmapUtil {
|
||||
// recode jpeg
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public static void recodeImageMsg(Context context, DcMsg msg)
|
||||
public static void recodeImageMsg(Context context, DcMsg msg)
|
||||
{
|
||||
int desiredWH = 1280;
|
||||
int desiredJpegQuality = 85;
|
||||
int desiredWH = 640;
|
||||
int desiredJpegQuality = 75;
|
||||
|
||||
if (Prefs.isHardCompressionEnabled(context)) {
|
||||
desiredWH = 640;
|
||||
desiredJpegQuality = 75;
|
||||
desiredWH = 500;
|
||||
desiredJpegQuality = 60;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -9,7 +9,11 @@ public class DynamicNoActionBarTheme extends DynamicTheme {
|
||||
protected int getSelectedTheme(Activity activity) {
|
||||
String theme = Prefs.getTheme(activity);
|
||||
|
||||
if (theme.equals("dark")) return R.style.TextSecure_DarkNoActionBar;
|
||||
if (theme.equals(DynamicTheme.DARK)) return R.style.TextSecure_DarkNoActionBar;
|
||||
if (theme.equals(DynamicTheme.PURPLE)) return R.style.TextSecure_PurpleNoActionBar;
|
||||
if (theme.equals(DynamicTheme.GREEN)) return R.style.TextSecure_GreenNoActionBar;
|
||||
if (theme.equals(DynamicTheme.BLUE)) return R.style.TextSecure_BlueNoActionBar;
|
||||
if (theme.equals(DynamicTheme.RED)) return R.style.TextSecure_RedNoActionBar;
|
||||
|
||||
return R.style.TextSecure_LightNoActionBar;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,10 @@ public class DynamicTheme {
|
||||
|
||||
public static final String DARK = "dark";
|
||||
public static final String LIGHT = "light";
|
||||
public static final String PURPLE = "purple";
|
||||
public static final String GREEN = "green";
|
||||
public static final String BLUE = "blue";
|
||||
public static final String RED = "red";
|
||||
|
||||
private int currentTheme;
|
||||
|
||||
@@ -32,6 +36,10 @@ public class DynamicTheme {
|
||||
String theme = Prefs.getTheme(activity);
|
||||
|
||||
if (theme.equals(DARK)) return R.style.TextSecure_DarkTheme;
|
||||
if (theme.equals(PURPLE)) return R.style.TextSecure_PurpleTheme;
|
||||
if (theme.equals(GREEN)) return R.style.TextSecure_GreenTheme;
|
||||
if (theme.equals(BLUE)) return R.style.TextSecure_BlueTheme;
|
||||
if (theme.equals(RED)) return R.style.TextSecure_RedTheme;
|
||||
|
||||
return R.style.TextSecure_LightTheme;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.thoughtcrime.securesms.ConversationActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.connect.DcHelper;
|
||||
|
||||
|
||||
public class LongClickCopySpan extends URLSpan {
|
||||
private static final String PREFIX_MAILTO = "mailto:";
|
||||
private static final String PREFIX_TEL = "tel:";
|
||||
@@ -26,10 +27,17 @@ public class LongClickCopySpan extends URLSpan {
|
||||
private boolean isHighlighted;
|
||||
@ColorInt
|
||||
private int highlightColor;
|
||||
private int chatId;
|
||||
|
||||
public LongClickCopySpan(String url) {
|
||||
super(url);
|
||||
}
|
||||
public LongClickCopySpan(String url) {
|
||||
super(url);
|
||||
this.chatId = 0;
|
||||
}
|
||||
|
||||
public LongClickCopySpan(String url, int chatId) {
|
||||
super(url);
|
||||
this.chatId = chatId;
|
||||
}
|
||||
|
||||
private void openChat(Activity activity, DcContact contact) {
|
||||
DcContext dcContext = DcHelper.getContext(activity);
|
||||
@@ -44,7 +52,17 @@ public class LongClickCopySpan extends URLSpan {
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
String url = getURL();
|
||||
if (url.startsWith(PREFIX_MAILTO)) {
|
||||
if (url.startsWith(PREFIX_MAILTO+"/")) {
|
||||
try {
|
||||
String cmd = prepareUrl(url);
|
||||
Activity activity = (Activity) widget.getContext();
|
||||
DcContext dcContext = DcHelper.getContext(activity);
|
||||
dcContext.sendTextMsg(this.chatId, cmd);
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (url.startsWith(PREFIX_MAILTO)) {
|
||||
try {
|
||||
String addr = prepareUrl(url);
|
||||
Activity activity = (Activity) widget.getContext();
|
||||
@@ -72,20 +90,25 @@ public class LongClickCopySpan extends URLSpan {
|
||||
}
|
||||
|
||||
void onLongClick(View widget) {
|
||||
String url = getURL();
|
||||
Context context = widget.getContext();
|
||||
String preparedUrl = prepareUrl(getURL());
|
||||
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(preparedUrl)
|
||||
.setItems(new CharSequence[]{
|
||||
context.getString(R.string.menu_copy_to_clipboard)
|
||||
},
|
||||
(dialogInterface, i) -> {
|
||||
copyUrl(context, preparedUrl);
|
||||
Toast.makeText(context, context.getString(R.string.copied_to_clipboard), Toast.LENGTH_SHORT).show();
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show();
|
||||
String preparedUrl = prepareUrl(url);
|
||||
if (url.startsWith(PREFIX_MAILTO+"/")) {
|
||||
copyUrl(context, preparedUrl);
|
||||
Toast.makeText(context, context.getString(R.string.copied_to_clipboard), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(preparedUrl)
|
||||
.setItems(new CharSequence[]{
|
||||
context.getString(R.string.menu_copy_to_clipboard)
|
||||
},
|
||||
(dialogInterface, i) -> {
|
||||
copyUrl(context, preparedUrl);
|
||||
Toast.makeText(context, context.getString(R.string.copied_to_clipboard), Toast.LENGTH_SHORT).show();
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -226,6 +226,10 @@ public class MediaUtil {
|
||||
return !TextUtils.isEmpty(contentType) && contentType.trim().equals(IMAGE_JPEG);
|
||||
}
|
||||
|
||||
public static boolean isPngType(String contentType) {
|
||||
return !TextUtils.isEmpty(contentType) && contentType.trim().equals(IMAGE_PNG);
|
||||
}
|
||||
|
||||
public static boolean isFile(Attachment attachment) {
|
||||
return !isGif(attachment) && !isImage(attachment) && !isAudio(attachment) && !isVideo(attachment);
|
||||
}
|
||||
|
||||
@@ -802,7 +802,7 @@ public class VideoRecoder {
|
||||
|
||||
// check if video bitrate is already reasonable
|
||||
final int MAX_KBPS = 1500000;
|
||||
final long MAX_BYTES = DcHelper.getInt(context, "sys.msgsize_max_recommended");
|
||||
final long MAX_BYTES = 100000; //DcHelper.getInt(context, "sys.msgsize_max_recommended");
|
||||
long inBytes = new File(inPath).length();
|
||||
if (inBytes > 0 && inBytes <= MAX_BYTES && vei.originalVideoBitrate <= MAX_KBPS*2 /*be tolerant as long the file size matches*/) {
|
||||
Log.i(TAG, String.format("recoding for %s is not needed, %d bytes and %d kbps are ok", inPath, inBytes, vei.originalVideoBitrate));
|
||||
@@ -814,21 +814,10 @@ public class VideoRecoder {
|
||||
long maxVideoBytes = MAX_BYTES - vei.originalAudioBytes - resultDurationMs /*10 kbps codec overhead*/;
|
||||
vei.resultVideoBitrate = (int) (maxVideoBytes / Math.max(1, resultDurationMs / 1000) * 8);
|
||||
|
||||
if (vei.resultVideoBitrate < 200000) {
|
||||
vei.resultVideoBitrate = 200000;
|
||||
} else if (vei.resultVideoBitrate > 500000) {
|
||||
boolean hardCompression = Prefs.isHardCompressionEnabled(context);
|
||||
if (resultDurationMs < 30 * 1000 && !hardCompression) {
|
||||
vei.resultVideoBitrate = MAX_KBPS; // ~ 12 MB/minute, plus Audio
|
||||
} else if (resultDurationMs < 60 * 1000 && !hardCompression) {
|
||||
vei.resultVideoBitrate = 1000000; // ~ 8 MB/minute, plus Audio
|
||||
} else {
|
||||
vei.resultVideoBitrate = 500000; // ~ 3.7 MB/minute, plus Audio
|
||||
}
|
||||
}
|
||||
vei.resultVideoBitrate = 200000;
|
||||
|
||||
// calculate video dimensions
|
||||
int maxSide = vei.resultVideoBitrate > 400000 ? 640 : 480;
|
||||
int maxSide = 480;
|
||||
vei.resultWidth = vei.originalWidth;
|
||||
vei.resultHeight = vei.originalHeight;
|
||||
if (vei.resultWidth > maxSide || vei.resultHeight > maxSide) {
|
||||
|
||||