This repository contains a detailed sample app that implements MVVM architecture using Dagger2, Room, RxJava2, FastAndroidNetworking and PlaceholderView
Hi. There is one problem with associating layouts to e.g. fragment.
Let's say you have MainActivity and two layouts for it (activity_main_normal.xml, activity_main_small.xml). So if u want to choose which layout to inflate from
public int getLayoutId() { if(someCase){ return R.layout.activity_main_small; } else { return R.layout.activity_main_small; }
then you will get:
java.lang.ClassCastException: ActivityMainSmallBindingImpl cannot be cast to ActivityMainBinding
Hi. There is one problem with associating layouts to e.g. fragment. Let's say you have MainActivity and two layouts for it (activity_main_normal.xml, activity_main_small.xml). So if u want to choose which layout to inflate from
public int getLayoutId() { if(someCase){ return R.layout.activity_main_small; } else { return R.layout.activity_main_small; }
then you will get:java.lang.ClassCastException: ActivityMainSmallBindingImpl cannot be cast to ActivityMainBinding
So, how would you resolve that kind of problem?