Alexey, I have an idea. I have not tried it myself, and I don't have the time right now, but figured I'd offer a suggestion:
Perhaps change your setContentView() to a full-screen layout (possibly blurring, dimming, and making the background transparent) Instead of setting the theme to "@android:style/Theme.Dialog", try creating a dialog in your onCreate() and adding the menu as normal. In theory, the menu should be at the bottom of the page, as the dialog is not technically your "main content view". Hope that works. I will report back here when I get a chance to try it myself. Paul Burke i...@ipaulpro.com pub:"iPaul Pro" On Jul 1, 12:51 pm, Alexey Volovoy <avolo...@gmail.com> wrote: > thanks for reply Dianne. > > On Jul 1, 11:20 am, Dianne Hackborn <hack...@android.com> wrote: > > > The current platform doesn't support menus on non-fullscreen windows, sorry. > > > On Wed, Jul 1, 2009 at 8:31 AM, Alexey Volovoy <avolo...@gmail.com> wrote: > > > > bump ? > > > > On Jun 22, 8:59 am, Alexey Volovoy <avolo...@gmail.com> wrote: > > > > Hi All , i have dialog style activity > > > > android:theme="@android:style/Theme.Dialog" > > > > > When i attachedcontextmenuto it > > > > @Override > > > > public void onCreate(Bundle savedInstanceState) { > > > > super.onCreate(savedInstanceState); > > > > setContentView(R.layout.main); > > > > } > > > > > @Override > > > > public boolean onCreateOptionsMenu(Menumenu) { > > > > super.onCreateOptionsMenu(menu); > > > > > MenuItem item = null; > > > > item =menu.add(0,Menu.FIRST,Menu.NONE, > > > > "TestContextMenuin > > > > Dialog Theme"); > > > > item.setIcon(android.R.drawable.ic_menu_edit); > > > > > return true; > > > > } > > > > > Themenuappears about 50 px from the bottom of this dialog. So if > > > > activity screen is too small - it right in the middle of the screen. > > > > Is there any way to anchor menuto the bottom of the screen ? > > > > layout : > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <RelativeLayout > > > > xmlns:android="http://schemas.android.com/apk/res/android" > > > > android:layout_width="fill_parent" > > > > android:layout_height="fill_parent" > > > > > <ImageView > > > > android:id="@+id/icon" > > > > android:layout_width="wrap_content" > > > > android:layout_height="wrap_content" > > > > android:layout_marginLeft="10sp" > > > > android:src="@drawable/icon" /> > > > > <TextView > > > > android:id="@+id/title" > > > > android:layout_toRightOf="@id/icon" > > > > android:layout_width="fill_parent" > > > > android:layout_height="wrap_content" > > > > android:layout_alignTop="@id/icon" > > > > android:layout_alignBottom="@id/icon" > > > > android:gravity="left|center" > > > > android:text="Title" /> > > > > <ImageView > > > > android:id="@+id/divider" > > > > android:layout_width="fill_parent" > > > > android:layout_height="wrap_content" > > > > android:layout_below="@id/icon" > > > > android:layout_gravity="left" > > > > android:src="@drawable/dialog_divider_horizontal_light" > > > /> > > > > <TextView > > > > android:id="@+id/note" > > > > android:layout_width="fill_parent" > > > > android:layout_height="wrap_content" > > > > android:layout_below="@id/divider" > > > > android:layout_marginLeft="10sp" > > > > android:layout_marginBottom="10sp" > > > > android:layout_marginTop="10sp" > > > > android:text="Some Text" /> > > > > > </RelativeLayout> > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see and > > answer them. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---