mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-03 23:25:03 +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>
|
Reference in New Issue
Block a user