From bc5fd208926c779a1ae912c10b3f446cc2629bea Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 10 May 2025 20:47:24 +0300 Subject: wip bottom appbar --- .../src/main/res/layout/fragment_article.xml | 6 ++--- .../src/main/res/layout/fragment_article_pager.xml | 2 +- .../src/main/res/layout/layout_detail_phone.xml | 30 ++++++++++++++-------- 3 files changed, 23 insertions(+), 15 deletions(-) (limited to 'org.fox.ttrss/src/main/res/layout') 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 e75980b0..5696e889 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_article.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_article.xml @@ -14,12 +14,12 @@ + android:layout_height="match_parent"> + android:layout_height="wrap_content"> + android:layout_height="match_parent" /> diff --git a/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml b/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml index 1a687b1d..2f962418 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_article_pager.xml @@ -1,5 +1,5 @@ - - - + android:layout_height="match_parent"> + android:layout_height="match_parent"> + + + + -- cgit v1.2.3-54-g00ecf From caac356cac265182308bc4aeac4c0f3891d129f0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 11 May 2025 09:23:07 +0300 Subject: drop unused offline layout --- .../main/res/layout/fragment_headlines_offline.xml | 23 ---------------------- 1 file changed, 23 deletions(-) delete mode 100755 org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml (limited to 'org.fox.ttrss/src/main/res/layout') diff --git a/org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml b/org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml deleted file mode 100755 index 4ce8c1dd..00000000 --- a/org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - \ No newline at end of file -- cgit v1.2.3-54-g00ecf From 118a8394e726bc2038dc992c49cf888b55629f03 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 11 May 2025 09:32:55 +0300 Subject: drop chrome fs custom view stuff --- .../main/java/org/fox/ttrss/ArticleFragment.java | 99 --------- .../src/main/res/layout/fragment_article.xml | 232 ++++++++++----------- 2 files changed, 110 insertions(+), 221 deletions(-) (limited to 'org.fox.ttrss/src/main/res/layout') diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index 33abc714..987c12d0 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -47,10 +47,6 @@ public class ArticleFragment extends androidx.fragment.app.Fragment { protected Article m_article; private DetailActivity m_activity; private WebView m_web; - protected View m_customView; - protected FrameLayout m_customViewContainer; - protected View m_contentView; - protected FSVideoChromeClient m_chromeClient; //protected View m_fab; protected int m_articleFontSize; protected int m_articleSmallFontSize; @@ -59,68 +55,6 @@ public class ArticleFragment extends androidx.fragment.app.Fragment { m_article = article; } - private class FSVideoChromeClient extends WebChromeClient { - //protected View m_videoChildView; - - private CustomViewCallback m_callback; - - public FSVideoChromeClient(View container) { - super(); - - } - - @Override - public void onShowCustomView(View view, CustomViewCallback callback) { - m_activity.getSupportActionBar().hide(); - - // if a view already exists then immediately terminate the new one - if (m_customView != null) { - callback.onCustomViewHidden(); - return; - } - m_customView = view; - m_contentView.setVisibility(View.GONE); - - m_customViewContainer.setVisibility(View.VISIBLE); - m_customViewContainer.addView(view); - - //if (m_fab != null) m_fab.setVisibility(View.GONE); - - m_activity.showSidebar(false); - - m_callback = callback; - } - - @Override - public void onHideCustomView() { - super.onHideCustomView(); - - m_activity.getSupportActionBar().show(); - - if (m_customView == null) - return; - - m_contentView.setVisibility(View.VISIBLE); - m_customViewContainer.setVisibility(View.GONE); - - // Hide the custom view. - m_customView.setVisibility(View.GONE); - - // Remove the custom view from its container. - m_customViewContainer.removeView(m_customView); - m_callback.onCustomViewHidden(); - - /*if (m_fab != null && m_prefs.getBoolean("enable_article_fab", true)) - m_fab.setVisibility(View.VISIBLE);*/ - - m_customView = null; - - m_activity.showSidebar(true); - } - } - - //private View.OnTouchListener m_gestureListener; - @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { @@ -170,13 +104,6 @@ public class ArticleFragment extends androidx.fragment.app.Fragment { m_activity.finish(); } - /* if (m_fsviewShown) { - view.findViewById(R.id.article_fullscreen_video).setVisibility(View.VISIBLE); - view.findViewById(R.id.article_scrollview).setVisibility(View.INVISIBLE); - } */ - - m_customViewContainer = view.findViewById(R.id.article_fullscreen_video); - /* if (m_article.id == HeadlinesFragment.ARTICLE_SPECIAL_TOP_CHANGED) { TextView statusMessage = (TextView) view.findViewById(R.id.article_status_message); statusMessage.setText(R.string.headlines_row_top_changed); @@ -391,8 +318,6 @@ public class ArticleFragment extends androidx.fragment.app.Fragment { ws.setJavaScriptEnabled(false); - m_chromeClient = new FSVideoChromeClient(getView()); - m_web.setWebChromeClient(m_chromeClient); m_web.setBackgroundColor(Color.TRANSPARENT); ws.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); @@ -492,30 +417,6 @@ public class ArticleFragment extends androidx.fragment.app.Fragment { if (m_web != null) m_web.onResume(); } - public boolean inCustomView() { - return (m_customView != null); - } - - @Override - public void onStop() { - super.onStop(); - - if (inCustomView()) { - hideCustomView(); - } - } - - public void hideCustomView() { - if (m_chromeClient != null) { - m_chromeClient.onHideCustomView(); - } - } - - @Override - public void onDestroy() { - super.onDestroy(); - } - @Override public void onAttach(Activity activity) { super.onAttach(activity); 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 5696e889..eba96d75 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_article.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_article.xml @@ -1,157 +1,145 @@ - - - - + android:background="?colorSurfaceContainer" + android:layout_height="wrap_content"> - - + + android:layout_height="match_parent"> - + android:layout_height="wrap_content" + android:layout_weight="1" + android:textColor="?colorPrimary" + tools:text="Unreasonably long article title blah blah blah blah blah blah" + android:textSize="18sp" + android:gravity="start" /> - + - + + + - - - - - - - - - + + + + + + + app:cardBackgroundColor="?colorTertiaryContainer" + android:layout_margin="8dp" + app:strokeWidth="0dp" + android:layout_height="match_parent"> - + android:layout_height="wrap_content"> - - - - - - - - - - - - + android:layout_height="wrap_content" + android:layout_marginEnd="8dp" + android:textColor="?colorOnTertiaryContainer" + android:layout_weight="1" + android:textSize="12sp"/> + + + + + - + + + - + - + - \ No newline at end of file + -- cgit v1.2.3-54-g00ecf From 12f4c47e2b364401f12744126c5fbcda27d0bbc1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 11 May 2025 10:34:36 +0300 Subject: adjust layout of compact headline rows, disable dividers for now --- .../main/java/org/fox/ttrss/HeadlinesFragment.java | 11 ++- .../src/main/res/layout/headlines_row_compact.xml | 89 +++++++-------------- .../res/layout/headlines_row_compact_selected.xml | 86 +++++++------------- .../headlines_row_compact_selected_unread.xml | 93 +++++++++------------- .../res/layout/headlines_row_compact_unread.xml | 76 ++++++++---------- 5 files changed, 135 insertions(+), 220 deletions(-) (limited to 'org.fox.ttrss/src/main/res/layout') diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 52ef4327..175b417c 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -358,12 +358,12 @@ public class HeadlinesFragment extends androidx.fragment.app.Fragment { m_list.setLayoutManager(m_layoutManager); m_list.setItemAnimator(new DefaultItemAnimator()); - if (m_compactLayoutMode) { + /* if (m_compactLayoutMode) { MaterialDividerItemDecoration materialDivider = new MaterialDividerItemDecoration(m_list.getContext(), m_layoutManager.getOrientation()); materialDivider.setDividerInsetStart(dpToPx(80)); m_list.addItemDecoration(materialDivider); - } + } */ ArticleListAdapter adapter = new ArticleListAdapter(getActivity(), R.layout.headlines_row, m_articles); @@ -795,7 +795,6 @@ public class HeadlinesFragment extends androidx.fragment.app.Fragment { menuButtonView = v.findViewById(R.id.article_menu_button); flavorImageHolder = v.findViewById(R.id.flavorImageHolder); flavorImageLoadingBar = v.findViewById(R.id.flavorImageLoadingBar); - headlineFooter = v.findViewById(R.id.headline_footer); textImage = v.findViewById(R.id.text_image); textChecked = v.findViewById(R.id.text_checked); headlineHeader = v.findViewById(R.id.headline_header); @@ -1191,6 +1190,12 @@ public class HeadlinesFragment extends androidx.fragment.app.Fragment { holder.excerptView.setTextSize(TypedValue.COMPLEX_UNIT_SP, headlineFontSize); holder.excerptView.setText(excerpt); + if (!excerpt.isEmpty()) { + holder.excerptView.setVisibility(View.VISIBLE); + } else { + holder.excerptView.setVisibility(View.GONE); + } + if (!canShowFlavorImage()) { holder.excerptView.setPadding(holder.excerptView.getPaddingLeft(), 0, diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml index fd328276..352aad91 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact.xml @@ -4,21 +4,23 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> @@ -44,94 +45,64 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" android:textColor="?colorPrimary" - android:textSize="18sp" - android:layout_span="2" /> + android:textSize="18sp" /> + + - - - - - - - + android:layout_marginTop="4dp" /> - - - - - - \ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml index 6030df54..5721dcb8 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected.xml @@ -4,16 +4,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" android:background="?colorTertiaryContainer" - android:textColor="?colorOnTertiaryContainer" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> @@ -46,91 +46,63 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" - android:textSize="18sp" - android:layout_span="2" /> + android:textColor="?colorOnTertiaryContainer" + android:textSize="18sp" /> + + - - - - - - - + android:layout_marginTop="4dp" /> - - - - - - \ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml index 0d8d930d..06813e04 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_selected_unread.xml @@ -4,38 +4,41 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" android:background="?colorTertiaryContainer" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> + android:layout_marginEnd="16dp"> + android:id="@+id/text_checked" + android:layout_gravity="center" /> @@ -43,89 +46,65 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" + android:textColor="?colorOnTertiaryContainer" android:textStyle="bold" - android:textSize="18sp" - android:layout_span="2" /> + android:textSize="18sp" /> + + - - - - - - - + android:layout_marginTop="4dp" /> + android:textSize="12sp" + /> - - - - - \ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml index 222d19d1..6aa1bdcd 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_compact_unread.xml @@ -4,15 +4,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/headlines_row" - android:padding="@dimen/activity_horizontal_margin" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="16dp" + android:paddingEnd="8dp" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="horizontal" android:background="?colorSurfaceContainerLowest" - tools:ignore="HardcodedText" > + android:orientation="horizontal"> @@ -45,78 +46,65 @@ android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textAlignment="viewStart" android:maxLines="2" android:ellipsize="end" tools:text="Sample entry title" android:textStyle="bold" - android:textSize="18sp" - android:layout_span="2" /> + android:textSize="18sp" /> + + - - - - - - + android:layout_marginTop="4dp" /> + android:textColor="?colorSecondary" + android:textSize="12sp" + /> - - \ No newline at end of file -- cgit v1.2.3-54-g00ecf