1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-21 18:42:35 +01:00

fix actionbar icon theming

This commit is contained in:
Christian Schabesberger 2017-02-12 16:45:01 +01:00
parent 7186f58374
commit f29bd0a6e7
28 changed files with 118 additions and 125 deletions

View File

@ -1,6 +1,5 @@
package org.schabi.newpipe; package org.schabi.newpipe;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
@ -16,4 +15,14 @@ public class ThemableActivity extends AppCompatActivity {
setTheme(R.style.DarkTheme); setTheme(R.style.DarkTheme);
} }
} }
@Override
protected void onResume() {
super.onResume();
if (PreferenceManager.getDefaultSharedPreferences(this)
.getString("theme", getResources().getString(R.string.light_theme_title)).
equals(getResources().getString(R.string.dark_theme_title))) {
setTheme(R.style.DarkTheme);
}
}
} }

View File

@ -540,7 +540,8 @@ public class VideoItemDetailFragment extends Fragment {
for (final InfoItem item : info.related_streams) { for (final InfoItem item : info.related_streams) {
similarLayout.addView(infoItemBuilder.buildView(similarLayout, item)); similarLayout.addView(infoItemBuilder.buildView(similarLayout, item));
} }
infoItemBuilder.setOnItemSelectedListener(new InfoItemBuilder.OnItemSelectedListener() { infoItemBuilder.setOnStreamInfoItemSelectedListener(
new InfoItemBuilder.OnInfoItemSelectedListener() {
@Override @Override
public void selected(String url) { public void selected(String url) {
openStreamUrl(url); openStreamUrl(url);

View File

@ -297,6 +297,11 @@ public class ErrorActivity extends ThemableActivity {
} }
errorView.setText(formErrorText(errorList)); errorView.setText(formErrorText(errorList));
//print stack trace once again for debugging:
for(String e : errorList) {
Log.e(TAG, e);
}
} }
@Override @Override

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 888 B

View File

@ -14,7 +14,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layoutManager="LinearLayoutManager" app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/video_item" tools:listitem="@layout/stream_item"
android:scrollbars="vertical"/> android:scrollbars="vertical"/>
<ProgressBar android:id="@+id/progressBar" <ProgressBar android:id="@+id/progressBar"

View File

@ -69,7 +69,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/detail_stream_thumbnail_window_layout" android:layout_below="@id/detail_stream_thumbnail_window_layout"
android:background="?android:windowBackground" android:background="?android:windowBackground"
android:visibility="gone"> android:visibility="visible">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -226,6 +226,9 @@
android:background="#000" android:background="#000"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:layout_toRightOf="@+id/detail_uploader_thumbnail_view"
android:layout_toEndOf="@+id/detail_uploader_thumbnail_view"
android:layout_below="@id/detail_uploader_thumbnail_view"/> android:layout_below="@id/detail_uploader_thumbnail_view"/>
</RelativeLayout> </RelativeLayout>
<Button <Button

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:id="@+id/item_main_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp">
<RelativeLayout android:id="@+id/itemThumbnailViewContainer"
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="RtlHardcoded">
<ImageView android:id="@+id/itemThumbnailView"
android:contentDescription="@string/list_thumbnail_view_description"
android:layout_width="@dimen/video_item_search_thumbnail_image_width"
android:layout_height="@dimen/video_item_search_thumbnail_image_height"
android:scaleType="centerCrop"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:src="@drawable/dummy_thumbnail"/>
<TextView android:id="@+id/itemDurationView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/itemThumbnailView"
android:layout_alignRight="@id/itemThumbnailView"
android:layout_alignEnd="@id/itemThumbnailView"
android:layout_marginRight="@dimen/video_item_search_duration_margin"
android:layout_marginEnd="@dimen/video_item_search_duration_margin"
android:layout_marginBottom="@dimen/video_item_search_duration_margin"
android:paddingTop="@dimen/video_item_search_duration_vertical_padding"
android:paddingBottom="@dimen/video_item_search_duration_vertical_padding"
android:paddingRight="@dimen/video_item_search_duration_horizontal_padding"
android:paddingLeft="@dimen/video_item_search_duration_horizontal_padding"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="@dimen/video_item_search_duration_text_size"
android:background="@color/duration_background_color"
android:textColor="@color/duration_text_color"/>
</RelativeLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="@dimen/video_item_search_thumbnail_image_height"
android:layout_toRightOf="@id/itemThumbnailViewContainer"
tools:ignore="RtlHardcoded">
<TextView android:id="@+id/itemVideoTitleView"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="@dimen/video_item_search_title_text_size"/>
<TextView android:id="@+id/itemUploaderView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="@dimen/video_item_search_uploader_text_size"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/itemUploadDateView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="@dimen/video_item_search_upload_date_text_size"/>
<TextView android:id="@+id/itemViewCountView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="@dimen/video_item_search_upload_date_text_size"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<Button
android:id="@+id/item_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"/>
</FrameLayout>

View File

@ -5,5 +5,5 @@
<item android:id="@+id/menu_item_screen_rotation" <item android:id="@+id/menu_item_screen_rotation"
android:title="@string/screen_rotation" android:title="@string/screen_rotation"
app:showAsAction="always" app:showAsAction="always"
android:icon="@drawable/ic_screen_rotation_white"/> android:icon="@drawable/ic_screen_rotation_white_24dp"/>
</menu> </menu>

View File

@ -15,12 +15,12 @@
<item android:id="@+id/menu_item_share" <item android:id="@+id/menu_item_share"
android:title="@string/share" android:title="@string/share"
app:showAsAction="ifRoom" app:showAsAction="ifRoom"
android:icon="@drawable/ic_share_black"/> android:icon="?attr/share"/>
<item android:id="@+id/action_play_with_kodi" <item android:id="@+id/action_play_with_kodi"
android:title="@string/play_with_kodi_title" android:title="@string/play_with_kodi_title"
app:showAsAction="ifRoom" app:showAsAction="ifRoom"
android:icon="@drawable/ic_cast_black"/> android:icon="?attr/cast"/>
<item android:id="@+id/menu_item_openInBrowser" <item android:id="@+id/menu_item_openInBrowser"
app:showAsAction="never" app:showAsAction="never"

View File

@ -10,7 +10,7 @@
<item name="thumbs_down">@drawable/ic_thumb_down_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="audio">@drawable/ic_headset_black_24dp</item>
<item name="download">@drawable/ic_file_download_black_24dp</item> <item name="download">@drawable/ic_file_download_black_24dp</item>
<item name="share">@drawable/ic_share_black</item> <item name="share">@drawable/ic_share_black_24dp</item>
<item name="cast">@drawable/ic_cast_black_24dp</item> <item name="cast">@drawable/ic_cast_black_24dp</item>
<item name="rss">@drawable/ic_rss_feed_white_24dp</item> <item name="rss">@drawable/ic_rss_feed_white_24dp</item>
</style> </style>

View File

@ -26,7 +26,7 @@
<item name="thumbs_down">@drawable/ic_thumb_down_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="audio">@drawable/ic_headset_black_24dp</item>
<item name="download">@drawable/ic_file_download_black_24dp</item> <item name="download">@drawable/ic_file_download_black_24dp</item>
<item name="share">@drawable/ic_share_black</item> <item name="share">@drawable/ic_share_black_24dp</item>
<item name="cast">@drawable/ic_cast_black_24dp</item> <item name="cast">@drawable/ic_cast_black_24dp</item>
<item name="rss">@drawable/ic_rss_feed_white_24dp</item> <item name="rss">@drawable/ic_rss_feed_white_24dp</item>
</style> </style>

View File

@ -9,12 +9,12 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="426" width="454.39999"
height="240" height="256"
viewBox="0 0 426.00001 240" viewBox="0 0 426.00001 240"
id="svg2" id="svg2"
version="1.1" version="1.1"
inkscape:version="0.91 r13725" inkscape:version="0.92.0 r"
sodipodi:docname="dummi_thumbnail.svg"> sodipodi:docname="dummi_thumbnail.svg">
<defs <defs
id="defs4" /> id="defs4" />
@ -25,17 +25,17 @@
borderopacity="1.0" borderopacity="1.0"
inkscape:pageopacity="0.0" inkscape:pageopacity="0.0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:zoom="1.4" inkscape:zoom="4.5554687"
inkscape:cx="375.9785" inkscape:cx="305.73326"
inkscape:cy="69.804094" inkscape:cy="69.804094"
inkscape:document-units="px" inkscape:document-units="px"
inkscape:current-layer="layer1" inkscape:current-layer="layer1"
showgrid="false" showgrid="false"
units="px" units="px"
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="1016" inkscape:window-height="1012"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="27" inkscape:window-y="32"
inkscape:window-maximized="1" /> inkscape:window-maximized="1" />
<metadata <metadata
id="metadata7"> id="metadata7">
@ -45,7 +45,7 @@
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:type <dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title> <dc:title />
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="426"
height="240"
viewBox="0 0 426.00001 240"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="dummi_thumbnail.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="375.9785"
inkscape:cy="69.804094"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-812.36212)">
<rect
style="opacity:0.997;fill:#999999;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4136"
width="426"
height="240"
x="0"
y="812.36212" />
<path
sodipodi:type="star"
style="opacity:0.997;fill:#6c6c6c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4164"
sodipodi:sides="3"
sodipodi:cx="41.58271"
sodipodi:cy="981.854"
sodipodi:r1="80.555222"
sodipodi:r2="40.877174"
sodipodi:arg1="-0.018810925"
sodipodi:arg2="0.93534698"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 122.12368,980.33878 65.844916,1014.7522 2.6244521,1052.3621 0.9609674,986.41661 -1.2793975e-6,912.86109 57.942247,944.39324 Z"
inkscape:transform-center-x="-18.464193"
transform="matrix(0.86438861,0.01393934,-0.01393934,0.86438861,190.62856,83.099197)"
inkscape:transform-center-y="-0.54163706" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB