mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-07 18:42:53 +00:00
Avoid useless posts reloading on LatestPostsFragment pauses
This commit is contained in:
@ -19,8 +19,8 @@
|
||||
android:textAlignment="center"
|
||||
android:layout_marginTop="50dp"/>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/fragment_friendslist_listview"
|
||||
<org.communiquons.android.comunic.client.ui.views.ScrollRecyclerView
|
||||
android:id="@+id/friendslist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
@ -1,14 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingStart="8dp">
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fragment_friendslist_item_accountimage"
|
||||
<org.communiquons.android.comunic.client.ui.views.WebUserAccountImage
|
||||
android:id="@+id/account_image"
|
||||
android:layout_width="@dimen/account_image_default_width"
|
||||
android:layout_height="@dimen/account_image_default_height"
|
||||
android:layout_gravity="center"
|
||||
@ -19,20 +24,26 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingStart="8dp">
|
||||
android:paddingStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/account_image"
|
||||
app:layout_constraintStart_toEndOf="@+id/account_image"
|
||||
app:layout_constraintTop_toTopOf="@+id/account_image">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fragment_friendslist_item_fullname"
|
||||
android:id="@+id/account_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
tools:text="Full user name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fragment_friendslist_item_status"
|
||||
android:id="@+id/user_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/user_status_offline"
|
||||
@ -41,12 +52,5 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Action button on user -->
|
||||
<Button
|
||||
android:id="@+id/fragment_friendslist_item_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
tools:text="Action" />
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
92
app/src/main/res/layout/friend_pending_item.xml
Normal file
92
app/src/main/res/layout/friend_pending_item.xml
Normal file
@ -0,0 +1,92 @@
|
||||
<?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:paddingBottom="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?selectableItemBackground">
|
||||
|
||||
<org.communiquons.android.comunic.client.ui.views.WebUserAccountImage
|
||||
android:id="@+id/account_image"
|
||||
android:layout_width="@dimen/account_image_default_width"
|
||||
android:layout_height="@dimen/account_image_default_height"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/user_image_description"
|
||||
android:src="@drawable/default_account_image" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/account_image"
|
||||
app:layout_constraintStart_toEndOf="@+id/account_image"
|
||||
app:layout_constraintTop_toTopOf="@+id/account_image">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
tools:text="Full user name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/user_status_offline"
|
||||
android:textColor="@android:color/holo_green_dark"
|
||||
tools:text="Online" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/reject_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:backgroundTint="@color/holo_red_dark"
|
||||
android:text="@string/action_reject_friend_request"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/accept_button"
|
||||
app:layout_constraintEnd_toStartOf="@+id/accept_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/accept_button" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/accept_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:backgroundTint="@color/holo_green_dark"
|
||||
android:text="@string/action_friends_accept_request"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/account_image" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/notice_request"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/reject_button"
|
||||
app:layout_constraintEnd_toStartOf="@+id/reject_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/reject_button" />
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -238,4 +238,6 @@
|
||||
<string name="err_create_account_too_many_requests">Trop de création de compte. Veuillez réessayer ultérieurement.</string>
|
||||
<string name="action_more">Plus</string>
|
||||
<string name="action_about">A propos</string>
|
||||
<string name="action_reject_friend_request">Rejeter</string>
|
||||
<string name="notice_request">Demande</string>
|
||||
</resources>
|
@ -8,6 +8,7 @@
|
||||
<color name="darker_gray">#aaa</color>
|
||||
<color name="darker_darker_gray">#5b5b5b</color>
|
||||
<color name="dark_blue">#303f9f</color>
|
||||
<color name="holo_red_dark">#ffcc0000</color>
|
||||
|
||||
<color name="default_drawable_color">#000000</color>
|
||||
|
||||
|
@ -240,4 +240,6 @@
|
||||
<string name="activity_about_title">About</string>
|
||||
<string name="dialog_open_source_licenses_title">Open Source Licenses</string>
|
||||
<string name="btn_open_source_licences">Open Source Licences</string>
|
||||
<string name="action_reject_friend_request">Reject</string>
|
||||
<string name="notice_request">Requested</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user