-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
In CategoryImagesListFragment, the code tries to cast the Context to 4 different activities and calls viewPagerNotifyDataSetChanged on each of them. This pattern is present in a few more classes. Does this have any advantages as opposed to implementing an interface?
try {
((CategoryImagesActivity) getContext()).viewPagerNotifyDataSetChanged();
}catch (Exception e){
e.printStackTrace();
}
try {
((CategoryDetailsActivity) getContext()).viewPagerNotifyDataSetChanged();
}catch (Exception e){
e.printStackTrace();
}
try {
((ExploreActivity) getContext()).viewPagerNotifyDataSetChanged();
}catch (Exception e){
e.printStackTrace();
}
maskaravivek