app/src/main/res/layout/fragment_article_list.xml
author Da Risk <da_risk@geekorum.com>
Sun, 10 Nov 2019 14:59:06 -0800
changeset 544 0b9eb2b30bf8
parent 375 3f927abe862d
child 611 91b8d76c03cd
permissions -rw-r--r--
ArticlesListFragment: observe the refresh of the specific feed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     2
<!--
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     3
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     4
    Geekttrss is a RSS feed reader application on the Android Platform.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     5
137
5464f07a306c Update copyright headers for 2019
Da Risk <da_risk@geekorum.com>
parents: 110
diff changeset
     6
    Copyright (C) 2017-2019 by Frederic-Charles Barthelery.
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     7
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     8
    This file is part of Geekttrss.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     9
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    10
    Geekttrss is free software: you can redistribute it and/or modify
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    11
    it under the terms of the GNU General Public License as published by
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    12
    the Free Software Foundation, either version 3 of the License, or
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    13
    (at your option) any later version.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    14
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    15
    Geekttrss is distributed in the hope that it will be useful,
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    16
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    18
    GNU General Public License for more details.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    19
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    20
    You should have received a copy of the GNU General Public License
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    21
    along with Geekttrss.  If not, see <http://www.gnu.org/licenses/>.
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    22
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    23
-->
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    24
<layout xmlns:android="http://schemas.android.com/apk/res/android"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    25
        xmlns:app="http://schemas.android.com/apk/res-auto"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    26
        xmlns:tools="http://schemas.android.com/tools"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    27
        tools:context=".articles_list.ArticlesListFragment">
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    28
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    29
    <data>
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    30
        <import type="android.view.View" />
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    31
        <variable name="fragmentViewModel" type="com.geekorum.ttrss.articles_list.FragmentViewModel" />
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    32
    </data>
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    33
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    34
    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    35
            android:id="@+id/swipe_refresh_container"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    36
            android:layout_width="match_parent"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    37
            android:layout_height="match_parent"
544
0b9eb2b30bf8 ArticlesListFragment: observe the refresh of the specific feed
Da Risk <da_risk@geekorum.com>
parents: 375
diff changeset
    38
            app:refreshing="@{safeUnbox(fragmentViewModel.refreshing)}">
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    39
375
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    40
        <androidx.constraintlayout.widget.ConstraintLayout
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    41
                android:layout_width="match_parent"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    42
                android:layout_height="match_parent">
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    43
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    44
            <TextView android:id="@+id/empty"
375
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    45
                      android:layout_width="0dp"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    46
                      android:layout_height="0dp"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    47
                      app:layout_constraintTop_toTopOf="parent"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    48
                      app:layout_constraintBottom_toBottomOf="parent"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    49
                      app:layout_constraintStart_toStartOf="parent"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    50
                      app:layout_constraintEnd_toEndOf="parent"
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    51
                      android:gravity="center"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    52
                      android:textAppearance="?textAppearanceHeadline4"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    53
                      android:padding="@dimen/activity_horizontal_margin"
544
0b9eb2b30bf8 ArticlesListFragment: observe the refresh of the specific feed
Da Risk <da_risk@geekorum.com>
parents: 375
diff changeset
    54
                      android:text="@{safeUnbox(fragmentViewModel.refreshing) ? @string/fragment_articles_list_no_articles_and_sync_lbl : @string/fragment_articles_list_no_articles_lbl}"
110
1d005e7c78cc Lint: fix a few warnings
Da Risk <da_risk@geekorum.com>
parents: 27
diff changeset
    55
                      android:visibility="@{safeUnbox(fragmentViewModel.haveZeroArticles) ? View.VISIBLE : View.GONE}"
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    56
                    />
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    57
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    58
            <androidx.recyclerview.widget.RecyclerView
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    59
                    android:id="@+id/article_list"
375
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    60
                    android:layout_width="0dp"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    61
                    android:layout_height="0dp"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    62
                    app:layout_constraintTop_toTopOf="parent"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    63
                    app:layout_constraintBottom_toBottomOf="parent"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    64
                    app:layout_constraintStart_toStartOf="parent"
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    65
                    app:layout_constraintEnd_toEndOf="parent"
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    66
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    67
                    android:orientation="vertical"
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    68
                    tools:listitem="@layout/headlines_row"
373
5c59c39c72a4 ArticleListFragment: make recycler view invisible when no articles
Da Risk <da_risk@geekorum.com>
parents: 137
diff changeset
    69
                    android:visibility="@{fragmentViewModel.articles.size == 0 ? View.INVISIBLE : View.VISIBLE}"
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    70
                    />
375
3f927abe862d FragmentArticleList: use a ConstraintLayout for more flexibility
Da Risk <da_risk@geekorum.com>
parents: 373
diff changeset
    71
        </androidx.constraintlayout.widget.ConstraintLayout>
0
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    72
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    73
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    74
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    75
14443efede32 Initial commit
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    76
</layout>