mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-07 18:42:53 +00:00
Display the list of groups of the user
This commit is contained in:
33
app/src/main/res/layout/fragment_user_groups.xml
Normal file
33
app/src/main/res/layout/fragment_user_groups.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/groups_list"
|
||||
android:layout_width="368dp"
|
||||
android:layout_height="551dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</android.support.constraint.ConstraintLayout>
|
32
app/src/main/res/layout/viewholder_group.xml
Normal file
32
app/src/main/res/layout/viewholder_group.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?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="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/groupName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
tools:text="Group Name"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/groupImage"
|
||||
app:layout_constraintTop_toTopOf="@+id/groupImage" />
|
||||
|
||||
<org.communiquons.android.comunic.client.ui.views.GroupImageView
|
||||
android:id="@+id/groupImage"
|
||||
android:layout_width="@dimen/group_image_default_width"
|
||||
android:layout_height="@dimen/group_image_default_height"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_friends" />
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -2,6 +2,11 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<!-- User groups -->
|
||||
<item
|
||||
android:id="@+id/action_user_groups"
|
||||
android:title="@string/action_user_groups"/>
|
||||
|
||||
<!-- Search user -->
|
||||
<item
|
||||
android:id="@+id/action_search_user"
|
||||
|
@ -14,6 +14,10 @@
|
||||
<dimen name="account_image_xsmall_width">16dp</dimen>
|
||||
<dimen name="account_image_xsmall_height">16dp</dimen>
|
||||
|
||||
<!-- Default size for a group image -->
|
||||
<dimen name="group_image_default_width">64dp</dimen>
|
||||
<dimen name="group_image_default_height">64dp</dimen>
|
||||
|
||||
<!-- Dimensions for the conversation list -->
|
||||
<dimen name="fragment_conversations_list_icon_width">20dp</dimen>
|
||||
<dimen name="fragment_conversations_list_icon_height">20dp</dimen>
|
||||
|
@ -296,4 +296,6 @@
|
||||
<string name="action_send_survey_response">Respond</string>
|
||||
<string name="err_cancel_response">Could not cancel your response to the survey!</string>
|
||||
<string name="err_respond_survey">Could not send response to the server!</string>
|
||||
<string name="action_user_groups">My groups</string>
|
||||
<string name="err_get_user_groups">Could not get the groups of the user!</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user