From cae76a2f661a327a18a7bf2c84e5925ddc8c6c9f Mon Sep 17 00:00:00 2001 From: gmbnt Date: Mon, 16 Mar 2020 15:35:14 +1100 Subject: [PATCH] Add home screen gradient --- res/drawable/home_activity_gradient.xml | 11 +++++++++++ res/layout/activity_home.xml | 6 ++++++ .../loki/redesign/activities/HomeActivity.kt | 9 +++++++++ .../redesign/views/NewConversationButtonSetView.kt | 2 ++ 4 files changed, 28 insertions(+) create mode 100644 res/drawable/home_activity_gradient.xml diff --git a/res/drawable/home_activity_gradient.xml b/res/drawable/home_activity_gradient.xml new file mode 100644 index 0000000000..91f5097ab9 --- /dev/null +++ b/res/drawable/home_activity_gradient.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/res/layout/activity_home.xml b/res/layout/activity_home.xml index bc0f97cbc3..8bbecbb576 100644 --- a/res/layout/activity_home.xml +++ b/res/layout/activity_home.xml @@ -58,6 +58,12 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> + + > { threadIDs -> diff --git a/src/org/thoughtcrime/securesms/loki/redesign/views/NewConversationButtonSetView.kt b/src/org/thoughtcrime/securesms/loki/redesign/views/NewConversationButtonSetView.kt index eb5bf152c0..3b1f5de593 100644 --- a/src/org/thoughtcrime/securesms/loki/redesign/views/NewConversationButtonSetView.kt +++ b/src/org/thoughtcrime/securesms/loki/redesign/views/NewConversationButtonSetView.kt @@ -209,7 +209,9 @@ class NewConversationButtonSetView : RelativeLayout { override fun onTouchEvent(event: MotionEvent): Boolean { val touch = PointF(event.x, event.y) val expandedButton = expandedButton + val allButtons = listOf( mainButton, sessionButton, closedGroupButton, openGroupButton ) val buttonsExcludingMainButton = listOf( sessionButton, closedGroupButton, openGroupButton ) + if (allButtons.none { it.contains(touch) }) { return false } when (event.action) { MotionEvent.ACTION_DOWN -> { val vibrator = context.getSystemService(VIBRATOR_SERVICE) as Vibrator