Im using a fragment that is supposed to display a webview. When I try to instantiate it from the class that uses it I get the following warning in my logcat.
02-
if you want to go back from activity to Fragment try this
proToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//Note: you must give an id to the Main layout of your activity e.g : searchVehicles
((ConstraintLayout) findViewById(R.id.searchVehicles)).removeAllViews();
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragment_nearby_vehicles fnv = new fragment_nearby_vehicles();
fragmentTransaction.add(R.id.searchVehicles, fnv).commit();
}
});