0
I need the menu to stay ALIGN_BOTTOM compared 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));
}
had already tried it, but it didn’t work.
– Igor Ronner
@Igorronner, take a look at
Hierarchy Viewer
, in theDDMS
or direct from the sdk, if theAppBar
is large enough for him to align themenu
into the background.– Wakim