Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion News-Android-App/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ dependencies {
implementation "androidx.recyclerview:recyclerview:1.4.0"
implementation "androidx.browser:browser:1.8.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation 'com.google.code.gson:gson:2.13.1'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.code.gson:gson:2.13.1'

implementation "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
ksp "com.github.bumptech.glide:ksp:${GLIDE_VERSION}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.Fragment;

import com.google.android.material.navigation.NavigationView;
Expand Down Expand Up @@ -168,6 +170,20 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,

bindNavigationMenu(binding.getRoot(), inflater);

// move header of sidebar down according to insets
ViewCompat.setOnApplyWindowInsetsListener(binding.headerView, (View v, WindowInsetsCompat insets) -> {
var systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(0, systemBars.top, 0, 0);
return insets;
});

// make sure that the end of the sidebar doesn't go behind the navigation bar
ViewCompat.setOnApplyWindowInsetsListener(binding.expandableListView, (View v, WindowInsetsCompat insets) -> {
var systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(0, 0, 0, systemBars.bottom);
return insets;
});

return binding.getRoot();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoPanelHeight="68dp"
sothree:umanoParallaxOffset="100dp"
sothree:umanoShadowHeight="4dp"> <!-- sothree:dragView="@+id/name" -->
android:layout_height="match_parent">

<de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoPanelHeight="68dp"
sothree:umanoParallaxOffset="100dp"
sothree:umanoShadowHeight="4dp"> <!-- sothree:dragView="@+id/name" -->

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<LinearLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -43,9 +47,10 @@

</androidx.coordinatorlayout.widget.CoordinatorLayout>

<FrameLayout
android:id="@+id/podcast_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/podcast_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout>
</de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3 changes: 2 additions & 1 deletion News-Android-App/src/main/res/layout/activity_new_feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent"
android:layout_width="match_parent">
android:layout_width="match_parent"
android:fitsSystemWindows="true">

<LinearLayout
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent">
android:layout_width="match_parent"
android:fitsSystemWindows="true">

<!-- SlidingUpPanelLayout doesn't work with layout_behavior, use marginTop -->
<de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout
Expand Down
16 changes: 10 additions & 6 deletions News-Android-App/src/main/res/layout/activity_newsreader.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent">

<de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoPanelHeight="68dp"
sothree:umanoParallaxOffset="100dp"
sothree:umanoShadowHeight="4dp"> <!-- sothree:dragView="@+id/name" -->
android:gravity="bottom"
sothree:umanoShadowHeight="4dp"> <!-- sothree:dragView="@+id/name" -->

<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/drawer_layout"
Expand All @@ -18,7 +21,8 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<fragment
class="de.luhmer.owncloudnewsreader.NewsReaderDetailFragment"
Expand All @@ -33,7 +37,6 @@
android:id="@+id/toolbar_layout"
layout="@layout/toolbar_layout" />


</androidx.coordinatorlayout.widget.CoordinatorLayout>

<FrameLayout
Expand All @@ -50,3 +53,4 @@
android:layout_height="match_parent" />

</de.luhmer.owncloudnewsreader.view.PodcastSlidingUpPanelLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
android:id="@+id/layout_activity_pip"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".PiPVideoPlaybackActivity">



</RelativeLayout>
6 changes: 4 additions & 2 deletions News-Android-App/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">

<include
android:id="@+id/toolbar_layout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
android:layout_height="match_parent"
android:scrollbars="vertical"
tools:listitem="@layout/subscription_detail_list_item_thumbnail"/>
<!-- android:clipToPadding="false" -->

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

Expand Down
105 changes: 56 additions & 49 deletions News-Android-App/src/main/res/layout/fragment_newsreader_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,69 @@
android:layout_height="match_parent"
android:background="?attr/colorSurface">

<!-- TODO: make header scroll up with listview -->
<androidx.constraintlayout.widget.ConstraintLayout
<!-- Wrap in Frame-Layout so that we can add Padding through the Edge-to-Edge callbacks -->
<FrameLayout
android:id="@+id/header_view"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@color/nextcloudBlue"
android:clickable="true"
android:focusable="true"
android:padding="10dp">
android:layout_height="wrap_content"
android:background="@color/nextcloudBlue">

<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
<!-- TODO: make header scroll up with listview -->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacer_2x"
android:layout_toEndOf="@+id/header_logo"
android:ellipsize="end"
android:fontFamily="sans-serif-light"
android:gravity="center_vertical"
android:singleLine="true"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/white"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="@id/header_logo"
app:layout_constraintStart_toEndOf="@id/header_logo"
app:layout_constraintTop_toTopOf="@id/header_logo" />
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="10dp"
android:paddingVertical="16dp">

<ImageView
android:id="@+id/header_logo"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginStart="@dimen/spacer_1x"
android:contentDescription="@string/content_desc_tap_to_refresh"
android:scaleX="1.7"
android:scaleY="1.7"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_launcher_foreground" />
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacer_2x"
android:layout_toEndOf="@+id/header_logo"
android:ellipsize="end"
android:fontFamily="sans-serif-light"
android:gravity="center_vertical"
android:singleLine="true"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/white"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="@id/header_logo"
app:layout_constraintStart_toEndOf="@id/header_logo"
app:layout_constraintTop_toTopOf="@id/header_logo" />

<ProgressBar
android:id="@+id/header_logo_progress"
style="?android:attr/progressBarStyle"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center"
android:indeterminate="true"
android:indeterminateTint="@android:color/white"
android:indeterminateTintMode="src_in"
app:layout_constraintBottom_toBottomOf="@id/header_logo"
app:layout_constraintEnd_toEndOf="@id/header_logo"
app:layout_constraintStart_toStartOf="@id/header_logo"
app:layout_constraintTop_toTopOf="@id/header_logo" />
<ImageView
android:id="@+id/header_logo"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginStart="@dimen/spacer_1x"
android:contentDescription="@string/content_desc_tap_to_refresh"
android:scaleX="1.7"
android:scaleY="1.7"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_launcher_foreground" />

</androidx.constraintlayout.widget.ConstraintLayout>
<ProgressBar
android:id="@+id/header_logo_progress"
style="?android:attr/progressBarStyle"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center"
android:indeterminate="true"
android:indeterminateTint="@android:color/white"
android:indeterminateTintMode="src_in"
app:layout_constraintBottom_toBottomOf="@id/header_logo"
app:layout_constraintEnd_toEndOf="@id/header_logo"
app:layout_constraintStart_toStartOf="@id/header_logo"
app:layout_constraintTop_toTopOf="@id/header_logo" />

</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

<de.luhmer.owncloudnewsreader.ListView.BlockingExpandableListView
android:id="@+id/expandableListView"
Expand Down
3 changes: 2 additions & 1 deletion News-Android-App/src/main/res/layout/toolbar_layout.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:fitsSystemWindows="true">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
Expand Down