1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 08:30:44 +00:00

Added Dark Theme

This commit is contained in:
59436419 2017-01-17 16:07:36 +05:30
parent a2e4585fe8
commit 60dc19d2bc
21 changed files with 318 additions and 256 deletions

View File

@ -32,10 +32,10 @@ android {
dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'org.jsoup:jsoup:1.8.3'
compile 'org.mozilla:rhino:1.7.7'
compile 'info.guardianproject.netcipher:netcipher:1.2'

View File

@ -47,7 +47,6 @@ public class MainActivity extends Themer {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setVolumeControlStream(AudioManager.STREAM_MUSIC);
mainFragment = getSupportFragmentManager()
.findFragmentById(R.id.search_fragment);

View File

@ -2,19 +2,20 @@ package org.schabi.newpipe;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import java.util.Objects;
import static org.schabi.newpipe.R.attr.theme;
public class Themer extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
.getString("theme", "1"), "0")) {
.getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
setTheme(R.style.DarkTheme);
}
}
}
}

View File

@ -21,6 +21,7 @@ import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@ -30,7 +31,6 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.view.MenuItem;
import android.widget.Toast;
import com.google.android.exoplayer.util.Util;
@ -39,26 +39,26 @@ import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import java.util.Vector;
import org.schabi.newpipe.ActivityCommunicator;
import org.schabi.newpipe.ChannelActivity;
import org.schabi.newpipe.ReCaptchaActivity;
import org.schabi.newpipe.extractor.stream_info.StreamInfo;
import org.schabi.newpipe.extractor.stream_info.StreamPreviewInfo;
import org.schabi.newpipe.info_list.InfoItemBuilder;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.ImageErrorLoadingListener;
import org.schabi.newpipe.Localization;
import org.schabi.newpipe.R;
import org.schabi.newpipe.ReCaptchaActivity;
import org.schabi.newpipe.download.DownloadDialog;
import org.schabi.newpipe.extractor.stream_info.AudioStream;
import org.schabi.newpipe.extractor.MediaFormat;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.stream_info.AudioStream;
import org.schabi.newpipe.extractor.stream_info.StreamInfo;
import org.schabi.newpipe.extractor.stream_info.StreamPreviewInfo;
import org.schabi.newpipe.extractor.stream_info.VideoStream;
import org.schabi.newpipe.info_list.InfoItemBuilder;
import org.schabi.newpipe.player.BackgroundPlayer;
import org.schabi.newpipe.player.PlayVideoActivity;
import org.schabi.newpipe.player.ExoPlayerActivity;
import org.schabi.newpipe.player.PlayVideoActivity;
import org.schabi.newpipe.report.ErrorActivity;
import java.util.Vector;
import static android.app.Activity.RESULT_OK;
import static org.schabi.newpipe.ReCaptchaActivity.RECAPTCHA_REQUEST;
@ -650,7 +650,6 @@ public class VideoItemDetailFragment extends Fragment {
public void onStart() {
super.onStart();
Activity a = getActivity();
infoItemBuilder = new InfoItemBuilder(a, a.findViewById(android.R.id.content));
if (android.os.Build.VERSION.SDK_INT < 18) {

View File

@ -13,6 +13,7 @@ import android.os.IBinder;
import android.preference.PreferenceManager;
import android.support.v4.app.NavUtils;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.Menu;
@ -27,9 +28,9 @@ import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;
import org.schabi.newpipe.R;
import org.schabi.newpipe.Themer;
import org.schabi.newpipe.report.ErrorActivity;
import org.schabi.newpipe.R;
import org.schabi.newpipe.settings.SettingsActivity;
import java.io.File;

View File

@ -47,8 +47,8 @@ public class SettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceBundle) {
if (Objects.equals(PreferenceManager.getDefaultSharedPreferences(this)
.getString("theme", "1"), "0")) {
setTheme(R.style.DarkTheme);
.getString("theme", getResources().getString(R.string.light_theme_title)), getResources().getString(R.string.dark_theme_title))) {
setTheme(R.style.DarkTheme);
}
getDelegate().installViewFactory();
getDelegate().onCreate(savedInstanceBundle);

View File

@ -21,6 +21,7 @@ import org.schabi.newpipe.App;
import org.schabi.newpipe.R;
import java.util.ArrayList;
import java.util.Objects;
import info.guardianproject.netcipher.proxy.OrbotHelper;
@ -67,7 +68,7 @@ public class SettingsFragment extends PreferenceFragment
private Preference downloadPathAudioPreference;
private Preference themePreference;
private SharedPreferences defaultPreferences;
private Preference themePreference;
@Override
public void onCreate(final Bundle savedInstanceState) {
@ -86,6 +87,7 @@ public class SettingsFragment extends PreferenceFragment
DOWNLOAD_PATH_AUDIO_PREFERENCE = getString(R.string.download_path_audio_key);
THEME = getString(R.string.theme_key);
USE_TOR_KEY = getString(R.string.use_tor_key);
THEME = getString(R.string.theme_key);
// get pref objects
defaultResolutionPreference =

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/light_background_color"/>
android:drawable="?android:attr/windowBackground"/>
<item>
<bitmap

View File

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".detail.VideoItemDetailFragment"
android:textIsSelectable="true"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/video_item_detail">
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".detail.VideoItemDetailFragment"
android:textIsSelectable="true"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/video_item_detail">
<ProgressBar android:id="@+id/detail_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"/>
<com.nirhart.parallaxscroll.views.ParallaxScrollView
android:id="@+id/detail_main_content"
@ -35,24 +35,24 @@
android:background="?attr/selectableItemBackground">
<ImageView android:id="@+id/detail_thumbnail_view"
android:contentDescription="@string/detail_thumbnail_view_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@android:color/black"
android:src="@drawable/dummy_thumbnail_dark"/>
android:contentDescription="@string/detail_thumbnail_view_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@android:color/black"
android:src="@drawable/dummy_thumbnail_dark"/>
<ImageView android:id="@+id/play_arrow_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:layout_centerInParent="true"
android:src="@drawable/new_play_arrow"
android:visibility="invisible"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:layout_centerInParent="true"
android:src="@drawable/new_play_arrow"
android:visibility="invisible"/>
<Button
android:id="@+id/detail_stream_thumbnail_window_background_button"
@ -63,10 +63,11 @@
</RelativeLayout>
<RelativeLayout android:id="@+id/detail_text_content_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/detail_stream_thumbnail_window_layout"
android:visibility="gone">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/detail_stream_thumbnail_window_layout"
android:background="?android:windowBackground"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
@ -74,15 +75,15 @@
android:id="@+id/detailTopView">
<TextView android:id="@+id/detail_video_title_view"
android:layout_width="0dp"
android:layout_weight=".7"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_title_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginTop="12dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="Title"/>
android:layout_width="0dp"
android:layout_weight=".7"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_title_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginTop="12dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="Title"/>
<ImageView
android:layout_width="15dp"
@ -98,17 +99,17 @@
</LinearLayout>
<TextView android:id="@+id/detail_view_count_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_views_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="10,069,948 views"
android:layout_below="@id/detailTopView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_views_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="10,069,948 views"
android:layout_below="@id/detailTopView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp" />
<RelativeLayout
android:layout_width="match_parent"
@ -121,21 +122,21 @@
android:layout_marginEnd="12dp"
android:visibility="gone">
<TextView android:id="@+id/detail_upload_date_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_upload_date_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Upload date"
android:layout_marginTop="3dp" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_upload_date_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Upload date"
android:layout_marginTop="3dp" />
<TextView android:id="@+id/detail_description_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_description_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_below="@id/detail_upload_date_view"
android:text="Description............."
android:layout_marginTop="3dp" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_description_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_below="@id/detail_upload_date_view"
android:text="Description............."
android:layout_marginTop="3dp" />
</RelativeLayout>
<LinearLayout
@ -149,32 +150,32 @@
android:layout_alignParentEnd="true"
android:layout_marginTop="5dp">
<ImageView android:id="@+id/detail_thumbs_up_img_view"
android:contentDescription="@string/detail_likes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="@drawable/thumbs_up" />
android:contentDescription="@string/detail_likes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="?attr/thumbs_up"/>
<TextView android:id="@+id/detail_thumbs_up_count_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="200" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="200" />
<ImageView android:id="@+id/detail_thumbs_down_img_view"
android:contentDescription="@string/detail_dislikes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="@drawable/thumbs_down"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"/>
android:contentDescription="@string/detail_dislikes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="?attr/thumbs_down"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"/>
<TextView android:id="@+id/detail_thumbs_down_count_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="100" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="100" />
</LinearLayout>
<FrameLayout
@ -207,17 +208,17 @@
android:layout_marginBottom="5dp"/>
<TextView android:id="@+id/detail_uploader_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="@dimen/video_item_detail_uploader_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Uploader"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/detail_uploader_thumbnail_view"
android:layout_toEndOf="@+id/detail_uploader_thumbnail_view"
android:layout_marginLeft="15dp"
android:layout_marginStart="28dp" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="@dimen/video_item_detail_uploader_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Uploader"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/detail_uploader_thumbnail_view"
android:layout_toEndOf="@+id/detail_uploader_thumbnail_view"
android:layout_marginLeft="15dp"
android:layout_marginStart="28dp" />
<View
android:background="#000"
@ -234,12 +235,12 @@
</FrameLayout>
<RelativeLayout android:id="@+id/detail_next_stream_root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|bottom"
android:layout_below="@+id/detail_uploader_frame"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|bottom"
android:layout_below="@+id/detail_uploader_frame"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp">
<TextView
android:id="@+id/detail_next_stream_title"
@ -256,14 +257,14 @@
android:layout_height="wrap_content"
android:id="@+id/detail_next_stream_content"/>
<TextView android:id="@+id/detail_similar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textSize="@dimen/video_item_detail_next_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/similar_videos_btn_text"
android:layout_below="@id/detail_next_stream_content"
android:textAllCaps="true" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textSize="@dimen/video_item_detail_next_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/similar_videos_btn_text"
android:layout_below="@id/detail_next_stream_content"
android:textAllCaps="true" />
<LinearLayout
android:id="@+id/similar_streams_view"
android:orientation="vertical"
@ -275,4 +276,4 @@
</RelativeLayout>
</RelativeLayout>
</com.nirhart.parallaxscroll.views.ParallaxScrollView>
</RelativeLayout>
</RelativeLayout>

View File

@ -91,6 +91,7 @@
android:id="@+id/channel_streams_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:windowBackground"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:scrollbars="vertical"/>
</android.support.design.widget.CoordinatorLayout>

View File

@ -42,7 +42,7 @@
android:id="@+id/errorMessageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textColor="?android:attr/colorAccent"
android:text="@string/info_labels"/>
<TextView
@ -63,7 +63,7 @@
android:id="@+id/errorInfoLabelsView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textColor="?android:attr/colorAccent"
android:text="@string/info_labels"/>
<HorizontalScrollView

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".detail.VideoItemDetailFragment"
android:textIsSelectable="true"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/video_item_detail">
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".detail.VideoItemDetailFragment"
android:textIsSelectable="true"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/video_item_detail">
<com.nirhart.parallaxscroll.views.ParallaxScrollView
android:id="@+id/detail_main_content"
@ -29,22 +29,22 @@
android:background="?attr/selectableItemBackground">
<ImageView android:id="@+id/detail_thumbnail_view"
android:contentDescription="@string/detail_thumbnail_view_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@android:color/black"
android:src="@drawable/dummy_thumbnail_dark"/>
android:contentDescription="@string/detail_thumbnail_view_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@android:color/black"
android:src="@drawable/dummy_thumbnail_dark"/>
<ProgressBar android:id="@+id/detail_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/play_video_button"
@ -65,10 +65,11 @@
</RelativeLayout>
<RelativeLayout android:id="@+id/detail_text_content_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/detail_stream_thumbnail_window_layout"
android:visibility="gone">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/detail_stream_thumbnail_window_layout"
android:background="?android:windowBackground"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
@ -76,15 +77,15 @@
android:id="@+id/detailTopView">
<TextView android:id="@+id/detail_video_title_view"
android:layout_width="0dp"
android:layout_weight=".7"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_title_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginTop="12dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="Title"/>
android:layout_width="0dp"
android:layout_weight=".7"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_title_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginTop="12dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="Title"/>
<ImageView
android:layout_width="15dp"
@ -100,17 +101,17 @@
</LinearLayout>
<TextView android:id="@+id/detail_view_count_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_views_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="10,069,948 views"
android:layout_below="@id/detailTopView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_views_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:text="10,069,948 views"
android:layout_below="@id/detailTopView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp" />
<RelativeLayout
android:layout_width="match_parent"
@ -123,21 +124,21 @@
android:layout_marginEnd="12dp"
android:visibility="gone">
<TextView android:id="@+id/detail_upload_date_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_upload_date_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Upload date"
android:layout_marginTop="3dp" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_upload_date_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Upload date"
android:layout_marginTop="3dp" />
<TextView android:id="@+id/detail_description_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_description_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_below="@id/detail_upload_date_view"
android:text="Description............."
android:layout_marginTop="3dp" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_description_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_below="@id/detail_upload_date_view"
android:text="Description............."
android:layout_marginTop="3dp" />
</RelativeLayout>
<LinearLayout
@ -151,32 +152,32 @@
android:layout_alignParentEnd="true"
android:layout_marginTop="5dp">
<ImageView android:id="@+id/detail_thumbs_up_img_view"
android:contentDescription="@string/detail_likes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="@drawable/thumbs_up" />
android:contentDescription="@string/detail_likes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="?attr/thumbs_up" />
<TextView android:id="@+id/detail_thumbs_up_count_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="200" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="200" />
<ImageView android:id="@+id/detail_thumbs_down_img_view"
android:contentDescription="@string/detail_dislikes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="@drawable/thumbs_down"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"/>
android:contentDescription="@string/detail_dislikes_img_view_description"
android:layout_width="@dimen/video_item_detail_like_image_width"
android:layout_height="@dimen/video_item_detail_like_image_height"
android:src="?attr/thumbs_down"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"/>
<TextView android:id="@+id/detail_thumbs_down_count_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="100" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/video_item_detail_likes_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="100" />
</LinearLayout>
<FrameLayout
@ -209,17 +210,17 @@
android:layout_marginBottom="5dp"/>
<TextView android:id="@+id/detail_uploader_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="@dimen/video_item_detail_uploader_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Uploader"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/detail_uploader_thumbnail_view"
android:layout_toEndOf="@+id/detail_uploader_thumbnail_view"
android:layout_marginLeft="15dp"
android:layout_marginStart="28dp" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="@dimen/video_item_detail_uploader_text_size"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Uploader"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/detail_uploader_thumbnail_view"
android:layout_toEndOf="@+id/detail_uploader_thumbnail_view"
android:layout_marginLeft="15dp"
android:layout_marginStart="28dp" />
<View
android:background="#000"
@ -236,12 +237,12 @@
</FrameLayout>
<RelativeLayout android:id="@+id/detail_next_stream_root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|bottom"
android:layout_below="@+id/detail_uploader_frame"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|bottom"
android:layout_below="@+id/detail_uploader_frame"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp">
<TextView
android:id="@+id/detail_next_stream_title"
@ -258,14 +259,14 @@
android:layout_height="wrap_content"
android:id="@+id/detail_next_stream_content"/>
<TextView android:id="@+id/detail_similar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textSize="@dimen/video_item_detail_next_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/similar_videos_btn_text"
android:layout_below="@id/detail_next_stream_content"
android:textAllCaps="true" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textSize="@dimen/video_item_detail_next_text_size"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/similar_videos_btn_text"
android:layout_below="@id/detail_next_stream_content"
android:textAllCaps="true" />
<LinearLayout
android:id="@+id/similar_streams_view"
android:orientation="vertical"
@ -277,4 +278,4 @@
</RelativeLayout>
</RelativeLayout>
</com.nirhart.parallaxscroll.views.ParallaxScrollView>
</FrameLayout>
</FrameLayout>

View File

@ -5,12 +5,12 @@
<item android:id="@+id/menu_item_play_audio"
android:title="@string/play_audio"
app:showAsAction="ifRoom"
android:icon="@drawable/ic_headset_black" />
android:icon="?attr/audio" />
<item android:id="@+id/menu_item_download"
app:showAsAction="ifRoom"
android:title="@string/download"
android:icon="@drawable/ic_file_download_black"/>
android:icon="?attr/download"/>
<item android:id="@+id/menu_item_share"
android:title="@string/share"

View File

@ -1,13 +1,30 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="android:actionBarStyle">@style/NewPipeActionbarTheme</item>
<item name="actionBarStyle">@style/NewPipeActionbarTheme</item>
<item name="android:colorPrimary">@color/light_youtube_primary_color</item>
<item name="android:colorPrimaryDark">@color/light_youtube_dark_color</item>
<item name="colorPrimary">@color/light_youtube_primary_color</item>
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
<item name="colorAccent">@color/light_youtube_accent_color</item>
<item name="android:colorAccent">@color/light_youtube_accent_color</item>
<item name="android:windowBackground">@color/light_background_color</item>
<item name="thumbs_up">@drawable/ic_thumb_up_black_24dp</item>
<item name="thumbs_down">@drawable/ic_thumb_down_black_24dp</item>
<item name="audio">@drawable/ic_headset_black_24dp</item>
<item name="download">@drawable/ic_file_download_black_24dp</item>
</style>
<!-- Dark Theme-->
<style name="DarkTheme" parent="Theme.AppCompat">
<item name="android:actionBarStyle">@style/NewPipeActionbarTheme</item>
<item name="actionBarStyle">@style/NewPipeActionbarTheme</item>
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
<item name="colorAccent">@color/dark_youtube_accent_color</item>
<item name="android:windowBackground">@color/dark_background_color</item>
<item name="thumbs_up">@drawable/ic_thumb_up_white_24dp</item>
<item name="thumbs_down">@drawable/ic_thumb_down_white_24dp</item>
<item name="audio">@drawable/ic_headset_white_24dp</item>
<item name="download">@drawable/ic_file_download_white_24dp</item>
</style>
<!-- Dark Theme-->

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="thumbs_up" format="reference"/>
<attr name="thumbs_down" format="reference"/>
<attr name="audio" format="reference"/>
<attr name="download" format="reference"/>
<attr name="share" format="reference"/>
<attr name="cast" format="reference"/>
</resources>

View File

@ -25,14 +25,16 @@
<string name="show_play_with_kodi_key">show_play_with_kodi</string>
<string name="theme_key">theme</string>
<string name="default_theme_value">0</string>
<string name="default_theme_value">@string/light_theme_title</string>
<string-array name="theme_description_list">
<item>@string/dark_theme_title</item>
<item>@string/light_theme_title</item>
<item>@string/dark_theme_title</item>
<item>@string/black_theme_title</item>
</string-array>
<string-array name="theme_list">
<item>0</item>
<item>1</item>
<item>@string/light_theme_title</item>
<item>@string/dark_theme_title</item>
<item>@string/black_theme_title</item>
</string-array>
<string name="default_audio_format_key">default_audio_format</string>

View File

@ -46,8 +46,9 @@
<string name="webm_description">WebM — free format</string>
<string name="m4a_description">m4a — better quality</string>
<string name="theme_title">Theme</string>
<string name="dark_theme_title">Dark</string>
<string name="light_theme_title">Light</string>
<string name="dark_theme_title">Dark</string>
<string name="black_theme_title">Black</string>
<string name="download_dialog_title">Download</string>
<string-array name="download_options">

View File

@ -1,6 +1,6 @@
<resources>
<style name="RootTheme" parent="android:Theme.Holo"></style>
<style name="RootTheme" parent="android:Theme.Holo"/>
<style name="PlayerTheme" parent="@style/RootTheme">
<item name="android:windowNoTitle">true</item>
@ -13,6 +13,7 @@
<item name="android:minWidth">40dp</item>
</style>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="android:actionBarStyle">@style/NewPipeActionbarTheme</item>
@ -21,6 +22,33 @@
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
<item name="colorAccent">@color/light_youtube_accent_color</item>
<item name="android:windowBackground">@color/light_background_color</item>
<item name="thumbs_up">@drawable/ic_thumb_up_black_24dp</item>
<item name="thumbs_down">@drawable/ic_thumb_down_black_24dp</item>
<item name="audio">@drawable/ic_headset_black_24dp</item>
<item name="download">@drawable/ic_file_download_black_24dp</item>
<item name="share">@drawable/ic_share_black</item>
<item name="cast">@drawable/ic_cast_black_24dp</item>
</style>
<!-- Dark Theme-->
<style name="DarkTheme" parent="Theme.AppCompat">
<item name="android:actionBarStyle">@style/NewPipeActionbarTheme</item>
<item name="actionBarStyle">@style/NewPipeActionbarTheme</item>
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
<item name="colorPrimaryDark">@color/light_youtube_dark_color</item>
<item name="colorAccent">@color/dark_youtube_accent_color</item>
<item name="android:windowBackground">@color/dark_background_color</item>
<item name="thumbs_up">@drawable/ic_thumb_up_white_24dp</item>
<item name="thumbs_down">@drawable/ic_thumb_down_white_24dp</item>
<item name="audio">@drawable/ic_headset_white_24dp</item>
<item name="download">@drawable/ic_file_download_white_24dp</item>
<item name="share">@drawable/ic_share_white_24dp</item>
<item name="cast">@drawable/ic_cast_white_24dp</item>
</style>
<style name="BlackTheme" parent="DarkTheme">
<item name="android:windowBackground">@color/light_youtube_accent_color</item>
</style>
<!-- Dark Theme-->

View File

@ -43,7 +43,7 @@
android:key="@string/settings_category_appearance"
android:title="@string/settings_category_appearance_title"
android:textAllCaps="true">
.
<ListPreference
android:key="@string/theme_key"
android:title="@string/theme_title"