I need to extend ActionBarImpl, which is part of com.android.internal.app
. But it is not recomended to do so, since it is bound to change anytime in new android releases.
Since I do not intend to re-implement ActionBarImpl
I thought I will "cheat" by creating a class in this way:
public class MyActionBar extends ActionBar {
private ActionBar ab;
public MyActionBar(Activity activity) {
ab = activity.getActionBar();
}
@Override
public void setCustomView(View view) {
ab.setCustomView(view);
}
... (so on with all ActionBar abstract methods)
In words: I extend ActionBar
+ have a private member where I get the actual activity´s ActionBar
and delegate all method calls to it.
Is there any drawback in doing it this way? I am not breaking compatibility,am I?