Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-24 Thread TreKing
On Fri, Mar 23, 2012 at 11:54 PM, Vivek Khandelwal < vivek.b.khandel...@gmail.com> wrote: > User selects a Record and try to Edit in Edit Activity. But Edit Activity > had the Error. > So fix that error so it doesn't happen using the information you get from ACRA. Honestly, that will be the faste

Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-23 Thread Vivek Khandelwal
I already Integrated my Application with ARCA. For there is no problem in getting the Crash Report. My Application organisation is in this way. Home Activity with Dashboard. When any Item in dashBoard selected he will go to next Activity (Each Item in dashboard has different Activity) For examp

[android-developers] Re: Custom Dialog for Force Closed Android

2012-03-23 Thread mcterry
Can you show some examples of your Activities (we don't need the logic, just need to see the organization). Also, where have you implemented the uncaught exception class? Where were you trying to use the Looper at? Let me know how I can help! :) www.sep.com/mcterry On Thursday, March 22, 201

Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-23 Thread TreKing
On Fri, Mar 23, 2012 at 5:43 AM, Vivek Khandelwal < vivek.b.khandel...@gmail.com> wrote: > Most of the Crash will be tried to solve but then and there. > > ARCA helps me to show a Toast or a Dialog but that Kills my Application > after that. (But it can be used for Reporting) > > I dont want my Ap

Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-23 Thread Vivek Khandelwal
Most of the Crash will be tried to solve but then and there. ARCA helps me to show a Toast or a Dialog but that Kills my Application after that. (But it can be used for Reporting) I dont want my Application to be killed. Is it Possible that My all Activity being started my another Looper not the

Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-23 Thread Kostya Vasilyev
The main looper is special, just because you have _a_ looper in _a_ thread doesn't mean it will now handle all UI interaction. I'd suggest (the list is clearly out of sequence): 1. Fix the crashes so they don't happen anymore (at least not so much). 2. In your crash handler, forget about touchin

Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-23 Thread Vivek Khandelwal
Thank For you replies. @TreKing My Application is Database Oriented in which Each Activity handle the Data of its own. When an error occurs i want only my Current Activity which got the Error to close and To show a Message to User with some Error Code and Description which help us to find the

Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-22 Thread mcterry
You're absolutely correct TreKing. I forgot to include the key piece of information for the Toast message. You have to make use of the Looper class from Android. For example, here is the code from the "displayErrorMessageToast()" method I previously mentioned... private void displayError

Re: [android-developers] Re: Custom Dialog for Force Closed Android

2012-03-22 Thread TreKing
On Thu, Mar 22, 2012 at 8:59 PM, mcterry wrote: > When you override the uncaughtException() method, add in a Thread.sleep() > in order to keep your Activity from getting closed immediately. That would cause the main thread to block, preventing the error message from being displayed, and causing

[android-developers] Re: Custom Dialog for Force Closed Android

2012-03-22 Thread mcterry
Additionally, you might check out this open source library called ACRA... http://code.google.com/p/acra/ -Matt www.sep.com/mcterry On Thursday, March 22, 2012 9:59:25 PM UTC-4, mcterry wrote: > > Hello Vivek - it sounds like you're on the right path. When you override > the uncaughtException()

[android-developers] Re: Custom Dialog for Force Closed Android

2012-03-22 Thread mcterry
Hello Vivek - it sounds like you're on the right path. When you override the uncaughtException() method, add in a Thread.sleep() in order to keep your Activity from getting closed immediately. Below is an example of what your uncaughtException() method might look like... @Override public void

[android-developers] Re: Custom Dialog Not Showing

2011-10-22 Thread Alex Oh
I got it working. I don't know exactly what fixed it, but I think it's because I was declaring the Button variables within the class rather than within the function that creates/defines the dialog. For example: public class Foo { Button x, y; private Dialog addPCDialog { private Dialog addPCDi

Re: [android-developers] Re: Custom Dialog Not Showing

2011-10-22 Thread TreKing
On Sat, Oct 22, 2011 at 8:52 PM, Alex Oh wrote: > I wonder if it has anything to do with the way my xml file is being layed > out. I just tested this and it works. The xml file is just a simple > LinearLayout w/a text view. > Post it.

[android-developers] Re: Custom Dialog Not Showing

2011-10-22 Thread Alex Oh
I wonder if it has anything to do with the way my xml file is being layed out. I just tested this and it works. The xml file is just a simple LinearLayout w/a text view. public class TestActivity extends Activity { /** Called when the activity is first created. */ @Override public void

[android-developers] Re: Custom Dialog Not Showing

2011-10-22 Thread Alex Oh
Strange...even AlertDialog will not work. I built an AlertDialog using the builder inside onCreateDialog and still nothing. There are no messages that appear in logcat during and after its call. On Oct 22, 4:25 pm, TreKing wrote: > On Sat, Oct 22, 2011 at 4:57 PM, Alex Oh wrote: > > Yes. There a

Re: [android-developers] Re: Custom Dialog Not Showing

2011-10-22 Thread TreKing
On Sat, Oct 22, 2011 at 4:57 PM, Alex Oh wrote: > Yes. There are no crashes at all from after showDialog, switch > statements are being executed correctly, etc. dialog within > onCreateDialog is being assigned an id, not null. > And nothing at all in the LogCat? Barring that, try to simplify the

[android-developers] Re: Custom Dialog Not Showing

2011-10-22 Thread Alex Oh
Yes. There are no crashes at all from after showDialog, switch statements are being executed correctly, etc. dialog within onCreateDialog is being assigned an id, not null. On Oct 22, 12:33 pm, TreKing wrote: > On Sat, Oct 22, 2011 at 12:30 PM, Alex Oh wrote: > > Am I missing something here? > >

[android-developers] Re: Custom Dialog Not Showing

2011-10-22 Thread Alex Oh
No, I haven't. It seems that onPrepareDialog is used when you want the property of a dialog to be changed when opened again. If I do override it, is there anything that I need to do in onPrepareDialog that I haven't done in onCreateDialog? On Oct 22, 10:37 am, Christopher Van Kirk wrote: > Did yo

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-03 Thread Nick Longinow
Works perfectly. 9-patch with transparency set for Stretch and Content is exactly right. Ended up applying my 9-patch to the Dialog itself, instead of the View inside the inflated Dialog's contents. This code below works now. Thanks again. mDialog = new Dialog(mContext);

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-03 Thread Nick Longinow
Perfect. I found some good examples of subclassing AlertDialog, but this may be alot easier to do. I'll take my 9-patch and apply it to a Dialog. thanks On Apr 3, 6:28 pm, Dianne Hackborn wrote: > Oh wait, you are using AlertDialog?  Why?  AlertDialog is for making > standard-looking dialogs.  I

Re: [android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-03 Thread Dianne Hackborn
Oh wait, you are using AlertDialog? Why? AlertDialog is for making standard-looking dialogs. If you just want a dialog you can use Dialog and customize its content as desired. On Sun, Apr 3, 2011 at 3:04 PM, Nick Longinow wrote: > HierarchyViewer says that the border is being drawn by the Aler

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-03 Thread Nick Longinow
HierarchyViewer says that the border is being drawn by the AlertDialog code itself. ie, it's coming from an object called "FrameLayout, with ID = id/customPanel". So, to solve this is it necessary to extend AlertDialog? Or is that overkill? On Apr 3, 12:12 pm, Dianne Hackborn wrote: > Use hiera

Re: [android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-03 Thread Dianne Hackborn
Use hierarchyviewer to look at your view hierarchy and see what is drawing each element. On Sun, Apr 3, 2011 at 5:10 AM, Nick Longinow wrote: > Taking a step back here. I think if I solve the Dialog itself, the > Window background drawable may not be an issue. Saying that because > once I create

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-03 Thread Nick Longinow
Taking a step back here. I think if I solve the Dialog itself, the Window background drawable may not be an issue. Saying that because once I created the 9-patch with correct transparency and Content and Patch settings, it looks as it should. So, trying to get the dialog layout (view) right first

Re: [android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-02 Thread Dianne Hackborn
The window will be resized to wrap its content. Be sure in your 9-patch that you have correctly indicated the content area along the right and bottom edges. If that isn't the problem, you can use hierarchyviewer to see what is going on with the layout of the view hierarchy if your window. You do

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-02 Thread Nick Longinow
Getting much closer. But not quite. I've got my customized background (nine patch) built and assigned to the alert window. But, its huge while the dialog list items are normal size. I did alert.getWindow().setLayout(50, 50) to resize that window but it has no effect. Still have this huge backgro

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-04-02 Thread Nick Longinow
Successfully got a .9.png file created and applied it to my ListView - looks very nice. Problem - the AlertDialog I want to use it for seems to add a rectangle with white interior as a container or border around my ListView. I'd like it to be transparent, and only show the ListView. Do I have to

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-03-30 Thread Nick Longinow
Then that's what I'll do. Moving the triangle around randomly isn't very important. Thanks all. On Mar 29, 10:29 pm, Dianne Hackborn wrote: > No, use a 9-patch.  That said, if you want to actually position the triangle > at different places in the border you probably will need to give up on just

Re: [android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-03-29 Thread Dianne Hackborn
No, use a 9-patch. That said, if you want to actually position the triangle at different places in the border you probably will need to give up on just setting a custom background drawable and have to draw your own background with things positioned where you want. On Tue, Mar 29, 2011 at 6:06 PM,

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-03-29 Thread Nick Longinow
I'm looking for something more like a where the vertices are set to like a rectangle, but with one side that has a triangle shape coming out of it. I believe I create this as a drawable in the XML layout, and then set the Dialog to use this drawable as the background. True so far? On Mar 27, 11

[android-developers] Re: custom dialog frame - how to get a pointy triangle edge

2011-03-27 Thread Hari Edo
If you mean like the SMS app, you can do that with a .9.png image file, also called a "Nine Patch." http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch On Mar 27, 10:34 pm, Nick Longinow wrote: > Like a balloon-style dialog, with one side of the dialog having a > tria

[android-developers] Re: Custom Dialog without context application

2011-01-29 Thread Antony BODY
Oh ! Thank you Kostya It works well and it's realy easier !!! -- 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 andro

[android-developers] Re: Custom dialog issues

2010-12-15 Thread liuwenhan...@sina.com
u miss one things the most import codes : setContentView(R.layout.main); make sure done this,before u use the id of the view customdialog On 12月14日, 上午6时34分, Antony BODY wrote: > Hi, > > I try to implement an custom dialog sadly when i call "show" > method i get this stac: > > Thread [<3> m

[android-developers] Re: Custom dialog issues

2010-12-14 Thread Antony BODY
Ok perfect you are right it was just the getApplicationContext method who throw that exception !! Thank you for your help. On 14 déc, 16:29, TreKing wrote: > On Mon, Dec 13, 2010 at 4:34 PM, Antony BODY wrote: > > Context mContext = getApplicationContext(); > > Dialog dialog = new Dialog(mCo

[android-developers] Re: Custom Dialog help!!!

2010-03-30 Thread James
I sorted it out in the end. Thanks for your help :) On Mar 30, 7:48 pm, James wrote: > I don't have any "getApplicationContext()" in my code > > On Mar 30, 7:32 pm, "~ TreKing" wrote: > > > > > On Tue, Mar 30, 2010 at 1:28 PM, James wrote: > > > Yeah i did that before i started this thread. But

[android-developers] Re: Custom Dialog help!!!

2010-03-30 Thread James
I don't have any "getApplicationContext()" in my code On Mar 30, 7:32 pm, "~ TreKing" wrote: > On Tue, Mar 30, 2010 at 1:28 PM, James wrote: > > Yeah i did that before i started this thread. But then i saw other > > threads saying that the example given was wrong > > Yeah, replace any instances

Re: [android-developers] Re: Custom Dialog help!!!

2010-03-30 Thread ~ TreKing
On Tue, Mar 30, 2010 at 1:28 PM, James wrote: > Yeah i did that before i started this thread. But then i saw other > threads saying that the example given was wrong > Yeah, replace any instances of getApplicationContext() with "this" and you should be fine. -

[android-developers] Re: Custom Dialog help!!!

2010-03-30 Thread James
Yeah i did that before i started this thread. But then i saw other threads saying that the example given was wrong On Mar 30, 1:43 pm, "~ TreKing" wrote: > On Mon, Mar 29, 2010 at 6:05 PM, James wrote: > > Hmmmh, now how do i do that :) > > How about reading the documentation and / or samples ?

Re: [android-developers] Re: Custom Dialog help!!!

2010-03-30 Thread ~ TreKing
On Mon, Mar 29, 2010 at 6:05 PM, James wrote: > Hmmmh, now how do i do that :) How about reading the documentation and / or samples ? :) http://developer.android.com/intl/fr/guide/topics/ui/menus.html http://developer.android.c

[android-developers] Re: Custom Dialog help!!!

2010-03-29 Thread James
Hmmmh, now how do i do that :) On Mar 29, 11:29 pm, "~ TreKing" wrote: > On Mon, Mar 29, 2010 at 5:13 PM, James wrote: > > When I hit on the "info" on my menu nothing happens. > > Are you actually handling this case in onOptionsItemSelected() (that may not > be the right name, going off the top

Re: [android-developers] Re: Custom Dialog help!!!

2010-03-29 Thread ~ TreKing
On Mon, Mar 29, 2010 at 5:13 PM, James wrote: > When I hit on the "info" on my menu nothing happens. Are you actually handling this case in onOptionsItemSelected() (that may not be the right name, going off the top of my head) and are you actually calling showDialog() somewhere? That would help

[android-developers] Re: Custom Dialog help!!!

2010-03-29 Thread James
When I hit on the "info" on my menu nothing happens. On Mar 29, 9:56 pm, "~ TreKing" wrote: > On Sun, Mar 28, 2010 at 6:00 PM, James wrote: > > Hey i'm in need of some help. I want my menu item "info" to create a > > custom dialog. Yet i appear to to be having trouble > > What, exactly, is the "

[android-developers] Re: Custom Dialog

2010-03-17 Thread brucko
Sorry to single you out Mark, but you just write stuff that makes sense. -- 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

Re: [android-developers] Re: Custom Dialog

2010-03-17 Thread Mark Murphy
brucko wrote: > As someone with not a lot of experience in things Android, the Context > is one of the most confusing things to me and I would love to see a > blog article/ Mark Murphy chapter specifically on each of the various > levels of Context returned by the various methods and when they shou

[android-developers] Re: Custom Dialog

2010-03-17 Thread brucko
Bob, Thanks for this and other posts. If it weren't for yourself, Mark Murphy and TreKing I would be pulling my hair out - and its getting too precious to be doing that these days. As someone with not a lot of experience in things Android, the Context is one of the most confusing things to me and

[android-developers] Re: Custom Dialog

2010-03-17 Thread DonFrench
Same error in AlertDialog. Cost me two hours. I just starred it. On Mar 17, 1:36 pm, TreKing wrote: > On Wed, Mar 17, 2010 at 10:09 AM, Lance Nanek wrote: > > I tried the official issue route of getting someone to do something > > here: > >http://code.google.com/p/android/issues/detail?id=5748

Re: [android-developers] Re: Custom Dialog

2010-03-17 Thread TreKing
On Wed, Mar 17, 2010 at 10:09 AM, Lance Nanek wrote: > I tried the official issue route of getting someone to do something > here: > http://code.google.com/p/android/issues/detail?id=5748 > Thanks Lance. I starred it up ... now up to 3! It'll get fixed in no time now! > Disappointing that such

[android-developers] Re: Custom Dialog

2010-03-17 Thread mah
I've been bit by this incorrect documentation as well. I've just starred your issue, but I see that currently the vote count on it is very small. I hope that more people will vote to have this (and any other incorrect documentation) issue addressed; without solid documentation, the system value di

[android-developers] Re: Custom Dialog

2010-03-17 Thread Lance Nanek
I tried the official issue route of getting someone to do something here: http://code.google.com/p/android/issues/detail?id=5748 You can star/vote it up, I suppose. It's been months, though. Disappointing that such a trivial fix that would help so many people who are starting out isn't being acted

Re: [android-developers] Re: Custom Dialog

2010-03-17 Thread TreKing
On Tue, Mar 16, 2010 at 3:55 PM, Bob Kerns wrote: > I've not been able to come up with a single use case for > calling getApplicationContext(); > Could someone from Google PLEASE update the documentation for this function and the samples that use it incorrectly? It is the source of massive confu

[android-developers] Re: Custom Dialog

2010-03-16 Thread Bob Kerns
I've not been able to come up with a single use case for calling getApplicationContext(); I suspect the need for it is ENTIRELY internal. Also getBaseContext(). Generally, you want to pass along the most specific context available. That will be your current activity or service. UI components like

[android-developers] Re: Custom Dialog

2010-03-15 Thread Dirk Vranckaert
Thx a lot, this works! On 15 mrt, 22:15, Adrian Vintu wrote: > This one hs been answered a couple of times on this forum. > > Use > dialog = new Dialog(this); > instead of > dialog = new Dialog(getApplicationContext()); > > BR, > Adrian Vintu > > http://adrianvintu.com > > On Mon, Mar 15, 2010 at

Re: [android-developers] Re: Custom Dialog

2010-03-15 Thread Adrian Vintu
This one hs been answered a couple of times on this forum. Use dialog = new Dialog(this); instead of dialog = new Dialog(getApplicationContext()); BR, Adrian Vintu http://adrianvintu.com On Mon, Mar 15, 2010 at 10:05 PM, Dirk Vranckaert wrote: > Thx for the quick response but doesn't change a

[android-developers] Re: Custom Dialog

2010-03-15 Thread Dirk Vranckaert
Thx for the quick response but doesn't change a thing, it gives me exactly the same exception! On 15 mrt, 21:58, Kumar Bibek wrote: > Try getBaseContext(); > > Thanks and Regards, > Kumar Bibek > > On Mar 16, 1:50 am, Dirk Vranckaert wrote: > > > I'm trying to create a custom dialog in my applic

[android-developers] Re: Custom Dialog

2010-03-15 Thread Kumar Bibek
Try getBaseContext(); Thanks and Regards, Kumar Bibek On Mar 16, 1:50 am, Dirk Vranckaert wrote: > I'm trying to create a custom dialog in my application to show an > about window but it ain't working. Maybe one of you knows a solution? > > So I have an activity with the onCreateDialog(int id) o

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Lance Nanek
>http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog There was a thread recently about how that part of the documentation was wrong, actually. At the minimum you're going to have to replace this line: >builder = new AlertDialog.Builder(mContext); With this: builder = new Aler

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
ok, this worked, but i dont know what was wrong in my aproach, for the sake of meeting deadline i will use this for now http://www.anddev.org/viewtopic.php?p=12915 in the above example, can I remove the edit text and show some scrollable text info full screen ? any helps are thanked regards On

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
is it because i am calling it from a handler ? this handler is a private member variable of my activity private Handler myhandler = new Handler() { /* (non-Javadoc) * @see android.os.Handler#handleMessage(android.os.Message) */ @Override

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
ok! i moved the code to onCreateDialog and even tough vg is null, it created the alert. but should vg be null ? but it crashed again ! here is code protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder; AlertDialog alertDialog = null;

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
I understand that this is coming null because my current activity layout is main.xml. but is it that i need to do a setlayout to mydialog before starting any of my code ? On Nov 23, 8:11 pm, Jags wrote: > I have written below code for showing a custom dialog > >         void CheckHighScore() {

[android-developers] Re: custom dialog crashing

2009-11-23 Thread Jags
yeah i referred this tutorial of oogle http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog On Nov 23, 8:11 pm, Jags wrote: > I have written below code for showing a custom dialog > >         void CheckHighScore() { > >                         AlertDialog.Builder builder; >

[android-developers] Re: Custom dialog in PreferenceActivity loaded from addPreferencesFromResource()?

2009-02-11 Thread g1bb
Doh! I knew it was something simple I was forgetting. Thanks! On Feb 11, 12:01 am, Chander Pechetty wrote: > addPreferencesFromResource(R.layout.settings); > settings = getSharedPreferences(PREFS_NAME, 0); > settings.registerOnSharedPreferenceChangeListener(this); > > Be sure to unregister it o

[android-developers] Re: Custom dialog in PreferenceActivity loaded from addPreferencesFromResource()?

2009-02-10 Thread Chander Pechetty
addPreferencesFromResource(R.layout.settings); settings = getSharedPreferences(PREFS_NAME, 0); settings.registerOnSharedPreferenceChangeListener(this); Be sure to unregister it on onPause() --~--~-~--~~~---~--~~ You received this message because you are subscri

[android-developers] Re: Custom dialog in PreferenceActivity loaded from addPreferencesFromResource()?

2009-02-10 Thread g1bb
Anyone have any ideas on this? Thanks again! On Feb 5, 7:23 am, g1bb wrote: > Gotcha. I'm trying to do this in onSharedPreferenceChanged(), but I > can't seem to get it to hit. > > public class Settings extends PreferenceActivity implements > OnSharedPreferenceChangeListener  { >         public

[android-developers] Re: Custom dialog in PreferenceActivity loaded from addPreferencesFromResource()?

2009-02-05 Thread g1bb
Gotcha. I'm trying to do this in onSharedPreferenceChanged(), but I can't seem to get it to hit. public class Settings extends PreferenceActivity implements OnSharedPreferenceChangeListener { public static final String PREFS_NAME = "com.myapp.app_preferences"; @Override

[android-developers] Re: Custom dialog in PreferenceActivity loaded from addPreferencesFromResource()?

2009-02-05 Thread Chander Pechetty
In your PreferenceActivity class, just call Preference dialogPref = findPreference(yourdialogkey); Get the dialog Layout if you are using a custom View or call one of the SetMessage methods. --~--~-~--~~~---~--~~ You received this message because you are subsc