mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 19:38:45 +00:00
Fix colors
This commit is contained in:
parent
43fbc3de55
commit
dfd9bd89f9
@ -38,7 +38,9 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity() {
|
||||
val adapter = ConversationAdapter(this, cursor)
|
||||
adapter.setHasStableIds(true)
|
||||
conversationRecyclerView.adapter = adapter
|
||||
conversationRecyclerView.layoutManager = LinearLayoutManager(this)
|
||||
val layoutManager = LinearLayoutManager(this)
|
||||
layoutManager.reverseLayout = true
|
||||
conversationRecyclerView.layoutManager = layoutManager
|
||||
}
|
||||
|
||||
private fun setUpToolbar() {
|
||||
|
@ -16,6 +16,9 @@ import network.loki.messenger.R
|
||||
import org.session.libsession.utilities.ThemeUtil
|
||||
import org.thoughtcrime.securesms.database.model.MessageRecord
|
||||
import org.thoughtcrime.securesms.database.model.MmsMessageRecord
|
||||
import org.thoughtcrime.securesms.loki.utilities.UiMode
|
||||
import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities
|
||||
import org.thoughtcrime.securesms.loki.utilities.getColorWithID
|
||||
import java.lang.IllegalStateException
|
||||
|
||||
class VisibleMessageContentView : LinearLayout {
|
||||
@ -64,19 +67,25 @@ class VisibleMessageContentView : LinearLayout {
|
||||
} else if (message is MmsMessageRecord && message.slideDeck.asAttachments().isNotEmpty()) {
|
||||
throw IllegalStateException("Not yet implemented; we may want to use Signal's album view here.")
|
||||
} else {
|
||||
val bodyTextView = getBodyTextView(message.body)
|
||||
val bodyTextView = getBodyTextView(message)
|
||||
mainContainer.addView(bodyTextView)
|
||||
}
|
||||
}
|
||||
// endregion
|
||||
|
||||
// region Convenience
|
||||
private fun getBodyTextView(body: String): TextView {
|
||||
private fun getBodyTextView(message: MessageRecord): TextView {
|
||||
val result = TextView(context)
|
||||
result.setPadding(resources.getDimension(R.dimen.small_spacing).toInt())
|
||||
result.text = body
|
||||
result.text = message.body
|
||||
result.setTextSize(TypedValue.COMPLEX_UNIT_PX, resources.getDimension(R.dimen.medium_font_size))
|
||||
// TODO: Further styling
|
||||
val uiMode = UiModeUtilities.getUserSelectedUiMode(context)
|
||||
val colorID = if (message.isOutgoing) {
|
||||
if (uiMode == UiMode.NIGHT) R.color.black else R.color.white
|
||||
} else {
|
||||
if (uiMode == UiMode.NIGHT) R.color.white else R.color.black
|
||||
}
|
||||
result.setTextColor(resources.getColorWithID(colorID, context.theme))
|
||||
return result
|
||||
}
|
||||
// endregion
|
||||
|
@ -16,10 +16,10 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
style="@style/SessionEditText"
|
||||
style="@style/SmallSessionEditText"
|
||||
android:id="@+id/nameEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginLeft="@dimen/large_spacing"
|
||||
android:layout_marginTop="@dimen/medium_spacing"
|
||||
android:layout_marginRight="@dimen/large_spacing"
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
|
||||
<!-- Session -->
|
||||
<color name="accent">#00E97B</color>
|
||||
<color name="accent_alpha50">#8000E97B</color>
|
||||
<color name="text">#000000</color>
|
||||
@ -22,14 +20,11 @@
|
||||
<color name="pn_option_background">#FCFCFC</color>
|
||||
<color name="open_group_chip_color">#0D000000</color>
|
||||
|
||||
|
||||
<color name="default_background_start">#ffffff</color>
|
||||
<color name="default_background_end">#fcfcfd</color>
|
||||
<color name="action_bar_background">#fcfcfd</color>
|
||||
|
||||
|
||||
<color name="app_icon_background">#333132</color>
|
||||
<color name="progress_bar_background">#0A000000</color>
|
||||
<color name="quote_not_found_background">#8000E97B</color>
|
||||
|
||||
</resources>
|
@ -9,7 +9,7 @@
|
||||
<item name="home_gradient_end">#FFFFFFFF</item>
|
||||
|
||||
<item name="message_received_background_color">#F5F5F5</item>
|
||||
<item name="message_sent_background_color">?colorAccent</item>
|
||||
<item name="message_sent_background_color">#00E076</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
|
||||
<!-- Session -->
|
||||
<color name="accent">#00F782</color>
|
||||
<color name="accent_alpha50">#8000F782</color>
|
||||
<color name="text">#FFFFFF</color>
|
||||
@ -35,11 +33,8 @@
|
||||
<item>#f3c615</item>
|
||||
<item>#fcac5a</item>
|
||||
</array>
|
||||
<!-- Session -->
|
||||
|
||||
<!-- Loki -->
|
||||
<color name="loki_darkest_gray">#0a0a0a</color>
|
||||
<!-- Loki -->
|
||||
|
||||
<color name="signal_primary">@color/accent</color>
|
||||
<color name="signal_primary_dark">@color/accent</color>
|
||||
@ -85,5 +80,4 @@
|
||||
|
||||
<color name="default_background_start">#121212</color>
|
||||
<color name="default_background_end">#171717</color>
|
||||
|
||||
</resources>
|
||||
|
@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="conversation_blue">#336ba3</color>
|
||||
|
||||
</resources>
|
@ -72,7 +72,7 @@
|
||||
<dimen name="album_5_cell_size_big">104dp</dimen>
|
||||
<dimen name="album_5_cell_size_small">69dp</dimen>
|
||||
|
||||
<dimen name="message_corner_radius">10dp</dimen>
|
||||
<dimen name="message_corner_radius">18dp</dimen>
|
||||
<dimen name="message_corner_collapse_radius">4dp</dimen>
|
||||
<dimen name="message_bubble_corner_radius">2dp</dimen>
|
||||
<dimen name="message_bubble_shadow_distance">1.5dp</dimen>
|
||||
|
@ -29,5 +29,4 @@
|
||||
<color name="grey_900">#212121</color>
|
||||
|
||||
<color name="grey_400_transparent">#44BDBDBD</color>
|
||||
|
||||
</resources>
|
@ -1,10 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Session -->
|
||||
|
||||
<!-- Due to historical reasons the base theme is dark and the light one
|
||||
is implemented using "notnight" type of resources. -->
|
||||
<!-- The base theme is dark and the light one is implemented using "notnight" resources. -->
|
||||
<style name="Base.Theme.Session" parent="@style/Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/action_bar_background</item>
|
||||
<item name="colorPrimaryDark">@color/action_bar_background</item>
|
||||
@ -63,8 +60,8 @@
|
||||
<item name="home_gradient_start">#00000000</item>
|
||||
<item name="home_gradient_end">#FF000000</item>
|
||||
|
||||
<item name="message_received_background_color">#222325</item>
|
||||
<item name="message_sent_background_color">#3F4146</item>
|
||||
<item name="message_received_background_color">#2D2D2D</item>
|
||||
<item name="message_sent_background_color">#00E97B</item>
|
||||
|
||||
<item name="menu_accept_icon">@drawable/ic_baseline_done_24</item>
|
||||
<item name="menu_trash_icon">@drawable/ic_baseline_delete_24</item>
|
||||
@ -113,7 +110,7 @@
|
||||
which doesn't have support for light theme
|
||||
(like some old Signal screens or third-party libs with white only icons)
|
||||
-->
|
||||
<!-- TODO Refactor this to use color resources -->
|
||||
<!-- TODO: Refactor this to use color resources -->
|
||||
<style name="Base.Theme.Session.ForceDark" parent="Theme.Session.DayNight">
|
||||
<item name="colorPrimary">#171717</item>
|
||||
<item name="android:textColorPrimary">#FFFFFF</item>
|
||||
@ -147,11 +144,6 @@
|
||||
<item name="bottomSheetStyle">@style/Widget.Session.BottomSheetDialog</item>
|
||||
</style>
|
||||
|
||||
<!-- Session -->
|
||||
|
||||
|
||||
|
||||
<!-- Original Signal dark theme -->
|
||||
<style name="Base.Theme.TextSecure" parent="@style/Theme.Session.DayNight">
|
||||
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
|
||||
<!-- Session -->
|
||||
<color name="accent">#00F782</color>
|
||||
<color name="accent_alpha50">#8000F782</color>
|
||||
<color name="text">#FFFFFF</color>
|
||||
@ -38,13 +36,10 @@
|
||||
<item>#f3c615</item>
|
||||
<item>#fcac5a</item>
|
||||
</array>
|
||||
<!-- Session -->
|
||||
|
||||
<!-- Loki -->
|
||||
<color name="loki_green">#78be20</color>
|
||||
<color name="loki_dark_green">#419B41</color>
|
||||
<color name="loki_darkest_gray">#0a0a0a</color>
|
||||
<!-- Loki -->
|
||||
|
||||
<color name="signal_primary">@color/accent</color>
|
||||
<color name="signal_primary_dark">@color/accent</color>
|
||||
@ -116,5 +111,4 @@
|
||||
|
||||
<color name="default_background_start">#121212</color>
|
||||
<color name="default_background_end">#171717</color>
|
||||
|
||||
</resources>
|
||||
|
@ -80,7 +80,7 @@
|
||||
<dimen name="album_5_cell_size_big">104dp</dimen>
|
||||
<dimen name="album_5_cell_size_small">69dp</dimen>
|
||||
|
||||
<dimen name="message_corner_radius">10dp</dimen>
|
||||
<dimen name="message_corner_radius">18dp</dimen>
|
||||
<dimen name="message_corner_collapse_radius">4dp</dimen>
|
||||
<dimen name="message_bubble_corner_radius">2dp</dimen>
|
||||
<dimen name="message_bubble_shadow_distance">1.5dp</dimen>
|
||||
|
@ -274,5 +274,4 @@
|
||||
<color name="grey_900">#212121</color>
|
||||
|
||||
<color name="grey_400_transparent">#44BDBDBD</color>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user