Is it possible to extend an existing activity changing only its layout (eg. colors)?
Because i'm using a shared library and i shouldn't modify the activity since others are using it.
You would have to put that new Activity in the manifest and then make sure the intent resolution goes to your child class. Your not just going to be able to extend the activity and have it called without fixing this (at least I don't think so).
You can also just set the background color in java or xml.
Yes.It is possible , Just use the word extends.
If u have 2 activity
Activity1 and 2nd Activity2.
U can use Activity2 extends Activity1
Then u can use the property of Activity1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With