I have "home_fragment.java" class file in my project which i need to be launched when the app starts. but i am only able to add 'activities' as launch default,not fragments. please help me to add a 'fragment' as a launch activity. i am new to android ,thank you.
this is my home_fragment.java
public class home_fragment extends Fragment {
View myView;
Button more;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
View myview = inflater.inflate(R.layout.home_layout,container, false);
Button button = (Button) myview.findViewById(R.id.button5);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// do something
}
});
return myview;
}
}