mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-07 18:42:53 +00:00
Can update group membership
This commit is contained in:
137
app/src/main/res/layout/view_group_membership_status.xml
Normal file
137
app/src/main/res/layout/view_group_membership_status.xml
Normal file
@ -0,0 +1,137 @@
|
||||
<?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.constraint.ConstraintLayout
|
||||
android:id="@+id/respondInvitationForm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/notice_group_invited"
|
||||
app:layout_constraintEnd_toEndOf="@+id/acceptButton"
|
||||
app:layout_constraintStart_toStartOf="@+id/acceptButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/rejectButton"
|
||||
style="@style/GroupMembershipButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@android:color/holo_red_dark"
|
||||
android:text="@string/action_group_reject_request"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintEnd_toEndOf="@+id/acceptButton"
|
||||
app:layout_constraintStart_toStartOf="@+id/acceptButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/acceptButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/acceptButton"
|
||||
style="@style/GroupMembershipButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:backgroundTint="@color/holo_green_dark"
|
||||
android:text="@string/action_group_accept_request"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView9" />
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/cancelRequestForm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/respondInvitationForm">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/notice_group_requested"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cancelButton"
|
||||
app:layout_constraintStart_toStartOf="@+id/cancelButton"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancelButton"
|
||||
style="@style/GroupMembershipButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:backgroundTint="@android:color/holo_red_dark"
|
||||
android:text="@string/action_group_cancel_membership_request"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView10" />
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/requestForm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cancelRequestForm">
|
||||
|
||||
<Button
|
||||
android:id="@+id/joinButton"
|
||||
style="@style/GroupMembershipButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:backgroundTint="@color/dark_blue"
|
||||
android:text="@string/action_join_group"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/memberForm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/requestForm">
|
||||
|
||||
<Button
|
||||
android:id="@+id/leaveButton"
|
||||
style="@style/GroupMembershipButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:backgroundTint="@android:color/holo_red_dark"
|
||||
android:text="@string/action_leave_group"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -13,10 +13,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
tools:text="Group Name"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/groupImage"
|
||||
app:layout_constraintStart_toEndOf="@+id/groupImage"
|
||||
app:layout_constraintTop_toTopOf="@+id/groupImage" />
|
||||
app:layout_constraintTop_toTopOf="@+id/groupImage"
|
||||
tools:text="Group Name" />
|
||||
|
||||
<org.communiquons.android.comunic.client.ui.views.GroupImageView
|
||||
android:id="@+id/groupImage"
|
||||
@ -29,4 +30,13 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_friends" />
|
||||
|
||||
<org.communiquons.android.comunic.client.ui.views.GroupMembershipStatusView
|
||||
android:id="@+id/groupMembershipStatusView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -300,4 +300,16 @@
|
||||
<string name="action_user_groups">Mes groupes</string>
|
||||
<string name="err_get_user_groups">Une erreur a survenu lors de la récupération de vos groupes !</string>
|
||||
<string name="notice_no_group">Vous n\'avez aucun groupe pour le moment.</string>
|
||||
<string name="notice_group_invited">Invité</string>
|
||||
<string name="action_group_accept_request">Accepter</string>
|
||||
<string name="action_group_reject_request">Rejeter</string>
|
||||
<string name="notice_group_requested">Demande envoyée</string>
|
||||
<string name="action_group_cancel_membership_request">Annuler</string>
|
||||
<string name="action_join_group">Rejoindre</string>
|
||||
<string name="action_leave_group">Quitter</string>
|
||||
<string name="dialog_leave_group_title">Quitter le groupe</string>
|
||||
<string name="dialog_leave_group_message">Voulez-vous vraiment quitter ce groupe ? Il se peut que vous ne puissez pas le rejoindre ultérieurement !</string>
|
||||
<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>
|
||||
</resources>
|
@ -4,7 +4,7 @@
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#ff4081</color>
|
||||
|
||||
<color name="holo_green_dark">#ff669900</color>
|
||||
<color name="holo_green_dark">#669900</color>
|
||||
<color name="darker_gray">#aaa</color>
|
||||
<color name="darker_darker_gray">#5b5b5b</color>
|
||||
<color name="dark_blue">#303f9f</color>
|
||||
|
@ -299,4 +299,16 @@
|
||||
<string name="action_user_groups">My groups</string>
|
||||
<string name="err_get_user_groups">Could not get the groups of the user!</string>
|
||||
<string name="notice_no_group">You do not have any group yet.</string>
|
||||
<string name="notice_group_invited">Invited</string>
|
||||
<string name="action_group_accept_request">Accept</string>
|
||||
<string name="action_group_reject_request">Reject</string>
|
||||
<string name="notice_group_requested">Requested</string>
|
||||
<string name="action_group_cancel_membership_request">Cancel</string>
|
||||
<string name="action_join_group">Join</string>
|
||||
<string name="action_leave_group">Leave</string>
|
||||
<string name="dialog_leave_group_title">Leave group</string>
|
||||
<string name="dialog_leave_group_message">Do you really want to leave this group? You might not be able to join it later!</string>
|
||||
<string name="dialog_leave_group_cancel">Cancel</string>
|
||||
<string name="dialog_leave_group_confirm">Leave</string>
|
||||
<string name="err_update_group_membership">Could not update group membership!</string>
|
||||
</resources>
|
||||
|
@ -174,4 +174,10 @@
|
||||
<item name="android:padding">2dp</item>
|
||||
<item name="android:layout_gravity">center</item>
|
||||
</style>
|
||||
|
||||
<!-- Groups membership button -->
|
||||
<style name="GroupMembershipButton" >
|
||||
<item name="android:minHeight">40dip</item>
|
||||
<item name="android:minWidth">80dip</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user