mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Better brand button style for the light mode.
QR code fragment themed. Minor adjustments to the brand colors for light mode.
This commit is contained in:
parent
b05350b5aa
commit
156b2687b8
@ -148,7 +148,8 @@
|
|||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name="org.thoughtcrime.securesms.loki.activities.PrivacySettingsActivity"
|
android:name="org.thoughtcrime.securesms.loki.activities.PrivacySettingsActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:label="@string/activity_privacy_settings_title"
|
||||||
|
android:screenOrientation="portrait"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="org.thoughtcrime.securesms.loki.activities.NotificationSettingsActivity"
|
android:name="org.thoughtcrime.securesms.loki.activities.NotificationSettingsActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
@ -0,0 +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" />
|
||||||
|
|
||||||
|
<corners android:radius="@dimen/medium_button_corner_radius" />
|
||||||
|
|
||||||
|
<stroke android:width="@dimen/border_thickness" android:color="?android:textColorPrimary" />
|
||||||
|
</shape>
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.camera.CameraView
|
<org.thoughtcrime.securesms.components.camera.CameraView
|
||||||
android:id="@+id/cameraView"
|
android:id="@+id/cameraView"
|
||||||
@ -16,23 +16,24 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:weightSum="2" >
|
android:weightSum="3" >
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.ShapeScrim
|
<org.thoughtcrime.securesms.components.ShapeScrim
|
||||||
android:layout_weight="1"
|
android:layout_weight="2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="0dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/descriptionTextView"
|
android:id="@+id/messageTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:padding="32dp"
|
android:padding="@dimen/very_large_spacing"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="@color/loki_darkest_gray"
|
android:text="Scan a user’s QR code to start a session. QR codes can be found by tapping the QR code icon in account settings."
|
||||||
android:text="@string/fragment_scan_qr_code_explanation_new_conversation"
|
android:background="?android:windowBackground"
|
||||||
android:textColor="?android:textColorPrimary" />
|
android:textSize="@dimen/small_font_size"
|
||||||
|
android:textColor="?android:textColorTertiary" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/text"
|
|
||||||
android:layout_marginLeft="@dimen/very_large_spacing"
|
android:layout_marginLeft="@dimen/very_large_spacing"
|
||||||
android:layout_marginRight="@dimen/very_large_spacing"
|
android:layout_marginRight="@dimen/very_large_spacing"
|
||||||
android:textSize="@dimen/small_font_size"
|
android:textSize="@dimen/small_font_size"
|
||||||
|
@ -1,40 +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:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.camera.CameraView
|
|
||||||
android:id="@+id/cameraView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:camera="0" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/overlayView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:weightSum="3" >
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.ShapeScrim
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/messageTextView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:padding="@dimen/very_large_spacing"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@color/navigation_bar_background"
|
|
||||||
android:text="Scan a user’s QR code to start a session. QR codes can be found by tapping the QR code icon in account settings."
|
|
||||||
android:textSize="@dimen/small_font_size"
|
|
||||||
android:textColor="@color/text" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
@ -2,14 +2,14 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Session -->
|
<!-- Session -->
|
||||||
<color name="accent">#00E97B</color>
|
<color name="accent">#5df299</color>
|
||||||
<color name="text">#000000</color>
|
<color name="text">#000000</color>
|
||||||
<color name="unimportant">#606060</color>
|
<color name="unimportant">#606060</color>
|
||||||
<color name="cell_background">#FCFCFC</color>
|
<color name="cell_background">#FCFCFC</color>
|
||||||
<color name="cell_selected">#DFDFDF</color>
|
<color name="cell_selected">#DFDFDF</color>
|
||||||
<color name="navigation_bar_background">#FCFCFC</color>
|
<color name="navigation_bar_background">#FCFCFC</color>
|
||||||
<color name="separator">#B0B0B0</color>
|
<color name="separator">#B0B0B0</color>
|
||||||
<color name="unimportant_button_background">@color/transparent</color>
|
<color name="unimportant_button_background">#1000</color>
|
||||||
<color name="unimportant_dialog_button_background">@color/dialog_background</color>
|
<color name="unimportant_dialog_button_background">@color/dialog_background</color>
|
||||||
<color name="dialog_background">#FCFCFC</color>
|
<color name="dialog_background">#FCFCFC</color>
|
||||||
<color name="dialog_border">#212121</color>
|
<color name="dialog_border">#212121</color>
|
||||||
|
@ -12,4 +12,9 @@
|
|||||||
<!-- <item name="actionMenuTextColor">@color/text</item>-->
|
<!-- <item name="actionMenuTextColor">@color/text</item>-->
|
||||||
<!-- </style>-->
|
<!-- </style>-->
|
||||||
|
|
||||||
|
<style name="Widget.Session.Button.Common.ProminentOutline">
|
||||||
|
<item name="android:background">@drawable/prominent_outline_button_medium_background</item>
|
||||||
|
<item name="android:textColor">?android:textColorPrimary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -49,8 +49,6 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Session.TabLayout" parent="Widget.Design.TabLayout">
|
<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="elevation">1dp</item>
|
||||||
<item name="tabIndicatorColor">?colorAccent</item>
|
<item name="tabIndicatorColor">?colorAccent</item>
|
||||||
<item name="tabSelectedTextColor">?colorAccent</item>>
|
<item name="tabSelectedTextColor">?colorAccent</item>>
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
<!-- App specific attributes -->
|
<!-- App specific attributes -->
|
||||||
<item name="dialog_background_color">@color/dialog_background</item>
|
<item name="dialog_background_color">@color/dialog_background</item>
|
||||||
|
|
||||||
<item name="media_overview_toolbar_background">@color/transparent</item>
|
<item name="media_overview_toolbar_background">@color/transparent</item>
|
||||||
<item name="media_overview_toolbar_foreground">@color/white</item>
|
<item name="media_overview_toolbar_foreground">@color/white</item>
|
||||||
<item name="media_overview_header_foreground">@color/text</item>
|
<item name="media_overview_header_foreground">@color/text</item>
|
||||||
@ -59,8 +60,6 @@
|
|||||||
<item name="attachment_document_icon_large">@drawable/ic_document_large_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="attachment_document_extension_text_color">#222</item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<item name="home_gradient_start">#00000000</item>
|
<item name="home_gradient_start">#00000000</item>
|
||||||
<item name="home_gradient_end">#FF000000</item>
|
<item name="home_gradient_end">#FF000000</item>
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ class PrivacySettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
|
override fun onCreate(savedInstanceState: Bundle?, isReady: Boolean) {
|
||||||
super.onCreate(savedInstanceState, isReady)
|
super.onCreate(savedInstanceState, isReady)
|
||||||
setContentView(R.layout.activity_fragment_wrapper)
|
setContentView(R.layout.activity_fragment_wrapper)
|
||||||
supportActionBar!!.title = resources.getString(R.string.activity_privacy_settings_title)
|
|
||||||
val fragment = AppProtectionPreferenceFragment()
|
val fragment = AppProtectionPreferenceFragment()
|
||||||
val transaction = supportFragmentManager.beginTransaction()
|
val transaction = supportFragmentManager.beginTransaction()
|
||||||
transaction.replace(R.id.fragmentContainer, fragment)
|
transaction.replace(R.id.fragmentContainer, fragment)
|
||||||
|
@ -7,7 +7,7 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import kotlinx.android.synthetic.main.fragment_scan_qr_code_v2.*
|
import kotlinx.android.synthetic.main.fragment_scan_qr_code.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.thoughtcrime.securesms.qr.ScanListener
|
import org.thoughtcrime.securesms.qr.ScanListener
|
||||||
import org.thoughtcrime.securesms.qr.ScanningThread
|
import org.thoughtcrime.securesms.qr.ScanningThread
|
||||||
@ -19,7 +19,7 @@ class ScanQRCodeFragment : Fragment() {
|
|||||||
var message: CharSequence = ""
|
var message: CharSequence = ""
|
||||||
|
|
||||||
override fun onCreateView(layoutInflater: LayoutInflater, viewGroup: ViewGroup?, bundle: Bundle?): View? {
|
override fun onCreateView(layoutInflater: LayoutInflater, viewGroup: ViewGroup?, bundle: Bundle?): View? {
|
||||||
return layoutInflater.inflate(R.layout.fragment_scan_qr_code_v2, viewGroup, false)
|
return layoutInflater.inflate(R.layout.fragment_scan_qr_code, viewGroup, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, bundle: Bundle?) {
|
override fun onViewCreated(view: View, bundle: Bundle?) {
|
||||||
|
@ -27,7 +27,7 @@ class ScanQRCodeWrapperFragment : Fragment(), ScanQRCodePlaceholderFragmentDeleg
|
|||||||
|
|
||||||
private fun update() {
|
private fun update() {
|
||||||
val fragment: Fragment
|
val fragment: Fragment
|
||||||
if (ContextCompat.checkSelfPermission(activity!!, Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) {
|
if (ContextCompat.checkSelfPermission(requireActivity(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) {
|
||||||
val scanQRCodeFragment = ScanQRCodeFragment()
|
val scanQRCodeFragment = ScanQRCodeFragment()
|
||||||
scanQRCodeFragment.scanListener = this
|
scanQRCodeFragment.scanListener = this
|
||||||
scanQRCodeFragment.message = message
|
scanQRCodeFragment.message = message
|
||||||
|
Loading…
Reference in New Issue
Block a user