File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Fail to Invalidate a Dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Fail to Invalidate a Dialog " Watch "Fail to Invalidate a Dialog " New topic
Author

Fail to Invalidate a Dialog

Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79


Hello,

I have a Dialog (MyDialog) called from Activity. MyDialg shows a ProgressDialog in AsyncTask process. It has 1 TextView to display message and 2 editboxes below it. The layout is so :


The problem that I face is :
In AsyncTask process, if at all any error occurs, I display it in messageText textView. I have already made it of 2 lines and 70dp height. Yet when some message of more than 1 line comes up, the below 2 editText's are gone i.e. invisible. On finishing AsyncTask, I call this.getCurrentFocus().invalidate();, but that alos has no affect.

How do I get rid of this problem and make the 2 edittext's visible even after ProgressDialog is gone and message is dispaled in TextVew. Am I going wrong anywhere ? Please help me out.

Thanks

Regards,
Trupti (SCJP)
Michael Hari
Greenhorn

Joined: Apr 07, 2011
Posts: 5
Personally, I would start by converting your TableLayout to a Relative or Linear Layout. Table Layout is such and eyesore and pain.

I'm kind of curious what you're trying to accomplish here. From what I'm reading, you're just trying to make an input Dialog. Can you post the java code as well?
Trupti Mehta
Ranch Hand

Joined: Oct 08, 2000
Posts: 79

Michael Hari wrote:Personally, I would start by converting your TableLayout to a Relative or Linear Layout. Table Layout is such and eyesore and pain.

I'm kind of curious what you're trying to accomplish here. From what I'm reading, you're just trying to make an input Dialog. Can you post the java code as well?




This is my Java code related the issue. NOTE: If the text of mMessage is just a small text that fits in a line, then all stays fine. But if more than 1 line text is there the problem arises i.e. both the text fields are lost. Surprising, when I click Login button again a nd again the ProgressDialog comes up, I can see the both editText's behin the ProgressDialog.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fail to Invalidate a Dialog
 
Similar Threads
list view problem
when i change android:orientation to horizontal it shows blank screen
Layouts, bottom position
Fields hidden due to keyboard
Problem with Table view