Answer the question
In order to leave comments, you need to log in
How to rewrite this code in Kotlin?
Now I'm going through the book Android Programming The Big Nerd Ranch Guide (Android: Programming for Professionals 3rd edition). In the book, the code is given in Java, but I teach Kotlin and rewrite the examples in it. There was a problem with the Fragments theme.
(Code from the book)
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
View v = inflater.inflate(R.layout.fragment_crime, container, false);
return v; }
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View{
val v: View = inflater.inflate(R.layout.fragment_crime, container, false)
return v
}
Answer the question
In order to leave comments, you need to log in
R.layout.fragment_crime
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question