Android :: AlertDialog Or PopupWindow ?

May 20, 2010

http://img139.imageshack.us/img139/1203/devicei.png

I've seen this in a few apps, and i have expiremented with both PopupWindow, and AlertDialog and I was confused which this was.

Android :: AlertDialog or PopupWindow ?


Android :: AlertDialog.Builder Vs Class To Extend AlertDialog - Application Size

Mar 12, 2010

I am trying to figure out what is the best way to go about creating dialogs. I can either create my own Dialog class (which, to me, is more clean and organized), or I can use AlertDialog.Builder (which would be done inline, and funky looking)... What are the positivies and negatives of either implementation?

View 1 Replies View Related

Android :: PopupWindow Does Not Show / Way To Fix?

Jul 14, 2010

I intend to show this as a dropdown just below the button that drops this down.

View 2 Replies View Related

Android :: Use GridView In PopupWindow?

Nov 10, 2009

I am having a similar issue while trying to use a GridView in a PopupWindow. On my Activity's onCreate method, I am inflating a gridview from xml as follows:

CODE:......................

I would like this GridView to popup on a button click. Also inside of my activity's onCreate,

I have:

CODE:............

On button click, I am throwing a ClassCastException from GridView.onMeasure(int, int).

View 4 Replies View Related

Android :: PopupWindow Class Using V2.0?

Dec 28, 2009

I looked online and was not able to find a working example of the PopupWindow class. The code examples I found online either compile but do not work, or are using methods which have since been removed (such as Activity.getViewInflate()). Is there a simple working example that displays a PopupWindow?

View 3 Replies View Related

Android :: PopupWindow On Activity Start

Feb 21, 2010

I am trying to make a PopupWindow show straight away when an activity has started.

when calling public void showAtLocation (View parent, int gravity, int x, int y)

I get the exception ERROR/AndroidRuntime(2500): Caused by: android.view.WindowManager $BadTokenException: Unable to add window -- token null is not valid; is your activity running?

At the moment I am calling from onCreate, but when calling from onStart or onResume it still gives the same error.

The activity api says the activity is supposed to be running after onResume is called. Where is the best place to load up the PopupWindow if it needs to be done straight away?

At the moment It looks like Activity.onWindowFocusChanged() is the best place.

View 2 Replies View Related

Android :: PopupWindow To System Desk Or Other App?

Sep 17, 2010

How can i put my PopupWindow to system desk or other app? how can i use this permission:INTERNAL_SYSTEM_WINDOW

View 2 Replies View Related

Android : PopupWindow - Want To Control Size?

May 27, 2010

I've experimented with a PopupWindow, but don't have a very good way of controlling its size. It only responds to absolute pixels.

View 3 Replies View Related

Android : How Can I Add An Edit Text On A PopupWindow?

Nov 9, 2010

I put an editText on a PopupWindow and it's not working. It acts like a disabled edit text, clicking on the edit text won't show the soft keyboard. How can I add an edit text on a popupWindow?

View 2 Replies View Related

Android :: PopupWindow With Some Enter/exit Animations

Mar 1, 2009

i tried to use my popupWindow with some enter/exit animations - it has setAnimationStyle() method for that purpose. after some time i realized i cannot use my own custom animation styles which is ok but a bit limiting. so i tried system ones: R.style.Animation_Toast works ok, but R.style.Animation_Dialog doesn't. looking at xml definition files i found that Toast animation uses simple alpha animation and Dialog animation is a set of alpha combined wit scale animation. is it a problem for WindowManager to deal with complex animations?

View 3 Replies View Related

Android :: Cannot Execute OnItemClick For GridView In PopupWindow

Jan 21, 2010

I have a gridView that I display in a popupwindow (the gridview is in a transparent layout, which inherits from linearlayout and just has a partially transparent background). I can never get this GridView's OnItemClick to execute. When I touch an image in my gridview it appears to be clicked (image bachgrond changes), but OnItemClick is not being called.

Below is the code for my Adapter and my popupview containing the gridView.

CODE:................

View 2 Replies View Related

Android :: Can't Intercept The OnTouch Event Of PopupWindow

May 26, 2009

I want to intercept the OnTouch event in a PopupWindow, but it failes everytime. Here is the code snip:

CODE:.....................

When the activity started, I can click the button to show the popup window correctly. But after that, nothing happens when I touch the popup window's view. But if I touch any where outside the popup window, the log Log.d("Demo", "layout::onTouch >>> view: " + v + ", event: " + event); will work.

It looks like when I touch the view of the popup window, the touch event has been consumed somewhere?

View 2 Replies View Related

Android :: PopupWindow Can't Be Dismissed When Press Back Key

Jun 4, 2010

I've created a custom PopupWindow but when I press back button, the window doesn't dissapear.

View 3 Replies View Related

Android :: PopUpWindow Not Displaying When Tapping On Marker

Jun 18, 2010

I am displaying google map and on top of that some overlay items(Markers) are there. When tapping on the markers, I need to display PopUpWindow. The code is executing but popup is not displaying.

popUp.showAtLocation(layout, Gravity.TOP, 0, 0); popUp.setFocusable(true); popUp.setTouchable(true); popUp.setOutsideTouchable(false); popUp.update(0,50, 320, 70);

Here layout is an object of LinearLayout.

I created another android application, in that, I put the above code and its working perfectly. PopupWindow is displaying.

View 2 Replies View Related

Android :: Show Soft Keyboard On PopupWindow?

Oct 12, 2010

I am using PopupWindow class and on PopupWindow i have one EditText,my problem is that when PopupWindow is visible and i click on EditText at that time Soft Keyboard is not visible and i am not able to enter Input. So anybody tell me how to solve this problem?

View 2 Replies View Related

Android : Droid PopupWindow Blur / Dim Background?

Jul 11, 2010

I would like to be able to either blur or dim the background when I show my popupwindow using popup.showAtLocation, and unblur/dim the background when popup.dismiss is called.

I have tried applying layout params FLAG_BLUR_BEHIND and FLAG_DIM_BEHIND to my activity, and this appears to just blur and dim the background as soon my app is started.

View 1 Replies View Related

Android :: PopupWindow With GridView - Trouble With Inflating View

Nov 11, 2009

I am having an issue while trying to use a GridView in a PopupWindow. On my Activity's onCreate method, I am inflating a gridview from xml as follows:

CODE:.........

Would like this GridView to popup on a button click. Also inside of my activity's onCreate,

I have:

CODE:...........

On button click, I am throwing a ClassCastException from GridView.onMeasure(int, int).

View 1 Replies View Related

Android :: AlertDialog In BroadcastReceiver

Aug 8, 2010

I'm trying to create an application that can use the android as a fax machine, IE Send a picture as a fax or receive a fax and save as a picture. So far I'm starting from the ground up and making sure I can intercept a call at the users discretion. I have an Receiver registered in the Manifest of my program with a filter of Phone_State which flags when the state has changed(IE incoming call).

So on my BroadcastReceiver I'm trying to have an AlertDialog popup prompting the user to either accept as fax or call but the AlertDialog seems to throw a android.view.WindowManager$BadTokenException Error when it has an incoming call. My code is just simple an onReceive(context arg0, intent arg1) and I pass the arg0 to the AlertDialog...

The full error message is below

CODE:.............

From what I have seen in the AlertDialog code, it passes the context as well as a Window and WindowManager, which I believe is why it's crashing, is there a better way or something else I should be using which might overlay the call screen?

View 2 Replies View Related

Android :: AlertDialog Within TabActivity

Oct 12, 2010

I have a TabActivity with 3 tabs. Each tab contains its own Activity. When one of the contained Activities pops up an AlertDialog, there are actually 3 dialogs created. The dialog has a Dismiss button and it must be pressed 3 times to finally dismiss the 3rd dialog.

View 2 Replies View Related

Android :: Set An OnclickListner For AlertDialog?

Oct 18, 2010

Can i set an onclickListner for AlertDialog?

View 2 Replies View Related

Android :: Android Custom PopupWindow - Dialog

May 5, 2010

I'm trying to get a completely custom Dialog or PopupWindow, without any of the default Android UI controls (title, background, buttons, whatever).

Is this possible at all? I've spent hours searching for this, but no luck... It seems like this should be easily possible, but I can't find it.

Preferably this would be by inflating a View from XML, but at this point anything that would just work would be nice.

View 4 Replies View Related

Android :: Accessing AlertDialog In AndroidTestCase

Feb 21, 2010

I'm using ActivityInstrumentationTestCase2 to do automated black-box testing on my GUI. Is there a way to click on a dialog, or get Views belonging to the Dialog in unit tests?The only way I could come up with is to keep a reference to the dialog and have my Activity implement a getter method to let testcases access the dialog. Is there a better way that doesn't require changing my production code?

View 1 Replies View Related

Android :: Change Orientation Of AlertDialog

Mar 25, 2009

I am building a AlertDialog in java code, so by default it is portrait but I want to show it in landscape orientation. How to do it in Java code?

View 2 Replies View Related

Android :: AlertDialog With Customized ListView

Sep 9, 2010

I am playing with the AlterDialog with a customized ListView in it.

After the ListView is added into the AlterDialog, there is a centered gradient separator line below the title of the alter dialog, it is just above the ListView.

Is there any way to get rid of it or change its color ? I do not want to show it.

View 2 Replies View Related

Android :: Clickable Hyperlinks In AlertDialog / How To Fix?

Jan 4, 2010

What I am trying to accomplish is to have clickable hyperlinks in the message text displayed by an AlertDialog. While the AlertDialog implementation happily underlines and colors any hyperlinks (defined using <a href="..."> in the string resource passed to Builder.setMessage) supplied the links do not become clickable. The code...

View 8 Replies View Related

Android :: Start AlertDialog From AppWidgetProvider

Aug 6, 2010

Anyone know if it is possible to add AlertDialog within a AppWidgetProvider class? Here is the code I am working on where I start the AlertDialog on onEnabled function call.

@Override public void onEnabled(Context context) { super.onEnabled(context); Log.v(TAG,"onEnabledWidget"); AlertDialog.Builder builder = new AlertDialog.Builder(context).setIcon( android.R.drawable.ic_dialog_info ).setTitle(R.string.app_name) .setMessage("This is testing") .setNeutralButton("Confirm", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); alertNotSmc = builder.create(); alertNotSmc.show(); //runs when all of the first instance of the widget are placed //on the home screen .........

View 5 Replies View Related

Android :: How To Get - Edit Button In An AlertDialog

Jun 4, 2009

I need to build a AlertDialog with a short text ("A") and an OK Button. But if I use AlertDialog.Builder, the "ok" text button is not shown with a short text message. I tried to recover the Button object and set the layout to wrap_content. But when I try to use getButton function, it returns me null.

What Do I need to recover the button correctly and set the width as wrap_content? Code...

View 3 Replies View Related

Android :: Want To Set Up A Context Menu In An AlertDialog?

Nov 13, 2010

I've been working at this all day, and I'm really close but just can't get this to work. I have a button that pulls up an AlertDialog populated with saved entries that include Name and Price. Right now, I can click an item in the Dialog and have it automatically fill in the Name and Price fields in my activity. I want to also be able to long press an item and receive an option to delete it. This is my first try at an Android app, and a lot of this is repurposed from the Notepad Tutorial. Two things I can't figure out:

1) Is my registerForContextMenu sufficient/correct?
2) What am I doing wrong with my onCreateContextMenu? Code...

View 1 Replies View Related

Android :: Align Message In AlertDialog?

Oct 19, 2010

I have to align text by middle in android alertdialog.
but i cannot find way...
anyone knows how to this?

View 1 Replies View Related

Android :: AlertDialog Crashes Application / Why Is So?

Jun 17, 2010

Can someone explain to me why this AlertDialog crashes? code...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved