session-android/app/src/main/res/layout/activity_home.xml

170 lines
7.1 KiB
XML
Raw Normal View History

2019-12-17 14:27:59 +01:00
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2020-08-20 08:47:15 +02:00
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/contentView"
2019-12-17 14:27:59 +01:00
android:layout_width="match_parent"
android:layout_height="match_parent"
2020-01-06 02:07:55 +01:00
android:orientation="vertical"
2021-07-09 03:14:21 +02:00
tools:context="org.thoughtcrime.securesms.home.HomeActivity">
2019-12-17 14:27:59 +01:00
<androidx.appcompat.widget.Toolbar
2020-01-06 02:07:55 +01:00
android:id="@+id/toolbar"
2019-12-17 14:27:59 +01:00
android:layout_width="match_parent"
2020-08-25 15:52:42 +02:00
android:layout_height="wrap_content"
android:background="?colorPrimary"
2020-08-26 07:24:56 +02:00
app:contentInsetStart="0dp">
2019-12-17 14:27:59 +01:00
2020-08-25 15:52:42 +02:00
<LinearLayout
2020-01-06 02:07:55 +01:00
android:layout_width="match_parent"
2020-08-25 15:52:42 +02:00
android:layout_height="wrap_content"
android:orientation="vertical">
2020-01-06 02:07:55 +01:00
2020-08-25 15:52:42 +02:00
<RelativeLayout
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
android:id="@+id/session_toolbar"
2020-08-25 15:52:42 +02:00
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp">
2020-01-06 02:07:55 +01:00
2021-07-09 05:18:48 +02:00
<org.thoughtcrime.securesms.components.ProfilePictureView
2020-08-25 15:52:42 +02:00
android:id="@+id/profileButton"
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="9dp" />
2020-01-06 02:07:55 +01:00
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
<org.thoughtcrime.securesms.home.PathStatusView
android:id="@+id/pathStatusView"
android:layout_alignBottom="@+id/profileButton"
android:layout_alignEnd="@+id/profileButton"
android:layout_width="@dimen/path_status_view_size"
android:layout_height="@dimen/path_status_view_size"/>
<ImageView
android:id="@+id/sessionHeaderImage"
2020-08-25 15:52:42 +02:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
android:layout_centerInParent="true"
android:layout_toStartOf="@+id/searchViewContainer"
android:layout_toEndOf="@+id/profileButton"
android:padding="@dimen/medium_spacing"
android:scaleType="centerInside"
android:src="@drawable/ic_session"
app:tint="@color/black" />
2020-05-29 03:16:52 +02:00
2020-08-25 15:52:42 +02:00
<RelativeLayout
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
android:id="@+id/searchViewContainer"
2020-08-25 15:52:42 +02:00
android:layout_width="@dimen/small_profile_picture_size"
android:layout_height="@dimen/small_profile_picture_size"
2020-05-29 03:16:52 +02:00
android:layout_alignParentRight="true"
2020-08-25 15:52:42 +02:00
android:layout_centerVertical="true">
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/ic_baseline_search_24"
app:tint="@color/text" />
2020-08-25 15:52:42 +02:00
</RelativeLayout>
2020-05-29 03:16:52 +02:00
</RelativeLayout>
2020-05-28 08:43:37 +02:00
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
<RelativeLayout
android:visibility="gone"
android:id="@+id/search_toolbar"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:layout_width="match_parent"
android:layout_height="?actionBarSize">
<org.thoughtcrime.securesms.home.search.GlobalSearchInputLayout
android:layout_centerVertical="true"
android:id="@+id/globalSearchInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
2020-09-10 00:45:20 +02:00
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:dividerHorizontal"
android:elevation="1dp" />
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
<org.thoughtcrime.securesms.onboarding.SeedReminderView
android:id="@+id/seedReminderView"
2020-08-25 15:52:42 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content" />
2020-01-06 02:07:55 +01:00
2020-08-25 15:52:42 +02:00
</LinearLayout>
2019-12-17 14:27:59 +01:00
2020-08-25 15:52:42 +02:00
</androidx.appcompat.widget.Toolbar>
2019-12-17 14:27:59 +01:00
<RelativeLayout
2020-01-06 02:07:55 +01:00
android:layout_width="match_parent"
2020-09-08 07:38:39 +02:00
android:layout_height="match_parent"
android:clipChildren="false">
2020-01-06 02:07:55 +01:00
<androidx.recyclerview.widget.RecyclerView
2020-01-06 02:07:55 +01:00
android:id="@+id/recyclerView"
android:layout_width="match_parent"
2020-03-16 23:54:58 +01:00
android:layout_height="match_parent"
android:paddingBottom="172dp"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="6"
tools:listitem="@layout/view_conversation" />
2020-01-06 02:07:55 +01:00
2020-03-16 05:35:14 +01:00
<View
android:id="@+id/gradientView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home_activity_gradient" />
Add a global search (#834) * feat: modifying search functionalities to include contacts * feat: add global search UI input layouts and color attributes * feat: add global search repository and model content * feat: adding diff callbacks and wiring up global search vm to views * feat: adding scroll to message, figuring out new query for recipient thread search * feat: messing with the search and highlighting functionality after wiring up bindings * fix: compile error from merge * fix: gradlew build errors * feat: filtering contacts by existing un-archived threads * refactor: prevent note to self breaking, update queries and logic in search repo to include member->group reverse searches * feat: adding home screen new redesigns for search * feat: replacing designs and adding new group subtitle text * feat: small design improvements and incrementing gradle build number to install on device * feat: add scrollbars for search * feat: replace isVisible for cancel button now that GlobalSearchInputLayout.kt replaces header * refactor: all queries are debounced not just all but 2 char * refactor: remove visibility modifiers for cancel icon * refactor: use simplified non-db and context related models in display, remove db get group members call from binding data * fix: use threadId instead of group's address * refactor: better close on cancel, removing only yourself from group member list in open groups * refactor: seed view back to inflated on create and visibility for empty placeholder and seed view text * refactor: fixing build issues and new designs for message list * refactor: use dynamic limit * refactor: include raw session ID string search for non-empty threads * fix: build lint errors * fix: build issues * feat: add in path to the settings activity * refactor: remove wildcard imports
2022-02-07 07:06:27 +01:00
<androidx.recyclerview.widget.RecyclerView
android:visibility="gone"
android:scrollbars="vertical"
android:id="@+id/globalSearchRecycler"
android:layout_width="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/view_global_search_result"
tools:itemCount="6"
android:layout_height="match_parent"/>
2020-04-20 03:54:56 +02:00
<LinearLayout
android:id="@+id/emptyStateContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
2020-04-20 03:54:56 +02:00
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="32dp"
android:visibility="gone">
2020-04-20 03:54:56 +02:00
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/activity_home_empty_state_message"
2020-04-20 03:54:56 +02:00
android:textColor="@color/text"
android:textSize="@dimen/medium_font_size" />
2020-04-20 03:54:56 +02:00
<Button
android:id="@+id/createNewPrivateChatButton"
style="@style/Widget.Session.Button.Common.ProminentOutline"
2020-04-20 03:54:56 +02:00
android:layout_width="196dp"
android:layout_height="@dimen/medium_button_height"
android:layout_marginTop="@dimen/medium_spacing"
2020-05-25 07:46:53 +02:00
android:text="@string/activity_home_empty_state_button_title" />
2020-04-20 03:54:56 +02:00
</LinearLayout>
2021-07-09 03:14:21 +02:00
<org.thoughtcrime.securesms.home.NewConversationButtonSetView
2021-04-29 05:41:43 +02:00
android:id="@+id/newConversationButtonSet"
android:layout_width="276dp"
android:layout_height="236dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" />
2019-12-17 14:27:59 +01:00
</RelativeLayout>
2020-01-06 02:07:55 +01:00
</LinearLayout>