How can create popupwindow?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How can create popupwindow?

Postby ans » Wed Dec 19, 2007 6:41 am

can anybody say something about popupwindow???how can create it? how can create LSK and RSK option menu?
User avatar
ans
Freshman
Freshman
 
Posts: 4
Joined: Thu Nov 22, 2007 11:11 am
Location: India

Top

Postby plusminus » Wed Dec 19, 2007 6:33 pm

Hello ans,

what do you mean with LSK and RSK ( explain pls ) :?:

What do you want to display within the PopUp ?:?:
Just a short message disappearing later (like the notification) :?:
You can display whole Activities in a Dialog-Window :arrow: :src: See the last picture there.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby kiran » Fri Dec 21, 2007 5:28 am

Is there any way to create pop up menus. I don't think LSK(Left Soft Key ) and RSK(Right Soft Key) are present in android emulator. The pop up menu can be displayed by using the menu button in emulator. How do we customize this menu?

Thanks in advance.
User avatar
kiran
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Thu Nov 22, 2007 11:36 am
Location: India

Postby ans » Fri Dec 21, 2007 7:40 am

hai plusminus

Thx for your reply

I want to create a popup window in contact-list application for add, remove contacts with in the current list as in the emulators bulit-in contact menu.

Regards
Ans
User avatar
ans
Freshman
Freshman
 
Posts: 4
Joined: Thu Nov 22, 2007 11:11 am
Location: India

Postby plusminus » Fri Dec 21, 2007 4:36 pm

Hello kiran,

The FriendFinder (:src: link here) creates a custom Menu.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby Zeba Momin » Thu Dec 03, 2009 11:58 am

Hii...
I'm trying to show a popup window.. using the following code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. private void showPopUp() {
  2.  
  3.                
  4.  
  5.                PopupWindow Popup = new PopupWindow(this.getViewInflate()
  6.  
  7.                             .inflate(R.layout.main1,null,null),0,0);
  8.  
  9.                 Popup.setOutsideTouchable(false);
  10.  
  11.                 Popup.setTouchInterceptor(new OnTouchListener() {
  12.  
  13.  
  14.  
  15.                         public boolean onTouch(View v, MotionEvent event) {
  16.  
  17.                                 // TODO Auto-generated method stub
  18.  
  19.                                 return false;
  20.  
  21.                         }
  22.  
  23.  
  24.  
  25.                 });
  26.  
  27.                 Popup.showAtLocation(this.findViewById(R.id.btnShare), Gravity.BOTTOM,
  28.  
  29.                                 20, 20);
  30.  
  31.         }
  32.  
  33.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


I'm using android sdk 1.5.
The getViewInflate() function seems to be deprecated in 1.5 sdk.
how do I go about it?
Plzzz help.. Thank you...
Zeba Momin
Developer
Developer
 
Posts: 49
Joined: Thu Sep 17, 2009 6:53 am

Top

Postby Zeba Momin » Fri Dec 04, 2009 1:29 pm

Hii..
I tried using the following...
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  private void showpopup() {
  2.  
  3.           LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  4.  
  5.           View v = vi.inflate(R.layout.pop, null);
  6.  
  7.           PopupWindow Popup = new PopupWindow(v,0,0);
  8.  
  9.                     Popup.setOutsideTouchable(false);
  10.  
  11.           Popup.showAtLocation(this.findViewById(R.id.RelativeLayout01),Gravity.CENTER, 20, 20);  
  12.  
  13.      }
Parsed in 0.034 seconds, using GeSHi 1.0.8.4


But still I cant see any popup window!!! :(
Can sumone plzzz help me wid dis??
Zeba Momin
Developer
Developer
 
Posts: 49
Joined: Thu Sep 17, 2009 6:53 am

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests