Can search groups

This commit is contained in:
Pierre HUBERT
2018-12-27 09:36:14 +01:00
parent 4e79e299bf
commit 8fa4c5bcc4
23 changed files with 935 additions and 68 deletions

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
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"
tools:context=".ui.activities.SearchActivity">
<EditText
android:id="@+id/searchInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:ems="10"
android:inputType="textPersonName"
android:hint="@string/input_search_hint"
android:lines="1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.v7.widget.RecyclerView
android:id="@+id/resultsRecyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchInput" />
</android.support.constraint.ConstraintLayout>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:background="?selectableItemBackground"
android:focusable="true"
android:clickable="true"
android:layout_height="wrap_content">
<org.communiquons.android.comunic.client.ui.views.WebUserAccountImage
android:id="@+id/user_account_image"
android:layout_width="@dimen/account_image_default_width"
android:layout_height="@dimen/account_image_default_height"
android:src="@drawable/default_account_image" />
<TextView
android:id="@+id/user_name"
style="?textAppearanceListItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="User name"
android:layout_gravity="center"
android:paddingStart="5dp"
android:paddingEnd="1dp"/>
</LinearLayout>

View File

@ -9,8 +9,8 @@
<!-- Search user -->
<item
android:id="@+id/action_search_user"
android:title="@string/main_menu_search_user" />
android:id="@+id/action_search"
android:title="@string/main_menu_search" />
<!-- Account settings -->
<item

View File

@ -312,4 +312,11 @@
<string name="dialog_leave_group_cancel">Annuler</string>
<string name="dialog_leave_group_confirm">Quitter</string>
<string name="err_update_group_membership">Une erreur a survenue lors de la mise à jour de votre appartenance au groupe !</string>
<string name="main_menu_search">Rechercher</string>
<string name="activity_search_title">Recherche</string>
<string name="input_search_hint">Rechercher un utilisateur, un groupe…</string>
<string name="err_get_search_results">Une erreur a survenue lors de la récupération du résultat de votre recherche !</string>
<string name="notice_group_access_denied">Accès au groupe refusé.</string>
<string name="err_get_group_info">Impossible de récupérer les informations sur le groupe !</string>
<string name="notice_closed_registration">Accès sur invitation</string>
</resources>

View File

@ -314,4 +314,8 @@
<string name="err_get_group_info">Could not get group information!</string>
<string name="notice_group_access_denied">Access to the group denied.</string>
<string name="notice_closed_registration">Invitation only</string>
<string name="main_menu_search">Search</string>
<string name="activity_search_title">Search</string>
<string name="input_search_hint">Search a user, a group…</string>
<string name="err_get_search_results">Could not get results of your search!</string>
</resources>