aboutsummaryrefslogtreecommitdiff
path: root/org.fox.ttrss/src/main/res/layout
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-05-07 23:12:33 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-05-07 23:12:33 +0300
commitbbb1d54575c74213f70e2f88bac0f541c1724488 (patch)
treeefb0d198f6bd3fe5938e445119e062546787811c /org.fox.ttrss/src/main/res/layout
parentd0dd04ec83050fbab10c5a29d461d9605a1e0e01 (diff)
attempt to simplify article view a bit
Diffstat (limited to 'org.fox.ttrss/src/main/res/layout')
-rwxr-xr-xorg.fox.ttrss/src/main/res/layout/fragment_article.xml99
-rwxr-xr-xorg.fox.ttrss/src/main/res/layout/fragment_article_pager.xml (renamed from org.fox.ttrss/src/main/res/layout/article_pager.xml)5
-rw-r--r--org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml57
3 files changed, 71 insertions, 90 deletions
diff --git a/org.fox.ttrss/src/main/res/layout/fragment_article.xml b/org.fox.ttrss/src/main/res/layout/fragment_article.xml
index 0b1f1f0e..0f156245 100755
--- a/org.fox.ttrss/src/main/res/layout/fragment_article.xml
+++ b/org.fox.ttrss/src/main/res/layout/fragment_article.xml
@@ -22,17 +22,16 @@
<LinearLayout
app:layout_scrollFlags="scroll|enterAlways"
- android:paddingTop="0dp"
- android:paddingStart="16dp"
- android:paddingEnd="8dp"
- android:paddingBottom="8dp"
android:id="@+id/article_header"
+ android:background="?colorSurface"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:orientation="horizontal"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -41,7 +40,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginEnd="8dp"
android:textAlignment="viewStart"
android:textColor="?colorPrimary"
tools:text="Unreasonably long article title blah blah blah blah blah blah"
@@ -78,34 +76,40 @@
<TextView
android:id="@+id/comments"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
tools:text="comments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:layout_weight="1"
android:fontFamily="sans-serif-light"
- android:paddingTop="8dp"
+ android:layout_marginTop="8dp"
android:textColor="?colorSecondary"
android:textSize="12sp" />
<TextView
android:id="@+id/host"
tools:text="host"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:layout_weight="1"
android:fontFamily="sans-serif-light"
- android:paddingTop="8dp"
+ android:layout_marginTop="8dp"
android:textColor="?colorSecondary"
- android:textSize="12sp"
- android:visibility="gone"/>
+ android:textSize="12sp" />
+
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="8dp">
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp">
<TextView
android:id="@+id/tags"
@@ -134,58 +138,41 @@
</LinearLayout>
- </LinearLayout>
+ <com.google.android.material.divider.MaterialDivider
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
- <com.google.android.material.divider.MaterialDivider
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?colorSurfaceContainer">
+
+ <TextView
+ android:id="@+id/note"
+ tools:text="Article note (if any...)"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?colorSecondaryContainer"
+ android:layout_marginTop="8dp"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
+ android:padding="8dp"
+ android:textColor="?colorOnSecondaryContainer"
+ android:textSize="12sp"/>
+ </LinearLayout>
+ </LinearLayout>
</com.google.android.material.appbar.AppBarLayout>
- <androidx.core.widget.NestedScrollView
- android:id="@+id/article_scrollview"
- android:scrollbars="vertical|horizontal"
+ <com.telefonica.nestedscrollwebview.NestedScrollWebView
+ android:id="@+id/article_content"
+ android:layout_marginTop="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:descendantFocusability="blocksDescendants"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/note"
- tools:text="Article note (if any...)"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="?colorSecondaryContainer"
- android:textColor="?colorOnSecondaryContainer"
- android:textSize="12sp"
- android:paddingLeft="16dp"
- android:paddingTop="8dp"
- android:paddingRight="16dp"
- android:paddingBottom="8dp" />
-
- <org.fox.ttrss.util.LessBrokenWebView
- android:layout_margin="16dp"
- android:id="@+id/article_content"
- android:scrollbars="none"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- </LinearLayout>
- </androidx.core.widget.NestedScrollView>
+ android:layout_height="wrap_content" />
</com.otaliastudios.nestedscrollcoordinatorlayout.NestedScrollCoordinatorLayout>
- <TextView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/article_status_message"
- android:gravity="center"
- android:visibility="gone" />
-
</FrameLayout> \ No newline at end of file
diff --git a/org.fox.ttrss/src/main/res/layout/article_pager.xml b/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml
index 62b3fea4..1a687b1d 100755
--- a/org.fox.ttrss/src/main/res/layout/article_pager.xml
+++ b/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml
@@ -2,6 +2,5 @@
<androidx.viewpager.widget.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/article_pager"
- android:background="?android:colorBackground"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"/>
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
diff --git a/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml b/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml
index 9421f008..429b27c0 100644
--- a/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml
+++ b/org.fox.ttrss/src/main/res/layout/layout_detail_phone.xml
@@ -1,38 +1,32 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/headlines"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+ 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="wrap_content">
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/detail_fab"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="end|bottom"
+ android:visibility="gone"
+ android:src="@drawable/baseline_open_in_browser_24"
+ android:layout_margin="16dp" />
- <androidx.coordinatorlayout.widget.CoordinatorLayout
- xmlns:app="http://schemas.android.com/apk/res-auto"
+ <com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/detail_fab"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="end|bottom"
- android:visibility="gone"
- android:src="@drawable/baseline_open_in_browser_24"
- android:layout_margin="16dp" />
-
- <com.google.android.material.appbar.AppBarLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <include layout="@layout/toolbar" android:id="@+id/toolbar" />
+ android:layout_height="wrap_content">
- </com.google.android.material.appbar.AppBarLayout>
+ <include layout="@layout/toolbar" android:id="@+id/toolbar" />
- <FrameLayout
- android:id="@+id/article_fragment"
- app:layout_behavior=".util.DetailActivityScrollingViewBehavior"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- </FrameLayout>
+ </com.google.android.material.appbar.AppBarLayout>
- </androidx.coordinatorlayout.widget.CoordinatorLayout>
+ <FrameLayout
+ android:id="@+id/article_fragment"
+ app:layout_behavior=".util.DetailActivityScrollingViewBehavior"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ </FrameLayout>
<FrameLayout
android:id="@+id/headlines_fragment"
@@ -41,4 +35,5 @@
android:layout_width="0dp">
</FrameLayout>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
+