You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi thank you for your library I am using it in my android news app it is possible to increase items to 5 when I have added fifth item. It is giving this exception java.lang.RuntimeException: Unable to start activity ComponentInfo{yodgobekkomilov.edgar.com.worldnews/yodgobekkomilov.edgar.com.worldnews.MainActivity}: java.lang.RuntimeException: List of NavigationPage must contain 4 members.
below my code from MainActivity
public class MainActivity extends BottomBarHolderActivity implements AllJazeeraFragment.OnFragmentInteractionListener, BBCFragment.OnFragmentInteractionListener, CNNFragment.OnFragmentInteractionListener, CBCNewsFragment.OnFragmentInteractionListener {
// private ApiService apiService;
public static final String url_key = "urlKey";
public ArrayList<Article> articleList = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
Article article = new Article(Parcel.obtain());
article.setUrl(article.getUrl());
Intent i = new Intent(this, DetailActivity.class);
i.putExtra("urlKey", article);
// // using the (String name, Parcelable value) overload!
// startActivity(i);
NavigationPage page1 = new NavigationPage("AllJazeera", ContextCompat.getDrawable(this, R.drawable.alljazeera), AllJazeeraFragment.newInstance());
NavigationPage page2 = new NavigationPage("BBC", ContextCompat.getDrawable(this, R.drawable.bbc_icon), CNNFragment.newInstance());
NavigationPage page3 = new NavigationPage("CNN", ContextCompat.getDrawable(this, R.drawable.cnn_icon), AllJazeeraFragment.newInstance());
NavigationPage page4 = new NavigationPage("CBC", ContextCompat.getDrawable(this, R.drawable.cbc_icon), CBCNewsFragment.newInstance());
NavigationPage page5 = new NavigationPage("Menu", ContextCompat.getDrawable(this, R.drawable.icon_menu), Menu.newInstance());
List<NavigationPage> navigationPages = new ArrayList<>();
navigationPages.add(page1);
navigationPages.add(page2);
navigationPages.add(page3);
navigationPages.add(page4);
navigationPages.add(page5);
super.setupBottomBarHolderActivity(navigationPages);
}
public void onClicked() {
Toast.makeText(this, "Clicked!", Toast.LENGTH_SHORT).show();
}
}
and help and suggestion will be appreacited
The text was updated successfully, but these errors were encountered:
kyodgorbek
changed the title
It is possible one more items
It is possible add five items
Oct 6, 2018
kyodgorbek
changed the title
It is possible add five items
It is possible add five items to BottomBarHolderActivity
Oct 6, 2018
Hi thank you for your library I am using it in my android news app it is possible to increase items to 5 when I have added fifth item. It is giving this exception java.lang.RuntimeException: Unable to start activity ComponentInfo{yodgobekkomilov.edgar.com.worldnews/yodgobekkomilov.edgar.com.worldnews.MainActivity}: java.lang.RuntimeException: List of NavigationPage must contain 4 members.
below my code from MainActivity
public class MainActivity extends BottomBarHolderActivity implements AllJazeeraFragment.OnFragmentInteractionListener, BBCFragment.OnFragmentInteractionListener, CNNFragment.OnFragmentInteractionListener, CBCNewsFragment.OnFragmentInteractionListener {
// // using the (String name, Parcelable value) overload!
// startActivity(i);
}
and help and suggestion will be appreacited
The text was updated successfully, but these errors were encountered: