please is possible to make some activity with images, text etc. via some .java file (Java programming) without xml? – xml use only for strings of text, for multilanguage….
Thanks for help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yeah it is possible and we call it Dynamic Layouts. But i think you should stick to XML because it is easier to use as compared to programmed layouts. I know XML layout could be an headache sometime but once you’ll be habitual to these XML layouts stuff then you won’t find it hard any more. And if there is any other reason behind why you asked this question then yes it is possible as Android SDK provides classes for each and every layout element with the same name as used in XML file.
For ex. you can create a TextView like this in an activity:-
now you can call any function on it which would work similar to TextView’s properties used in XML file for ex. for
android:textproperty you can use :-And if you want to know more about these Dynamic layouts then you should spend some time on developer.android.com.
I hope my answer will be useful for you.