Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #1306

Merged
merged 4 commits into from
Aug 23, 2024
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
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ android {
}
buildFeatures {
viewBinding true
buildConfig true
}
lint {
abortOnError false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
stopButton = fragmentBinding.stopButton;
bufferingSpinner = fragmentBinding.bufferingSpinner;

// Set the background color of the video description layout since by default it doesn't match the background color of the Chromecast controller
TypedValue typedValue = new TypedValue();
getContext().getTheme().resolveAttribute(R.attr.colorPrimary, typedValue, true);
videoDescriptionBinding.videoDescLinearlayout.setBackgroundResource(typedValue.resourceId);

Linker.configure(videoDescriptionBinding.videoDescDescription, null);

fragmentBinding.chromecastPlaybackProgressBar.setOnSeekBarChangeListener(this);
Expand Down
2 changes: 1 addition & 1 deletion app/src/extra/res/menu/main_activity_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<item android:id="@+id/menu_search"
android:title="@string/search_videos"
android:icon="@drawable/ic_search"
app:showAsAction="always"
app:showAsAction="collapseActionView|ifRoom"
app:actionViewClass="androidx.appcompat.widget.SearchView"/>

<item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,6 @@ public Single<List<ChannelId>> getSubscribedChannelIdsAsync() {
.subscribeOn(Schedulers.io());
}

public void setChannelState(@NonNull PersistentChannel channel, @NonNull Status status) {
Logger.i(this, "Set channel %s pk=%s, id=%s state to %s", channel.channel().getTitle(), channel.channelPk(), channel.getChannelId(), status);
SkyTubeApp.nonUiThread();
LocalChannelTable.updateChannelStatus(getWritableDatabase(), channel.getChannelId(), status);
}

public void setChannelState(@NonNull ChannelId channelId, @NonNull Status status) {
Logger.i(this, "Set channel id=%s state to %s", channelId, status);
SkyTubeApp.nonUiThread();
Expand Down
41 changes: 22 additions & 19 deletions app/src/main/res/layout/video_description.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/video_player_drawer_background">
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/video_desc_linearlayout"
android:orientation="vertical"
android:padding="16dp">

<LinearLayout
android:id="@+id/video_desc_linearlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:padding="16dp">

<TextView
android:id="@+id/video_desc_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:textColor="@color/video_player_drawer_text"
android:text="Title Goes Here!"
android:textAppearance="@android:style/TextAppearance.Large"
android:text="Title Goes Here!"/>
android:textColor="@color/video_player_drawer_text" />


<LinearLayout
Expand Down Expand Up @@ -59,14 +62,14 @@
<TextView
android:id="@+id/video_desc_channel"
style="@style/VideoDescTextView"
android:text="Channel Name"/>
android:text="Channel Name" />

<!-- SUB BUTTON -->
<free.rm.skytube.gui.businessobjects.views.SubscribeButton
android:id="@+id/video_desc_subscribe_button"
style="@style/SubscribeButton"
android:layout_below="@id/video_desc_channel"
android:text="Unsubscribe"/>
android:text="Unsubscribe" />
</LinearLayout>

</RelativeLayout>
Expand All @@ -78,20 +81,20 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="30dp"
android:paddingStart="30dp">
android:paddingStart="30dp"
android:paddingLeft="30dp">

<TextView
android:id="@+id/video_desc_views"
style="@style/VideoDescTextView"
android:text="17,000,000 views"/>
android:text="17,000,000 views" />

<ProgressBar
android:id="@+id/video_desc_likes_bar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="160dp"
android:layout_height="wrap_content"
android:layout_below="@id/video_desc_views"/>
android:layout_below="@id/video_desc_views" />

<TextView
android:id="@+id/video_desc_likes"
Expand Down Expand Up @@ -120,25 +123,25 @@
style="@style/VideoDescTextView"
android:layout_below="@id/video_desc_likes_bar"
android:text="@string/ratings_disabled"
android:visibility="gone"/>
android:visibility="gone" />
</RelativeLayout>

</LinearLayout>


<TextView
android:id="@+id/video_desc_publish_date"
android:paddingTop="10dp"
style="@style/VideoDescTextView"
android:text="7 days ago"/>
android:paddingTop="10dp"
android:text="7 days ago" />


<TextView
android:id="@+id/video_desc_description"
android:paddingTop="10dp"
android:autoLink="web"
style="@style/VideoDescTextView"
android:text="Video description here."/>
android:autoLink="web"
android:paddingTop="10dp"
android:text="Video description here." />

</LinearLayout>
</ScrollView>
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF

android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonTransitiveRClass=true
android.nonFinalResIds=false

Loading