I am using an AbsoluteLayout for a Activity and have it defined in a xml file.
I added this line of code because I am trying to add a list of buttons dynamically and I get the following warning.
private AbsoluteLayout layout = (AbsoluteLayout) findViewById(R.id.viewsaved);
The type AbsoluteLayout is deprecated
The code still appears to work properly, but I was just curious to see if anyone knows why this warning appears?
Thanks for any help!
In computer software or authoring programs standards and documentation, the term deprecation is applied to software features that are superseded and should be avoided. Although deprecated features remain in the current version, their use may raise warning messages recommending alternative practices, and deprecation may indicate that the feature will be removed in the future. Features are deprecated—rather than being removed—in order to provide backward compatibility and give programmers who have used the feature time to bring their code into compliance with the new standard.
From Wikipedia - Deprecation
In short, the function will work for now but will likely be removed in future versions. You'll want to find something to replace it with.
AbsoluteLayout suggests you use FrameLayout
, RelativeLayout
or a custom layout instead.
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