mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Daynight theme for media preview & overview activities.
This commit is contained in:
parent
4da13f8541
commit
b05350b5aa
@ -125,7 +125,8 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="org.thoughtcrime.securesms.loki.activities.QRCodeActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.Session.DayNight.FlatActionBar"/>
|
||||
<activity
|
||||
android:name="org.thoughtcrime.securesms.loki.activities.CreatePrivateChatActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@ -411,7 +412,7 @@
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
|
||||
android:label="@string/AndroidManifest__media_preview"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.Session.DayNight"
|
||||
android:theme="@style/Theme.Session.DayNight.NoActionBar"
|
||||
android:launchMode="singleTask"
|
||||
android:windowSoftInputMode="stateHidden" />
|
||||
<activity
|
||||
|
13
res/animator/appbar_elevation.xml
Normal file
13
res/animator/appbar_elevation.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This seems to be the dirties and the only way to set AppBar's elevation property.
|
||||
God help Android and us all.
|
||||
https://stackoverflow.com/a/45703684/3802890 -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<objectAnimator
|
||||
android:duration="1"
|
||||
android:propertyName="elevation"
|
||||
android:valueTo="1dp"
|
||||
android:valueType="floatType" />
|
||||
</item>
|
||||
</selector>
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
style="@style/Session.DarkTabLayout"
|
||||
style="@style/Widget.Session.TabLayout"
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_bar_height" />
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
style="@style/Session.DarkTabLayout"
|
||||
style="@style/Widget.Session.TabLayout"
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_bar_height" />
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
style="@style/Session.DarkTabLayout"
|
||||
style="@style/Widget.Session.TabLayout"
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_bar_height" />
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
style="@style/Session.DarkTabLayout"
|
||||
style="@style/Widget.Session.TabLayout"
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_bar_height" />
|
||||
|
@ -28,7 +28,7 @@
|
||||
android:visibility="gone"
|
||||
android:clickable="false"
|
||||
android:layout_gravity="center"
|
||||
app:matProg_barColor="@color/white"
|
||||
app:matProg_barColor="?android:textColorPrimary"
|
||||
app:matProg_linearProgress="true"
|
||||
app:matProg_spinSpeed="0.333"
|
||||
tools:visibility="gone"/>
|
||||
@ -42,7 +42,8 @@
|
||||
android:gravity="center"
|
||||
android:visibility="visible"
|
||||
android:clickable="false"
|
||||
android:focusable="false">
|
||||
android:focusable="false"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
@ -62,7 +63,7 @@
|
||||
style="@style/Signal.Text.Caption"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/core_black"
|
||||
android:textColor="?attachment_document_extension_text_color"
|
||||
tools:visibility="visible"
|
||||
tools:text="PDF" />
|
||||
|
||||
@ -75,8 +76,9 @@
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_download_circle_fill_white_48dp"
|
||||
android:contentDescription="@string/audio_view__download_accessibility_description"/>
|
||||
android:src="@drawable/ic_download_circle_filled_48"
|
||||
android:contentDescription="@string/audio_view__download_accessibility_description"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Session.DarkTabLayout"
|
||||
android:theme="@style/Widget.Session.TabLayout"
|
||||
app:tabRippleColor="@color/cell_selected"
|
||||
app:tabIndicatorColor="@color/accent"
|
||||
android:scrollbars="horizontal"/>
|
||||
|
@ -1,32 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
tools:context="org.thoughtcrime.securesms.MediaOverviewActivity"
|
||||
android:theme="@style/Theme.Session.DayNight.NoActionBar">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
style="@style/Widget.Session.AppBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:stateListAnimator="@animator/appbar_elevation">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
style="@style/Widget.Session.ActionBar"
|
||||
app:layout_scrollFlags="scroll|enterAlways"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.ControllableTabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
style="@style/Widget.Session.TabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
style="@style/Session.DarkTabLayout"
|
||||
android:background="?attr/media_overview_toolbar_background"
|
||||
app:tabBackground="?attr/media_overview_toolbar_background"
|
||||
app:tabIndicatorColor="@color/textsecure_primary"
|
||||
app:tabSelectedTextColor="@color/textsecure_primary"/>
|
||||
android:layout_gravity="top"/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible"
|
||||
app:doc_titleColor="?media_overview_document_primary"
|
||||
app:doc_captionColor="?media_overview_document_secondary"
|
||||
app:doc_titleColor="?android:textColorPrimary"
|
||||
app:doc_captionColor="?android:textColorTertiary"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView android:id="@+id/date"
|
||||
@ -25,7 +25,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textSize="12sp"
|
||||
android:textColor="?media_overview_document_secondary"
|
||||
android:textColor="?android:textColorTertiary"
|
||||
android:paddingTop="20dp"
|
||||
tools:text="Jun 1"/>
|
||||
|
||||
|
@ -1,22 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
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">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical" />
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
tools:listitem="@layout/media_overview_document_item" />
|
||||
|
||||
<TextView android:id="@+id/no_documents"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/text"
|
||||
android:text="@string/media_overview_documents_fragment__no_documents_found" />
|
||||
<TextView
|
||||
android:id="@+id/no_documents"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/media_overview_documents_fragment__no_documents_found"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -7,6 +7,19 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
style="@style/Widget.Session.AppBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:stateListAnimator="@animator/appbar_elevation">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<org.thoughtcrime.securesms.components.viewpager.HackyViewPager
|
||||
android:id="@+id/media_pager"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -12,6 +12,9 @@
|
||||
<item name="message_sent_background_color">?colorAccent</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
|
||||
<item name="attachment_document_icon_small">@drawable/ic_document_small_light</item>
|
||||
<item name="attachment_document_icon_large">@drawable/ic_document_large_light</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.TextSecure.DayNight">
|
||||
@ -19,22 +22,8 @@
|
||||
<item name="android:navigationBarColor">?android:navigationBarColor</item>
|
||||
|
||||
<item name="theme_type">light</item>
|
||||
<!-- <item name="actionBarTabBarStyle">@style/TextSecure.LightActionBar.TabBar</item>-->
|
||||
<!-- <item name="colorPrimary">@color/action_bar_background</item>-->
|
||||
|
||||
<!-- <item name="colorPrimaryDark">@color/action_bar_background</item>-->
|
||||
<!-- <item name="colorAccent">@color/accent</item>-->
|
||||
<!-- <item name="colorControlActivated">@color/accent</item>-->
|
||||
<!-- <item name="colorControlNormal">@color/text</item>-->
|
||||
<!-- <item name="colorControlHighlight">@color/accent</item>-->
|
||||
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
|
||||
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
|
||||
<!-- <item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.Light.BottomSheetDialog</item>-->
|
||||
<!--<item name="android:windowContentOverlay">@drawable/compat_actionbar_shadow_background</item>-->
|
||||
|
||||
<item name="attachment_type_selector_background">@color/white</item>
|
||||
<item name="attachment_document_icon_small">@drawable/ic_document_small_light</item>
|
||||
<item name="attachment_document_icon_large">@drawable/ic_document_large_light</item>
|
||||
|
||||
<item name="compose_icon_tint">@color/core_grey_60</item>
|
||||
|
||||
|
@ -1,12 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TextSecure.LightRegistrationTheme" parent="TextSecure.LightNoActionBar">
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:statusBarColor">@color/core_grey_02</item>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Theme.Session.ForceDark" parent="Base.Theme.Session.ForceDark">
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkRegistrationTheme" parent="Theme.TextSecure.DayNight.NoActionBar">
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:statusBarColor">@color/core_black</item>
|
||||
</style>
|
||||
</resources>
|
||||
</resources>
|
@ -5,6 +5,7 @@
|
||||
<attr name="attachment_type_selector_background" format="color"/>
|
||||
<attr name="attachment_document_icon_small" format="reference" />
|
||||
<attr name="attachment_document_icon_large" format="reference" />
|
||||
<attr name="attachment_document_extension_text_color" format="color" />
|
||||
|
||||
<attr name="conversation_list_item_background" format="reference"/>
|
||||
<attr name="conversation_list_item_contact_color" format="reference|color"/>
|
||||
|
@ -3,10 +3,9 @@
|
||||
|
||||
<!-- Session -->
|
||||
<style name="Widget.Session.ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
|
||||
<item name="android:elevation">1dp</item>
|
||||
<item name="android:background">?colorPrimary</item>
|
||||
<item name="elevation">1dp</item>
|
||||
<item name="titleTextStyle">@style/TextAppearance.Session.DarkActionBar.TitleTextStyle</item>
|
||||
<item name="minHeight">?attr/actionBarSize</item>
|
||||
<item name="popupTheme">@style/Widget.Session.ActionBar</item>
|
||||
</style>
|
||||
|
||||
@ -21,7 +20,7 @@
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.BaseDarkTheme.SearchView" parent="@style/Widget.AppCompat.SearchView">
|
||||
<item name="closeIcon">@drawable/ic_close_white_24dp</item>
|
||||
<item name="closeIcon">@drawable/ic_baseline_clear_24</item>
|
||||
</style>
|
||||
|
||||
<style name="Session.AlertDialog" parent="ThemeOverlay.AppCompat.Dialog.Alert">
|
||||
@ -41,15 +40,26 @@
|
||||
<item name="android:textColor">@color/accent</item>
|
||||
</style>
|
||||
|
||||
<style name="Session.DarkTabLayout" parent="Widget.Design.TabLayout">
|
||||
<item name="tabIndicatorColor">@color/accent</item>
|
||||
<item name="tabIndicatorHeight">@dimen/accent_line_thickness</item>
|
||||
<item name="tabBackground">@color/action_bar_background</item>
|
||||
<item name="tabRippleColor">@color/cell_selected</item>
|
||||
<item name="tabTextAppearance">@style/Session.DarkTabLayout.TextAppearance</item>
|
||||
<style name="Widget.Session.AppBarLayout" parent="@style/Widget.Design.AppBarLayout">
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Session.DarkTabLayout.TextAppearance" parent="TextAppearance.Design.Tab">
|
||||
<style name="Widget.Session.TabBar" parent="Widget.AppCompat.ActionBar.TabBar">
|
||||
<item name="elevation">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Session.TabLayout" parent="Widget.Design.TabLayout">
|
||||
<!-- TODO Should use the same color as action bar background. -->
|
||||
<!-- <item name="android:background">@color/compose_view_background</item>-->
|
||||
<item name="elevation">1dp</item>
|
||||
<item name="tabIndicatorColor">?colorAccent</item>
|
||||
<item name="tabSelectedTextColor">?colorAccent</item>>
|
||||
<item name="tabIndicatorHeight">@dimen/accent_line_thickness</item>
|
||||
<item name="tabRippleColor">@color/cell_selected</item>
|
||||
<item name="tabTextAppearance">@style/TextAppearance.Session.Tab</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Session.Tab" parent="TextAppearance.Design.Tab">
|
||||
<item name="android:textSize">@dimen/medium_font_size</item>
|
||||
<item name="textAllCaps">false</item>
|
||||
</style>
|
||||
|
@ -18,8 +18,6 @@
|
||||
<item name="android:windowBackground">@drawable/default_session_background</item>
|
||||
<item name="android:colorBackground">@color/default_background_start</item>
|
||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||
<!-- <item name="actionBarStyle">@style/Widget.Session.ActionBar</item>-->
|
||||
<!-- <item name="actionBarTheme">@style/Widget.Session.ActionBar</item>-->
|
||||
|
||||
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
<item name="actionBarWidgetTheme">@null</item>
|
||||
@ -31,9 +29,13 @@
|
||||
<item name="preferenceTheme">@style/Session.SettingsTheme</item>
|
||||
<item name="statusBarBackground">@color/accent</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="appBarLayoutStyle">@style/Widget.Design.AppBarLayout</item>
|
||||
<item name="appBarLayoutStyle">@style/Widget.Session.AppBarLayout</item>
|
||||
|
||||
|
||||
<item name="actionBarTabBarStyle">@style/Widget.Session.TabBar</item>
|
||||
<item name="search_toolbar_background">@color/black</item>
|
||||
<item name="search_background">@color/black</item>
|
||||
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/ic_baseline_clear_24</item>
|
||||
<item name="actionModeBackground">@color/compose_view_background</item>
|
||||
@ -41,8 +43,23 @@
|
||||
<item name="dividerVertical">@color/separator</item>
|
||||
<item name="dividerHorizontal">?dividerVertical</item>
|
||||
|
||||
|
||||
<!-- App specific attributes -->
|
||||
<item name="dialog_background_color">@color/dialog_background</item>
|
||||
<item name="media_overview_toolbar_background">@color/transparent</item>
|
||||
<item name="media_overview_toolbar_foreground">@color/white</item>
|
||||
<item name="media_overview_header_foreground">@color/text</item>
|
||||
<item name="media_overview_document_primary">@color/core_grey_05</item>
|
||||
<item name="media_overview_document_secondary">#99FFFFFF</item>
|
||||
<item name="media_keyboard_button_color">@color/core_grey_25</item>
|
||||
<item name="searchViewStyle">@style/TextSecure.BaseDarkTheme.SearchView</item>
|
||||
|
||||
<item name="attachment_type_selector_background">?background</item>
|
||||
<item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item>
|
||||
<item name="attachment_document_icon_large">@drawable/ic_document_large_dark</item>
|
||||
<item name="attachment_document_extension_text_color">#222</item>
|
||||
|
||||
|
||||
|
||||
<item name="home_gradient_start">#00000000</item>
|
||||
<item name="home_gradient_end">#FF000000</item>
|
||||
@ -72,17 +89,22 @@
|
||||
<style name="Theme.Session.DayNight">
|
||||
<!-- leave empty to allow overriding -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.Session.DayNight.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<!-- <style name="Session.DarkTheme.SubtitleActionBar" parent="@style/Theme.Session.DayNight">-->
|
||||
<style name="Theme.Session.DayNight.FlatActionBar">
|
||||
<item name="actionBarStyle">@style/Widget.Session.ActionBar.Flat</item>
|
||||
</style>
|
||||
|
||||
<!-- <style name="Session.DarkTheme.SubtitleActionBar" parent="@style/Theme.Session.DayNight">-->
|
||||
<!-- <item name="actionBarStyle">@style/Session.DarkSubtitleActionBar</item>-->
|
||||
<!-- </style>-->
|
||||
|
||||
<!-- TODO Refactor this to use color resources -->
|
||||
<style name="Theme.Session.ForceDark" parent="Theme.Session.DayNight">
|
||||
<style name="Base.Theme.Session.ForceDark" parent="Theme.Session.DayNight">
|
||||
<!-- TODO Use a color resource -->
|
||||
<item name="colorPrimary">#171717</item>
|
||||
<item name="android:textColorPrimary">#FFFFFF</item>
|
||||
@ -92,7 +114,15 @@
|
||||
<item name="android:colorBackground">#121212</item>
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
<item name="android:navigationBarColor">?android:colorBackground</item>
|
||||
<item name="android:statusBarColor">?colorPrimary</item>
|
||||
<item name="android:statusBarColor">@color/transparent</item>
|
||||
|
||||
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
<item name="actionBarWidgetTheme">@null</item>
|
||||
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||
<item name="actionBarStyle">@style/Widget.AppCompat.ActionBar</item>
|
||||
</style>
|
||||
<style name="Theme.Session.ForceDark" parent="Base.Theme.Session.ForceDark">
|
||||
<!-- leave empty to allow overriding -->
|
||||
</style>
|
||||
<style name="Theme.Session.ForceDark.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
@ -396,13 +426,11 @@
|
||||
<item name="media_overview_toolbar_background">@color/transparent</item>
|
||||
<item name="media_overview_toolbar_foreground">@color/white</item>
|
||||
<item name="media_overview_header_foreground">@color/text</item>
|
||||
<item name="media_overview_document_primary">@color/core_grey_05</item>
|
||||
<item name="media_overview_document_secondary">#99FFFFFF</item>
|
||||
|
||||
<item name="theme_type">dark</item>
|
||||
<!-- <item name="actionBarTheme">@style/Widget.Session.ActionBar</item>-->
|
||||
<item name="searchViewStyle">@style/TextSecure.BaseDarkTheme.SearchView</item>
|
||||
<item name="actionBarTabBarStyle">@style/TextSecure.DarkActionBar.TabBar</item>
|
||||
<!-- <item name="actionBarTabBarStyle">@style/TextSecure.DarkActionBar.TabBar</item>-->
|
||||
<!-- <item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.DayNight</item>-->
|
||||
<!-- <item name="actionModeBackground">@color/compose_view_background</item>-->
|
||||
<!-- <item name="actionModeCloseDrawable">@drawable/ic_close_white_24dp</item>-->
|
||||
|
@ -25,21 +25,6 @@ import android.content.res.Resources;
|
||||
import android.database.Cursor;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.loader.app.LoaderManager;
|
||||
import androidx.loader.content.Loader;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.view.ActionMode;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
@ -49,7 +34,23 @@ import android.view.Window;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.view.ActionMode;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.loader.app.LoaderManager;
|
||||
import androidx.loader.content.Loader;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.codewaves.stickyheadergrid.StickyHeaderGridLayoutManager;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
|
||||
import org.thoughtcrime.securesms.database.Address;
|
||||
import org.thoughtcrime.securesms.database.CursorRecyclerViewAdapter;
|
||||
@ -62,8 +63,6 @@ import org.thoughtcrime.securesms.permissions.Permissions;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.AttachmentUtil;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
import org.thoughtcrime.securesms.util.SaveAttachmentTask;
|
||||
import org.thoughtcrime.securesms.util.StickyHeaderDecoration;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
@ -87,7 +86,6 @@ public class MediaOverviewActivity extends PassphraseRequiredActionBarActivity {
|
||||
|
||||
public static final String ADDRESS_EXTRA = "address";
|
||||
|
||||
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
|
||||
private final DynamicLanguage dynamicLanguage = new DynamicLanguage();
|
||||
|
||||
private Toolbar toolbar;
|
||||
@ -97,14 +95,12 @@ public class MediaOverviewActivity extends PassphraseRequiredActionBarActivity {
|
||||
|
||||
@Override
|
||||
protected void onPreCreate() {
|
||||
dynamicTheme.onCreate(this);
|
||||
dynamicLanguage.onCreate(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle bundle, boolean ready) {
|
||||
setContentView(R.layout.media_overview_activity);
|
||||
getWindow().setNavigationBarColor(getResources().getColor(R.color.navigation_bar_background));
|
||||
|
||||
initializeResources();
|
||||
initializeToolbar();
|
||||
@ -116,7 +112,6 @@ public class MediaOverviewActivity extends PassphraseRequiredActionBarActivity {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
dynamicTheme.onResume(this);
|
||||
dynamicLanguage.onResume(this);
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,8 @@ package org.thoughtcrime.securesms;
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -150,7 +152,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
|
||||
|
||||
@Override
|
||||
public void onModified(Recipient recipient) {
|
||||
Util.runOnMain(this::initializeActionBar);
|
||||
Util.runOnMain(this::updateActionBar);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -164,7 +166,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
private void initializeActionBar() {
|
||||
private void updateActionBar() {
|
||||
MediaItem mediaItem = getCurrentMediaItem();
|
||||
|
||||
if (mediaItem != null) {
|
||||
@ -222,6 +224,9 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
|
||||
caption = findViewById(R.id.media_preview_caption);
|
||||
captionContainer = findViewById(R.id.media_preview_caption_container);
|
||||
playbackControlsContainer = findViewById(R.id.media_preview_playback_controls_container);
|
||||
|
||||
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
}
|
||||
|
||||
private void initializeResources() {
|
||||
@ -476,7 +481,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
|
||||
MediaItem item = adapter.getMediaItemFor(position);
|
||||
if (item.recipient != null) item.recipient.addListener(MediaPreviewActivity.this);
|
||||
viewModel.setActiveAlbumRailItem(MediaPreviewActivity.this, position);
|
||||
initializeActionBar();
|
||||
updateActionBar();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,10 @@ import android.content.Intent;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
|
||||
/**
|
||||
* @deprecated Use conventional DayNight app themes to support dark/light modes.
|
||||
*/
|
||||
@Deprecated
|
||||
public class DynamicTheme {
|
||||
|
||||
public static final String DARK = "dark";
|
||||
|
Loading…
x
Reference in New Issue
Block a user