Resource and style cleanup.
Before Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 454 B |
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 454 B |
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:topLeftRadius="44dp"
|
||||
android:topRightRadius="44dp"
|
||||
android:bottomLeftRadius="44dp"
|
||||
android:bottomRightRadius="0dp"/>
|
||||
<solid android:color="#FF0288D1" />
|
||||
<size android:height="88dp" android:width="88dp" />
|
||||
</shape>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/touch_highlight">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/black" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/textsecure_primary">
|
||||
<item android:id="@android:id/mask" android:drawable="@android:color/black" />
|
||||
<item>
|
||||
<selector>
|
||||
<item android:drawable="@color/textsecure_primary_alpha33" android:state_selected="true" />
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/textsecure_primary">
|
||||
<item android:id="@android:id/mask" android:drawable="@android:color/black" />
|
||||
<item>
|
||||
<selector>
|
||||
<item android:drawable="@color/textsecure_primary_alpha33" android:state_selected="true" />
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="16dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="16dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="?dialog_background_color" />
|
||||
</shape>
|
||||
</inset>
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/core_grey_45">
|
||||
<item android:id="@+id/mask">
|
||||
<shape>
|
||||
<corners android:radius="1000dp" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/core_white" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_white_40">
|
||||
<item android:id="@+id/mask">
|
||||
<shape>
|
||||
<corners android:radius="1000dp" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/pill" />
|
||||
</ripple>
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_white_40">
|
||||
|
||||
<item android:id="@+id/mask">
|
||||
<shape>
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/transparent_black" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/transparent_black_70"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_white_40">
|
||||
|
||||
<item android:id="@+id/mask">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/transparent_black" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/core_grey_75"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_black_40">
|
||||
|
||||
<item android:id="@+id/mask">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/transparent_black" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/core_grey_05"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/touch_highlight">
|
||||
<item
|
||||
android:id="@android:id/mask"
|
||||
android:drawable="@android:color/white" />
|
||||
</ripple>
|
Before Width: | Height: | Size: 872 B |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 872 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/touch_highlight">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/touch_highlight" />
|
||||
<solid android:color="@color/black" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</ripple>
|
@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/textsecure_primary">
|
||||
<item android:id="@android:id/mask" android:drawable="@android:color/black" />
|
||||
<item>
|
||||
<selector>
|
||||
<item android:drawable="@color/textsecure_primary_alpha33" android:state_selected="true" />
|
||||
<item android:drawable="@color/textsecure_primary_alpha33" android:state_pressed="true" />
|
||||
<item android:drawable="@color/signal_primary_alpha_focus" android:state_focused="true" />
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/textsecure_primary">
|
||||
<item android:id="@android:id/mask" android:drawable="@android:color/black" />
|
||||
<item>
|
||||
<selector>
|
||||
<item android:drawable="@color/textsecure_primary_alpha33" android:state_selected="true" />
|
||||
<item android:drawable="@color/textsecure_primary_alpha33" android:state_pressed="true" />
|
||||
<item android:drawable="@color/signal_primary_alpha_focus" android:state_focused="true" />
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:startColor="#121212"
|
||||
android:endColor="#171717"
|
||||
android:startColor="@color/default_background_start"
|
||||
android:endColor="@color/default_background_end"
|
||||
android:type="linear" />
|
||||
|
||||
</shape>
|
@ -1,5 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/transparent" />
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="16dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="16dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="?dialog_background_color" />
|
||||
</shape>
|
||||
</inset>
|
@ -1,4 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/core_grey_45">
|
||||
<item android:id="@+id/mask">
|
||||
<shape>
|
||||
<corners android:radius="1000dp" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/core_white" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_white_40">
|
||||
<item android:id="@+id/mask">
|
||||
<shape>
|
||||
<corners android:radius="1000dp" />
|
||||
<solid android:color="@color/accent" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/pill" />
|
||||
</ripple>
|
@ -1,5 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_white_40">
|
||||
|
||||
<item android:id="@+id/mask">
|
||||
<shape>
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/transparent_black" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/transparent_black_70"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:topLeftRadius="44dp"
|
||||
android:topRightRadius="44dp"
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="44dp"/>
|
||||
android:bottomLeftRadius="44dp"
|
||||
android:bottomRightRadius="0dp"/>
|
||||
<solid android:color="#FF0288D1" />
|
||||
<size android:height="88dp" android:width="88dp" />
|
||||
</shape>
|
@ -1,4 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_white_40">
|
||||
|
||||
<item android:id="@+id/mask">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/transparent_black" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/core_grey_75"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -1,4 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/transparent_black_40">
|
||||
|
||||
<item android:id="@+id/mask">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/transparent_black" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/core_grey_05"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true" android:drawable="@color/touch_highlight" />
|
||||
<item android:state_focused="true" android:drawable="@color/signal_primary" />
|
||||
<item android:drawable="@android:color/transparent" />
|
||||
</selector>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/touch_highlight">
|
||||
<item
|
||||
android:id="@android:id/mask"
|
||||
android:drawable="@android:color/white" />
|
||||
</ripple>
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.exoplayer2.ui.PlayerView
|
||||
android:id="@+id/video_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
app:player_layout_id="@layout/media_preview_exoplayer_layout"/>
|
||||
|
||||
</FrameLayout>
|
@ -161,6 +161,22 @@
|
||||
android:layout_marginTop="@dimen/large_spacing"
|
||||
android:background="@color/separator" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/themeSwitchButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/setting_button_height"
|
||||
android:background="@color/accent"
|
||||
android:textColor="@color/text"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:text="Switch Theme" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/separator" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/privacyButton"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -1,13 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<VideoView android:id="@+id/video_view"
|
||||
<com.google.android.exoplayer2.ui.PlayerView
|
||||
android:id="@+id/video_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"/>
|
||||
android:gravity="center"
|
||||
app:player_layout_id="@layout/media_preview_exoplayer_layout"/>
|
||||
|
||||
</FrameLayout>
|
32
res/values-notnight/colors.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
|
||||
<!-- Session -->
|
||||
<color name="accent">#00E97B</color>
|
||||
<color name="text">#000000</color>
|
||||
<color name="cell_background">#FCFCFC</color>
|
||||
<color name="cell_selected">#DFDFDF</color>
|
||||
<color name="navigation_bar_background">#FCFCFC</color>
|
||||
<color name="unimportant_button_background">@color/transparent</color>
|
||||
<color name="dialog_background">#FCFCFC</color>
|
||||
<color name="dialog_border">#212121</color>
|
||||
<color name="compose_view_background">#FCFCFC</color>
|
||||
<color name="compose_text_view_background">#EDEDED</color>
|
||||
<color name="received_message_background">#F5F5F5</color>
|
||||
<color name="sent_message_background">#00E97B</color>
|
||||
<color name="new_conversation_button_collapsed_background">#F5F5F5</color>
|
||||
<color name="pn_option_background">#FCFCFC</color>
|
||||
<color name="fake_chat_bubble_background">#F5F5F5</color>
|
||||
|
||||
|
||||
<color name="default_background_start">#fcfcfd</color>
|
||||
<color name="default_background_end">#fcfcfd</color>
|
||||
<color name="action_bar_background">#fcfcfd</color>
|
||||
|
||||
|
||||
<color name="unimportant_dialog_button_background">#1B1B1B</color>
|
||||
<color name="app_icon_background">#333132</color>
|
||||
<color name="progress_bar_background">#0AFFFFFF</color>
|
||||
<color name="quote_not_found_background">#99FFFFFF</color>
|
||||
|
||||
</resources>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Widget.ProgressBar.Horizontal" parent="@android:style/Widget.Holo.ProgressBar.Horizontal">
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="touch_highlight">#22000000</color>
|
||||
</resources>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TextSecure.ScribbleTheme" parent="TextSecure.DarkNoActionBar">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
</style>
|
||||
</resources>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="TextSecure.DarkTheme" parent="@style/TextSecure.BaseDarkTheme">
|
||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkNoActionBar" parent="@style/TextSecure.BaseDarkNoActionBar">
|
||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||
<item name="android:colorControlActivated">@color/signal_primary_dark</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="NotificationText" parent="android:TextAppearance.StatusBar.EventContent" />
|
||||
<style name="NotificationTitle" parent="android:TextAppearance.StatusBar.EventContent.Title" />
|
||||
</resources>
|
@ -82,7 +82,7 @@
|
||||
<color name="conversation_compose_divider">#32000000</color>
|
||||
|
||||
<color name="action_mode_status_bar">@color/gray65</color>
|
||||
<color name="touch_highlight">#400099cc</color>
|
||||
<color name="touch_highlight">#22000000</color>
|
||||
|
||||
<color name="device_link_item_background_light">#ffffffff</color>
|
||||
<color name="device_link_item_background_dark">#ff333333</color>
|
||||
@ -107,4 +107,7 @@
|
||||
|
||||
<color name="avatar_background">@color/transparent_black_90</color>
|
||||
|
||||
<color name="default_background_start">#121212</color>
|
||||
<color name="default_background_end">#171717</color>
|
||||
|
||||
</resources>
|
||||
|
@ -296,11 +296,10 @@
|
||||
<item name="android:textColor">#BFffffff</item>
|
||||
</style>
|
||||
|
||||
<style name="NotificationText">
|
||||
<style name="NotificationText" parent="android:TextAppearance.StatusBar.EventContent">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="NotificationTitle">
|
||||
<style name="NotificationTitle" parent="android:TextAppearance.StatusBar.EventContent.Title">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
@ -350,7 +349,7 @@
|
||||
|
||||
<!-- For Holo Light Dialog Activity Styling Emulation -->
|
||||
|
||||
<style name="Widget.ProgressBar.Horizontal" parent="@android:style/Widget.ProgressBar.Horizontal">
|
||||
<style name="Widget.ProgressBar.Horizontal" parent="@android:style/Widget.Holo.ProgressBar.Horizontal">
|
||||
</style>
|
||||
|
||||
<style name="MaterialButton">
|
||||
|
@ -3,43 +3,23 @@
|
||||
<resources>
|
||||
|
||||
<!-- Session -->
|
||||
<style name="Session.DarkTheme" parent="@style/Theme.AppCompat">
|
||||
<item name="actionBarStyle">@style/Session.DarkActionBar</item>
|
||||
<style name="Session.DarkTheme" parent="@style/Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/action_bar_background</item>
|
||||
<item name="colorPrimaryDark">@color/action_bar_background</item>
|
||||
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
<item name="actionBarStyle">@style/Session.DarkActionBar</item>
|
||||
<item name="alertDialogTheme">@style/Session.AlertDialog</item>
|
||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||
<item name="android:windowBackground">@drawable/default_session_background</item>
|
||||
<item name="preferenceTheme">@style/Session.SettingsTheme</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
<item name="actionModeBackground">@color/compose_view_background</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Session.DarkTheme.NoActionBar" parent="@style/Theme.AppCompat.NoActionBar">
|
||||
<item name="actionBarStyle">@style/Session.DarkActionBar</item>
|
||||
<item name="colorPrimary">@color/action_bar_background</item>
|
||||
<item name="colorPrimaryDark">@color/action_bar_background</item>
|
||||
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
|
||||
<item name="alertDialogTheme">@style/Session.AlertDialog</item>
|
||||
<item name="android:windowBackground">@drawable/default_session_background</item>
|
||||
<item name="preferenceTheme">@style/Session.SettingsTheme</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
<item name="actionModeBackground">@color/compose_view_background</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
</style>
|
||||
<style name="Session.DarkTheme.NoActionBar" parent="@style/Theme.AppCompat.DayNight.NoActionBar"/>
|
||||
|
||||
<style name="Session.DarkTheme.SubtitleActionBar" parent="@style/Theme.AppCompat">
|
||||
<style name="Session.DarkTheme.SubtitleActionBar" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="actionBarStyle">@style/Session.DarkSubtitleActionBar</item>
|
||||
<item name="colorPrimary">@color/action_bar_background</item>
|
||||
<item name="colorPrimaryDark">@color/action_bar_background</item>
|
||||
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
|
||||
<item name="alertDialogTheme">@style/Session.AlertDialog</item>
|
||||
<item name="android:windowBackground">@drawable/default_session_background</item>
|
||||
<item name="preferenceTheme">@style/Session.SettingsTheme</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
<item name="actionModeBackground">@color/compose_view_background</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
</style>
|
||||
<!-- Session -->
|
||||
|
||||
@ -68,7 +48,8 @@
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkNoActionBar" parent="@style/TextSecure.BaseDarkNoActionBar">
|
||||
<!-- leave empty to allow overriding -->
|
||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||
<item name="android:colorControlActivated">@color/signal_primary_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.BaseDarkNoActionBar" parent="@style/TextSecure.BaseDarkTheme">
|
||||
@ -535,6 +516,8 @@
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.ScribbleTheme" parent="TextSecure.DarkNoActionBar">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.MediaSendProgressDialog" parent="@android:style/Theme.Dialog">
|
||||
|
@ -5,11 +5,13 @@ import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.net.Uri
|
||||
import android.os.AsyncTask
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.support.v7.app.AppCompatDelegate
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.LinearLayout
|
||||
@ -66,6 +68,11 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
// region Lifecycle
|
||||
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
|
||||
super.onCreate(savedInstanceState, isReady)
|
||||
// setTheme(if (isDarkTheme())
|
||||
// R.style.Session_DarkTheme_NoActionBar
|
||||
// else
|
||||
// R.style.Session_LightTheme_NoActionBar)
|
||||
|
||||
setContentView(R.layout.activity_settings)
|
||||
setSupportActionBar(toolbar)
|
||||
cancelButton.setOnClickListener { cancelEditingDisplayName() }
|
||||
@ -96,6 +103,21 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
seedButton.setOnClickListener { showSeed() }
|
||||
clearAllDataButton.setOnClickListener { clearAllData() }
|
||||
versionTextView.text = String.format(getString(R.string.version_s), BuildConfig.VERSION_NAME)
|
||||
|
||||
themeSwitchButton.setOnClickListener {
|
||||
setDarkTheme(!isDarkTheme())
|
||||
recreate()
|
||||
}
|
||||
}
|
||||
|
||||
private fun isDarkTheme(): Boolean {
|
||||
val themeFlag = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
||||
return themeFlag == Configuration.UI_MODE_NIGHT_YES;
|
||||
}
|
||||
|
||||
private fun setDarkTheme(darkTheme: Boolean) {
|
||||
// AppCompatDelegate.setDefaultNightMode(if (darkTheme) AppCompatDelegate.MODE_NIGHT_YES else AppCompatDelegate.MODE_NIGHT_NO )
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO)
|
||||
}
|
||||
|
||||
public override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
|