I need the menu to stay ALIGN_BOTTOM in relation to my AppBar, but the code below does not work.
public class AppBar extends RelativeLayout {
public AppBar(Context context) {
RelativeLayout menu = new RelativeLayout(context);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
layoutParams.addRule(RelativeLayout.ALIGN_BOTTOM, this.getId());
menu.setLayoutParams(layoutParams);
this.addView(menu);
this.setBackgroundResource(PKImageLoader.getResourceId(context,
backgroundName));
}