Skip to content

Commit e6c4690

Browse files
committed
# Copied Layouts
Copied select_channel_fragment to select_feed_group_fragment Copied select_channel_item to select_feed_group_item # Change Replaced the Layout references in the new Class SelectFeedGroupFragment
1 parent 86869f0 commit e6c4690

3 files changed

Lines changed: 83 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/settings/SelectFeedGroupFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void onCreate(@Nullable final Bundle savedInstanceState) {
8383
@Override
8484
public View onCreateView(@NonNull final LayoutInflater inflater, final ViewGroup container,
8585
final Bundle savedInstanceState) {
86-
final View v = inflater.inflate(R.layout.select_channel_fragment, container, false);
86+
final View v = inflater.inflate(R.layout.select_feed_group_fragment, container, false);
8787
recyclerView = v.findViewById(R.id.items_list);
8888
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
8989
final SelectChannelAdapter channelAdapter = new SelectChannelAdapter();
@@ -181,7 +181,7 @@ private class SelectChannelAdapter
181181
public SelectChannelItemHolder onCreateViewHolder(final ViewGroup parent,
182182
final int viewType) {
183183
final View item = LayoutInflater.from(parent.getContext())
184-
.inflate(R.layout.select_channel_item, parent, false);
184+
.inflate(R.layout.select_feed_group_item, parent, false);
185185
return new SelectChannelItemHolder(item);
186186
}
187187

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:orientation="vertical"
7+
android:padding="13dp">
8+
9+
<org.schabi.newpipe.views.NewPipeTextView
10+
android:layout_width="match_parent"
11+
android:layout_height="wrap_content"
12+
android:layout_marginStart="10dp"
13+
android:layout_marginLeft="10dp"
14+
android:layout_marginTop="5dp"
15+
android:layout_marginEnd="5dp"
16+
android:layout_marginRight="5dp"
17+
android:layout_marginBottom="10dp"
18+
android:text="@string/select_a_channel"
19+
android:textAppearance="?android:attr/textAppearanceLarge" />
20+
21+
<androidx.recyclerview.widget.RecyclerView
22+
android:id="@+id/items_list"
23+
android:layout_width="match_parent"
24+
android:layout_height="wrap_content"
25+
tools:listitem="@layout/select_channel_item" />
26+
27+
28+
<org.schabi.newpipe.views.NewPipeTextView
29+
android:id="@+id/empty_state_view"
30+
android:layout_width="match_parent"
31+
android:layout_height="wrap_content"
32+
android:layout_margin="10dp"
33+
android:text="@string/no_channel_subscribed_yet"
34+
android:textAppearance="?android:attr/textAppearanceListItem" />
35+
36+
<ProgressBar
37+
android:id="@+id/progressBar"
38+
style="?android:attr/progressBarStyle"
39+
android:layout_width="match_parent"
40+
android:layout_height="wrap_content"
41+
android:layout_margin="5dp" />
42+
</LinearLayout>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="wrap_content"
7+
android:background="?attr/selectableItemBackground"
8+
android:clickable="true"
9+
android:focusable="true"
10+
android:orientation="vertical"
11+
android:padding="5dp">
12+
13+
<com.google.android.material.imageview.ShapeableImageView
14+
android:id="@+id/itemThumbnailView"
15+
android:layout_width="42dp"
16+
android:layout_height="42dp"
17+
android:layout_alignParentStart="true"
18+
android:layout_alignParentLeft="true"
19+
android:layout_alignParentTop="true"
20+
android:layout_marginStart="3dp"
21+
android:layout_marginRight="8dp"
22+
android:src="@drawable/placeholder_person"
23+
app:shapeAppearance="@style/CircularImageView"
24+
tools:ignore="RtlHardcoded" />
25+
26+
<org.schabi.newpipe.views.NewPipeTextView
27+
android:id="@+id/itemTitleView"
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:layout_centerVertical="true"
31+
android:layout_marginBottom="@dimen/video_item_search_image_right_margin"
32+
android:layout_toEndOf="@+id/itemThumbnailView"
33+
android:layout_toRightOf="@+id/itemThumbnailView"
34+
android:ellipsize="end"
35+
android:lines="1"
36+
android:textAppearance="?android:attr/textAppearanceListItem"
37+
tools:text="Channel Title, Lorem ipsum" />
38+
39+
</RelativeLayout>

0 commit comments

Comments
 (0)