There is two methors to add buttons to AlertDialog
1. using AlertDialog.Builder and calling builder.setPositiveButton or
setNegativeButton
2. using AlertDialog dialog; dialog.setButton dialog.setButton2.
What the difference
By the way, if I inherit my class from Dialog should I override all
Hello to everybody.
Here is my problem:
In my android application I need to use custom menu. In xml I make
menu layout (RelativLayout)
and inflate it on application start, then add it to parent layout,
which was set by setContentView().
So I have something like this:
private void initMenu()
In my main.xml layout_gravity works normally with LinearLayout and
when you use setContentView(R.layout.main);
But if I inflate this xml file and then add it on screen using
addContentView or addView layout_gravity stops work - content of
main.xml draw in top position of screen.
Here is the code:
3 matches
Mail list logo