Change feed groups header title and icon from feed representing "All"
This commit is contained in:
parent
f05b8c9542
commit
2948e4190b
65 changed files with 84 additions and 85 deletions
|
|
@ -159,7 +159,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
.add(R.id.menu_tabs_group, ITEM_ID_SUBSCRIPTIONS, ORDER, R.string.tab_subscriptions)
|
||||
.setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_channel));
|
||||
drawerItems.getMenu()
|
||||
.add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_whats_new)
|
||||
.add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_feed_title)
|
||||
.setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.rss));
|
||||
drawerItems.getMenu()
|
||||
.add(R.id.menu_tabs_group, ITEM_ID_BOOKMARKS, ORDER, R.string.tab_bookmarks)
|
||||
|
|
@ -389,7 +389,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
.add(R.id.menu_tabs_group, ITEM_ID_SUBSCRIPTIONS, ORDER, R.string.tab_subscriptions)
|
||||
.setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.ic_channel));
|
||||
drawerItems.getMenu()
|
||||
.add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_whats_new)
|
||||
.add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_feed_title)
|
||||
.setIcon(ThemeHelper.resolveResourceIdFromAttr(this, R.attr.rss));
|
||||
drawerItems.getMenu()
|
||||
.add(R.id.menu_tabs_group, ITEM_ID_BOOKMARKS, ORDER, R.string.tab_bookmarks)
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ import android.view.*
|
|||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import icepick.State
|
||||
import io.reactivex.Completable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import kotlinx.android.synthetic.main.error_retry.*
|
||||
import kotlinx.android.synthetic.main.fragment_feed.*
|
||||
import org.schabi.newpipe.R
|
||||
|
|
@ -105,7 +103,7 @@ class FeedFragment : BaseListFragment<FeedState, Unit>() {
|
|||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater)
|
||||
activity.supportActionBar?.setTitle(R.string.fragment_whats_new)
|
||||
activity.supportActionBar?.setTitle(R.string.fragment_feed_title)
|
||||
activity.supportActionBar?.subtitle = groupName
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ enum class FeedGroupIcon(
|
|||
PETS(33, R.attr.ic_pets),
|
||||
WORLD(34, R.attr.ic_world),
|
||||
STAR(35, R.attr.ic_stars),
|
||||
SUN(36, R.attr.ic_sunny);
|
||||
SUN(36, R.attr.ic_sunny),
|
||||
RSS(37, R.attr.rss);
|
||||
|
||||
@DrawableRes
|
||||
fun getDrawableRes(context: Context): Int {
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
|
|||
Section().apply {
|
||||
val carouselAdapter = GroupAdapter<GroupieViewHolder>()
|
||||
|
||||
carouselAdapter.add(FeedGroupCardItem(-1, getString(R.string.all), FeedGroupIcon.ALL))
|
||||
carouselAdapter.add(FeedGroupCardItem(-1, getString(R.string.all), FeedGroupIcon.RSS))
|
||||
carouselAdapter.add(feedGroupsSection)
|
||||
carouselAdapter.add(FeedGroupAddItem())
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
|
|||
}
|
||||
|
||||
feedGroupsCarousel = FeedGroupCarouselItem(requireContext(), carouselAdapter)
|
||||
add(Section(HeaderItem(getString(R.string.fragment_whats_new)), listOf(feedGroupsCarousel)))
|
||||
add(Section(HeaderItem(getString(R.string.feed_groups_header_title)), listOf(feedGroupsCarousel)))
|
||||
|
||||
groupAdapter.add(this)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ public abstract class Tab {
|
|||
|
||||
@Override
|
||||
public String getTabName(Context context) {
|
||||
return context.getString(R.string.fragment_whats_new);
|
||||
return context.getString(R.string.fragment_feed_title);
|
||||
}
|
||||
|
||||
@DrawableRes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue