Release control from progressDialog

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Release control from progressDialog

Postby Katharnavas » Thu Jan 03, 2008 2:34 pm

Hi,
I just show one progress dialog during network connection till the process ends and dismiss it after restoring the contents .. till that every thing seems to work fine but when i tried to access the menu or any buttons during progress bar is displayed i came to notice that i could not.
Im quite surprised and confused how to get resolved this issue.. Any suggestions hope might work for me..
Katharnavas
Senior Developer
Senior Developer
 
Posts: 100
Joined: Tue Dec 04, 2007 5:57 am
Location: India

Top

Postby plusminus » Thu Jan 03, 2008 2:59 pm

Hello Katharnavas,

Showing a ""cricital"" Dialog (like a ProgressBar) almost every application blocks the dialogs behind.
i.e. Eclipse does so when you create a new Class/Project, it blocks everything except the Foreground-Dialog.

I think this is preferable on critical situations. Perhaps your problem is not that cricital that you should overlay your activity with a ProgressBar. Perhaps disabling some specific Buttons and showing a "working"-Label is better...?

Regards,
plusminus
Last edited by plusminus on Fri Jan 04, 2008 11:41 am, edited 1 time in total.
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 Katharnavas » Fri Jan 04, 2008 7:40 am

I think this is preferable on critical situations. Perhaps your problem is not that cricital that you should overlay your activity with a ProgressBar. Perhaps disabling some specific Buttons and showing a "working"-Label is better...?


What it actuallly means that we have to hide some components behind the view and we have to show a textview over it ..
Katharnavas
Senior Developer
Senior Developer
 
Posts: 100
Joined: Tue Dec 04, 2007 5:57 am
Location: India

Postby plusminus » Fri Jan 04, 2008 11:46 am

Hello Katharnavas,

what about:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. myView.setEnabled(false);
Parsed in 0.033 seconds, using GeSHi 1.0.8.4

:)

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 kaobiore » Fri Jan 04, 2008 1:06 pm

Hi Katharnavas!

So you want to hide a textview, layout or ... right :?:

Try this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. this.textView.setVisibility(View.GONE);
  3.  
  4. // or
  5.  
  6. this.textView.setVisibility(View.INVISIBLE);
  7.  
  8.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


That did the trick for me :wink:

Cheers
-kao-
kaobiore
Freshman
Freshman
 
Posts: 8
Joined: Sat Dec 29, 2007 11:21 am
Location: Vienna / Austria

Postby Katharnavas » Fri Jan 04, 2008 1:52 pm

Thanks for ur suggestions.. I will replace the progress in this manner bcoz progress is holding the control for a long time.
Katharnavas
Senior Developer
Senior Developer
 
Posts: 100
Joined: Tue Dec 04, 2007 5:57 am
Location: India

Top

Postby irobot » Wed May 14, 2008 1:13 pm

Katharnavas wrote:Thanks for ur suggestions.. I will replace the progress in this manner bcoz progress is holding the control for a long time.




When i use the following XML code to create a progressbar it works fine, but if i am doing the same through java code, i can't set the style of the progressbar. Can anybody tell how to set the style of the progressbar?

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <ProgressBar android:id="@+id/progress"
  2.  
  3.            style="?android:attr/progressBarStyleHorizontal"
  4.  
  5.            android:layout_width="200dip"
  6.  
  7.            android:layout_height="wrap_content"
  8.  
  9.            android:layout_centerHorizontal="true"
  10.  
  11.            android:max="100"
  12.  
  13.            android:progress="34" />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Thanks in advance.
If at first you don't succeed, look in the trash for the instructions.
irobot
Freshman
Freshman
 
Posts: 5
Joined: Thu Mar 27, 2008 8:32 am
Location: Coimbatore, India

Postby ebersmoll » Mon Jun 09, 2008 2:15 pm

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2.  <Button android:id="@+id/button_right"
  3.  
  4.            style="?android:attr/buttonStyleRight"
  5.  
  6.            android:text="@string/buttons_1_right"
  7.  
  8.            android:layout_width="wrap_content"
  9.  
  10.            android:layout_height="wrap_content" />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4



when i use this in xml the style of button is reflected


when i use
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.   setTheme(android.R.style.Widget_Button_Small);
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
the change is not reflected and instead the textboxes get change and appear as button.. i need the buttons to be small.
Windmill windmill on the land
love forever love is free
ebersmoll
Freshman
Freshman
 
Posts: 7
Joined: Fri Apr 04, 2008 4:41 am
Location: Delhi

Postby konic » Fri Sep 18, 2009 9:51 pm

plusminus,
thanks for some insides of that ProgressDialog stuff.
Docs says nothing and I spent several hours until I found this post.
I thought I run this dialog in a "wrong" thread :)
Now, the reason I needed menu was I wanted to manually dismiss dialog.
I did it through setOnCancelListener and back key, and
add some ugly looking button to cancel it other way :)
konic
Developer
Developer
 
Posts: 32
Joined: Mon Aug 24, 2009 3:16 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests