Add space above channel description (About tab)

This commit is contained in:
Stypox 2023-04-21 15:42:23 +02:00
parent dca32efadf
commit 013d513450
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
3 changed files with 11 additions and 1 deletions

View File

@ -35,7 +35,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable;
public abstract class BaseDescriptionFragment extends BaseFragment { public abstract class BaseDescriptionFragment extends BaseFragment {
final CompositeDisposable descriptionDisposables = new CompositeDisposable(); final CompositeDisposable descriptionDisposables = new CompositeDisposable();
FragmentDescriptionBinding binding; protected FragmentDescriptionBinding binding;
@Override @Override
public View onCreateView(@NonNull final LayoutInflater inflater, public View onCreateView(@NonNull final LayoutInflater inflater,

View File

@ -3,7 +3,9 @@ package org.schabi.newpipe.fragments.list.channel;
import static org.schabi.newpipe.extractor.stream.StreamExtractor.UNKNOWN_SUBSCRIBER_COUNT; import static org.schabi.newpipe.extractor.stream.StreamExtractor.UNKNOWN_SUBSCRIBER_COUNT;
import android.content.Context; import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -13,6 +15,7 @@ import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.channel.ChannelInfo; import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.stream.Description; import org.schabi.newpipe.extractor.stream.Description;
import org.schabi.newpipe.fragments.detail.BaseDescriptionFragment; import org.schabi.newpipe.fragments.detail.BaseDescriptionFragment;
import org.schabi.newpipe.util.DeviceUtils;
import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.Localization;
import java.util.List; import java.util.List;
@ -33,6 +36,12 @@ public class ChannelAboutFragment extends BaseDescriptionFragment {
super(); super();
} }
@Override
protected void initViews(final View rootView, final Bundle savedInstanceState) {
super.initViews(rootView, savedInstanceState);
binding.constraintLayout.setPadding(0, DeviceUtils.dpToPx(8, requireContext()), 0, 0);
}
@Nullable @Nullable
@Override @Override
protected Description getDescription() { protected Description getDescription() {

View File

@ -8,6 +8,7 @@
android:scrollbars="vertical"> android:scrollbars="vertical">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraint_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:animateLayoutChanges="true"> android:animateLayoutChanges="true">