Should fix #119.

This commit is contained in:
Amine 2017-11-23 21:27:01 +01:00
parent 1f67f2fdee
commit 2a6f98a1e8
3 changed files with 45 additions and 29 deletions

View File

@ -1,3 +1,7 @@
**master**
- Fixing list view displaying issues.
**1.5.4.15** **1.5.4.15**
- Fixed an issue with the sources list. - Fixed an issue with the sources list.

View File

@ -11,10 +11,7 @@ import android.os.Bundle
import android.preference.PreferenceManager import android.preference.PreferenceManager
import android.support.v4.view.MenuItemCompat import android.support.v4.view.MenuItemCompat
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.GridLayoutManager import android.support.v7.widget.*
import android.support.v7.widget.RecyclerView
import android.support.v7.widget.SearchView
import android.support.v7.widget.StaggeredGridLayoutManager
import android.support.v7.widget.helper.ItemTouchHelper import android.support.v7.widget.helper.ItemTouchHelper
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
@ -759,6 +756,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
articleViewer, articleViewer,
debugReadingItems, debugReadingItems,
userIdentifier) userIdentifier)
recyclerView.addItemDecoration(DividerItemDecoration(this@HomeActivity,
DividerItemDecoration.VERTICAL))
} }
recyclerView.adapter = mAdapter recyclerView.adapter = mAdapter
mAdapter.notifyDataSetChanged() mAdapter.notifyDataSetChanged()

View File

@ -1,55 +1,66 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="88dp"> android:minHeight="88dp">
<android.support.constraint.Guideline
android:id="@+id/guideline4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="99dp" />
<ImageView <ImageView
android:id="@+id/itemImage" android:id="@+id/itemImage"
android:layout_width="88dp" android:layout_width="88dp"
android:layout_height="88dp" android:layout_height="88dp"
android:src="@color/about_libraries_accent" app:layout_constraintBottom_toTopOf="@+id/guideline4"
app:layout_constraintBottom_toTopOf="@+id/actionBar" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
/>
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:fontFamily="sans-serif" android:fontFamily="sans-serif"
android:gravity="start" android:gravity="start"
android:maxLines="3"
android:ellipsize="end"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAllCaps="false" android:textAllCaps="false"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/sourceTitleAndDate"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toRightOf="@+id/itemImage" app:layout_constraintStart_toEndOf="@+id/itemImage"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:text="Titre" /> tools:text="Titre" />
<TextView <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sourceTitleAndDate" android:id="@+id/sourceTitleAndDate"
android:textSize="14sp" android:layout_width="0dp"
tools:text="Google Actualité Il y a 5h" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:gravity="start"
android:textAlignment="viewStart" android:textAlignment="viewStart"
app:layout_constraintTop_toBottomOf="@+id/title" android:textSize="14sp"
android:layout_marginTop="8dp" app:layout_constraintBottom_toTopOf="@+id/guideline4"
app:layout_constraintLeft_toLeftOf="@+id/title" app:layout_constraintEnd_toEndOf="parent"
android:gravity="start" /> app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/itemImage"
tools:text="Google Actualité Il y a 5h" />
<RelativeLayout <RelativeLayout
android:id="@+id/actionBar" android:id="@+id/actionBar"
@ -58,9 +69,11 @@
android:background="#BBBBBB" android:background="#BBBBBB"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sourceTitleAndDate"> app:layout_constraintTop_toTopOf="@+id/guideline4"
app:layout_constraintVertical_bias="1.0"
tools:visibility="visible">
<com.like.LikeButton <com.like.LikeButton
android:id="@+id/favButton" android:id="@+id/favButton"
@ -68,7 +81,6 @@
android:layout_height="35dp" android:layout_height="35dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
@ -110,7 +122,7 @@
android:padding="4dp" android:padding="4dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/ic_open_in_browser_black_24dp" /> android:src="@drawable/ic_open_in_browser_black_24dp" />
</RelativeLayout> </RelativeLayout>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>