1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-15 13:21:22 +01:00

Rename ic_hot in ic_kiosk_hot and improve getKioskIcon()

This commit is contained in:
Stypox 2020-03-31 09:36:35 +02:00
parent 3dcd2468a2
commit c27a26c0aa
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
11 changed files with 16 additions and 16 deletions

View File

@ -165,8 +165,7 @@ public class MainActivity extends AppCompatActivity {
drawerItems.getMenu()
.add(R.id.menu_tabs_group, kioskId, 0, KioskTranslator
.getTranslatedKioskName(ks, this))
.setIcon(KioskTranslator.getKioskIcons(ks, this));
kioskId++;
.setIcon(KioskTranslator.getKioskIcon(ks, this));
}
drawerItems.getMenu()
@ -420,7 +419,7 @@ public class MainActivity extends AppCompatActivity {
drawerItems.getMenu()
.add(R.id.menu_tabs_group, kioskId, ORDER,
KioskTranslator.getTranslatedKioskName(ks, this))
.setIcon(KioskTranslator.getKioskIcons(ks, this));
.setIcon(KioskTranslator.getKioskIcon(ks, this));
kioskId++;
}

View File

@ -47,7 +47,7 @@ enum class FeedGroupIcon(
SHOPPING_CART(27, R.attr.ic_shopping_cart),
WATCH_LATER(28, R.attr.ic_watch_later),
WORK(29, R.attr.ic_work),
HOT(30, R.attr.ic_hot),
HOT(30, R.attr.ic_kiosk_hot),
CHANNEL(31, R.attr.ic_channel),
BOOKMARK(32, R.attr.ic_bookmark),
PETS(33, R.attr.ic_pets),

View File

@ -60,7 +60,7 @@ public final class AddTabDialog {
private DialogListAdapter(final Context context, final ChooseTabListItem[] items) {
this.inflater = LayoutInflater.from(context);
this.items = items;
this.fallbackIcon = ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_hot);
this.fallbackIcon = ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_kiosk_hot);
}
@Override

View File

@ -233,7 +233,7 @@ public class ChooseTabsFragment extends Fragment {
case KIOSK:
returnList.add(new ChooseTabListItem(tab.getTabId(),
getString(R.string.kiosk_page_summary),
ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_hot)));
ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_kiosk_hot)));
break;
case CHANNEL:
returnList.add(new ChooseTabListItem(tab.getTabId(),
@ -244,7 +244,8 @@ public class ChooseTabsFragment extends Fragment {
if (!tabList.contains(tab)) {
returnList.add(new ChooseTabListItem(tab.getTabId(),
getString(R.string.default_kiosk_page_summary),
ThemeHelper.resolveResourceIdFromAttr(context, R.attr.ic_hot)));
ThemeHelper.resolveResourceIdFromAttr(context,
R.attr.ic_kiosk_hot)));
}
break;
default:

View File

@ -323,7 +323,7 @@ public abstract class Tab {
@DrawableRes
@Override
public int getTabIconRes(final Context context) {
final int kioskIcon = KioskTranslator.getKioskIcons(kioskId, context);
final int kioskIcon = KioskTranslator.getKioskIcon(kioskId, context);
if (kioskIcon <= 0) {
throw new IllegalStateException("Kiosk ID is not valid: \"" + kioskId + "\"");
@ -459,7 +459,7 @@ public abstract class Tab {
@DrawableRes
@Override
public int getTabIconRes(final Context context) {
return KioskTranslator.getKioskIcons(getDefaultKioskId(context), context);
return KioskTranslator.getKioskIcon(getDefaultKioskId(context), context);
}
@Override

View File

@ -55,7 +55,7 @@ public final class KioskTranslator {
case "Top 50":
case "New & hot":
case "conferences":
return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_hot);
return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_kiosk_hot);
case "Local":
return ThemeHelper.resolveResourceIdFromAttr(c, R.attr.ic_kiosk_local);
case "Recently added":

View File

@ -28,7 +28,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
tools:ignore="ContentDescription,RtlHardcoded"
tools:src="?attr/ic_hot" />
tools:src="?attr/ic_kiosk_hot" />
<TextView
android:id="@+id/group_name"

View File

@ -29,7 +29,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
tools:ignore="ContentDescription,RtlHardcoded"
tools:src="?attr/ic_hot"/>
tools:src="?attr/ic_kiosk_hot"/>
<TextView
android:id="@+id/tabName"

View File

@ -15,7 +15,7 @@
android:layout_centerVertical="true"
android:layout_marginLeft="?dialogPreferredPadding"
tools:ignore="ContentDescription,RtlHardcoded"
tools:src="?attr/ic_hot"/>
tools:src="?attr/ic_kiosk_hot"/>
<TextView
android:id="@+id/tabName"

View File

@ -28,7 +28,7 @@
<attr name="ic_pause" format="reference"/>
<attr name="ic_bug_report" format="reference"/>
<attr name="ic_settings" format="reference"/>
<attr name="ic_hot" format="reference"/>
<attr name="ic_kiosk_hot" format="reference"/>
<attr name="ic_kiosk_local" format="reference"/>
<attr name="ic_kiosk_recent" format="reference"/>
<attr name="ic_channel" format="reference"/>

View File

@ -43,7 +43,7 @@
<item name="ic_play_arrow">@drawable/ic_play_arrow_black_24dp</item>
<item name="ic_pause">@drawable/ic_pause_black_24dp</item>
<item name="ic_settings">@drawable/ic_settings_black_24dp</item>
<item name="ic_hot">@drawable/ic_whatshot_black_24dp</item>
<item name="ic_kiosk_hot">@drawable/ic_whatshot_black_24dp</item>
<item name="ic_kiosk_local">@drawable/ic_home_black_24dp</item>
<item name="ic_kiosk_recent">@drawable/ic_add_circle_outline_black_24dp</item>
<item name="ic_channel">@drawable/ic_tv_black_24dp</item>
@ -149,7 +149,7 @@
<item name="ic_options">@drawable/ic_more_vert_white_24dp</item>
<item name="ic_play_arrow">@drawable/ic_play_arrow_white_24dp</item>
<item name="ic_settings">@drawable/ic_settings_white_24dp</item>
<item name="ic_hot">@drawable/ic_whatshot_white_24dp</item>
<item name="ic_kiosk_hot">@drawable/ic_whatshot_white_24dp</item>
<item name="ic_kiosk_local">@drawable/ic_home_white_24dp</item>
<item name="ic_kiosk_recent">@drawable/ic_add_circle_outline_white_24dp</item>
<item name="ic_channel">@drawable/ic_tv_white_24dp</item>