Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The basic usage of FeedFragment

    Code Block
    languagejava
    // Add the below code to the XML
    <fragment
        android:id="@+id/feed_fragment"
        android:name="com.buzzvil.buzzad.benefit.presentation.feed.FeedFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    
    // FeedFragment can be initialized as shown below
    final FeedFragment feedFragment = (FeedFragment) getSupportFragmentManager().findFragmentById(R.id.feed_fragment);
    if (feedFragment != null) {
        feedFragment.init(YOUR_FEED_CONFIG);
    }


  • For FeedFragment, preload() can be used by creating a FeedHandler without calling startFeedActivity().

  • FeedFragment accommodates the customization of AdsAdapter, with the exception of toolbar, and header is available by using feedConfig.

Note

To refresh ads in the fragment, FeedHandler needs to be created before initializing the FeedFragment.